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]
Message-ID: <a781481a0705110721h68a10969nacd0a7c6d9b423ee@mail.gmail.com>
Date:	Fri, 11 May 2007 19:51:21 +0530
From:	"Satyam Sharma" <satyam.sharma@...il.com>
To:	"Johannes Stezenbach" <js@...uxtv.org>
Cc:	"jimmy bahuleyan" <knight.camelot@...il.com>,
	"Jonathan Corbet" <corbet@....net>, linux-kernel@...r.kernel.org,
	akpm@...ux-foundation.org, "Jesper Juhl" <jesper.juhl@...il.com>,
	"Randy Dunlap" <randy.dunlap@...cle.com>,
	"Heikki Orsila" <shdl@...alwe.fi>, "H. Peter Anvin" <hpa@...or.com>
Subject: Re: [PATCH] "volatile considered harmful", take 2

On 5/11/07, Johannes Stezenbach <js@...uxtv.org> wrote:
> On Fri, May 11, 2007 at 02:08:54AM +0530, jimmy bahuleyan wrote:
> > Jonathan Corbet wrote:
> > [snip..]
> > > +
> > > +  - The jiffies variable is special in that it can have a different value
> > > +    every time it is referenced, but it can be read without any special
> > > +    locking.  So jiffies can be volatile, but the addition of other
> > > +    variables of this type is strongly frowned upon.  Jiffies is considered
> > > +    to be a "stupid legacy" issue in this regard.
> >
> > Why is it that you consider jiffies to be a "stupid legacy"? Isn't it
> > natural to have a externally modified variable which is only /read/ to
> > be volatile? (or is jiffies supposed to be replaced with something
> > smarter/better :)
>
> "stupid legacy" were Linus' words. http://lwn.net/Articles/233482/
>
> How about this:
>
> "The jiffies variable is a special case because there are too
> many places in the kernel which would have to be changed and reviewed
> if the volatile would be removed from jiffies. However, the
> use of volatile qualifier for jiffies is just as wrong as
> it is elsewhere. Don't use jiffies as an excuse to use volatile
> in your code."

Yes, or some "good" combination of the original and this one :-)

The problem with natural languages is that one is never quite satisfied
(or convinced) that one has expressed all that one wished to express,
and as nicely as one wanted to. That's often not the case with programming
languages, by contrast.
-
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