lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 07 Aug 2008 19:19:42 +0200
From:	Stefan Richter <stefanr@...6.in-berlin.de>
To:	jmerkey@...fmountaingroup.com
CC:	linux-kernel@...r.kernel.org
Subject: Re: [ANNOUNCE] mdb-2.6.27-rc2-ia32-08-07-08.patch

jmerkey@...fmountaingroup.com wrote:
>> jmerkey@...fmountaingroup.com wrote:
>>> rspin locks are for these types of cases -- so if I fault on the same
>>> processor I took the lock on it just bumps a counter -- yes, it is
>>> atomic
>>> and SMP safe to do it this way.
>> Only if all contexts which take rlocks are not preemptible.
[...]
> check mdb-main.c -- I disable preemption before rspin_lock is attempted. 
> Since the only processor which sets the proc number does do inside the
> spin lock, and the other processors only read it, unless memory is
> corrupted or the machine is severely broken, its SMP safe to this.

Then it is recommendable that you document the call context requirements 
at the functions.  And you can and IMO should drop the _irq_save and 
_irq_restore from the spinlock accessors in the rlock accessors.  And 
drop the volatile qualifier of the rlock accessor argument while you are 
at it.

I see that you are calling save_flags/ restore_flags in 
mdb-main.c::mdb().  These are marked as deprecated.  Would 
local_irq_save/ local_irq_restore be correct at these places?
-- 
Stefan Richter
-=====-==--- =--- --===
http://arcgraph.de/sr/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ