mtx_lock_recurse/mtx_unlock_recurse functions (proof-of-concept).
From: Pawel Jakub Dawidek (pjd_at_FreeBSD.org)
Date: 04/08/04
- Previous message: root_at_nhdsmtp1.nippo-c.jp: "Virus Alert"
- Next in thread: Poul-Henning Kamp: "Re: mtx_lock_recurse/mtx_unlock_recurse functions (proof-of-concept)."
- Reply: Poul-Henning Kamp: "Re: mtx_lock_recurse/mtx_unlock_recurse functions (proof-of-concept)."
- Reply: Robert Watson: "Re: mtx_lock_recurse/mtx_unlock_recurse functions (proof-of-concept)."
- Maybe reply: Brian F. Feldman: "Re: mtx_lock_recurse/mtx_unlock_recurse functions (proof-of-concept)."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 8 Apr 2004 23:36:47 +0200 To: freebsd-arch@freebsd.org
Hi.
As was discussed, it will be helpful to have functions, that are able
to acquire lock recursively, even if lock itself isn't recursable.
Here is a patch, that should implement this functionality:
http://people.freebsd.org/~pjd/patches/mtx_lock_recurse.patch
I also added a KASSERT() to protect against mixed locking modes, e.g.:
mtx_lock(&mtx);
[...]
mtx_lock_recurse(&mtx);
[...]
mtx_unlock(&mtx);
[...]
mtx_unlock_recurse(&mtx);
This is not permitted, but this should work just fine:
mtx_lock(&mtx);
[...]
mtx_lock_recurse(&mtx);
[...]
mtx_unlock_recurse(&mtx);
[...]
mtx_unlock(&mtx);
-- Pawel Jakub Dawidek http://www.FreeBSD.org pjd@FreeBSD.org http://garage.freebsd.pl FreeBSD committer Am I Evil? Yes, I Am!
- application/pgp-signature attachment: stored
- Previous message: root_at_nhdsmtp1.nippo-c.jp: "Virus Alert"
- Next in thread: Poul-Henning Kamp: "Re: mtx_lock_recurse/mtx_unlock_recurse functions (proof-of-concept)."
- Reply: Poul-Henning Kamp: "Re: mtx_lock_recurse/mtx_unlock_recurse functions (proof-of-concept)."
- Reply: Robert Watson: "Re: mtx_lock_recurse/mtx_unlock_recurse functions (proof-of-concept)."
- Maybe reply: Brian F. Feldman: "Re: mtx_lock_recurse/mtx_unlock_recurse functions (proof-of-concept)."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
- Re: <+> Patch for MS04-007 Today!!!!<+>
... > vulnerability which Microsoft acknowledged by releasing this patch. ...
> that method of update and install all currently offered "Critical Updates ... >
access and is periodically being updated at WindowsUpdate. ... > if you need to take
any action to protect it, or if they will act on your ... (microsoft.public.backoffice.smallbiz) - Re: <+> Patch for MS04-007 Today!!!!<+>
... > vulnerability which Microsoft acknowledged by releasing this patch. ...
> that method of update and install all currently offered "Critical Updates ... >
access and is periodically being updated at WindowsUpdate. ... > if you need to take
any action to protect it, or if they will act on your ... (microsoft.public.backoffice.smallbiz2000) - Re: <+> Patch for MS04-007 Today!!!!<+>
... > vulnerability which Microsoft acknowledged by releasing this patch. ...
> that method of update and install all currently offered "Critical Updates ... >
access and is periodically being updated at WindowsUpdate. ... > if you need to take
any action to protect it, or if they will act on your ... (microsoft.public.windows.server.sbs) - Re: Security Experts Warn of New Way to Attack Windows
... you are protected if the patch has been applied for the workstation service.
... The patch for the Workstation Service vulnerability does protect against ...
this latest attack, Caceres said. ... (microsoft.public.security) - Re: [PATCH -rt 2/5] Thread Migration Preemption - v2
... This patch adds the ability to protect critical sections from migration to ...
another CPU without disabling preemption. ... Which will increment the variable atomically
wrt the local CPU. ... (Linux-Kernel)