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:	Fri, 14 Jul 2006 17:50:07 -0400
From:	Dave Jones <davej@...hat.com>
To:	Steven Rostedt <rostedt@...dmis.org>
Cc:	Oliver Neukum <oliver@...kum.org>, Andrew Morton <akpm@...l.org>,
	Ingo Molnar <mingo@...e.hu>,
	Linus Torvalds <torvalds@...l.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] remove volatile from x86 cmos_lock

On Fri, Jul 14, 2006 at 11:09:25AM -0400, Steven Rostedt wrote:
 > On Fri, 2006-07-14 at 16:53 +0200, Oliver Neukum wrote:
 > > Am Freitag, 14. Juli 2006 16:48 schrieb Steven Rostedt:
 > > > @@ -52,14 +54,16 @@ static inline void lock_cmos(unsigned ch
 > > >  
 > > >  static inline void unlock_cmos(void)
 > > >  {
 > > > -       cmos_lock = 0;
 > > > +       set_wmb(cmos_lock, 0);
 > > >  }
 > > >  static inline int do_i_have_lock_cmos(void)
 > > >  {
 > > > +       barrier();
 > > 
 > > Shouldn't these be rmb() ?
 > 
 > I was thinking that too, but I'm still not sure when to use rmb or
 > barrier.  wmb seems pretty straight forward though.  hmm, maybe this
 > really should be a smb_rmb since I believe a barrier would be ok for UP.

I'm more puzzled why it's inventing its own locking primitives instead of
using one of the many the kernel provides.  This stuff is prehistoric though.
Hangover from the really early days ?

		Dave

-- 
http://www.codemonkey.org.uk
-
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