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] [day] [month] [year] [list]
Date:	Sun, 28 Jan 2007 11:11:04 -0800
From:	Randy Dunlap <randy.dunlap@...cle.com>
To:	7eggert@....de
Cc:	Fengguang Wu <wfg@...l.ustc.edu.cn>, Andrew Morton <akpm@...l.org>,
	Martin Peschke <mp3@...ibm.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/8] readahead: state based method routines: explicitly
 embed class_new/class_old inside flags

On Sat, 27 Jan 2007 13:01:08 +0100 Bodo Eggert wrote:

> Fengguang Wu <wfg@...l.ustc.edu.cn> wrote:
> 
> > The new/old ra class were implicitly stored in low bits of
> > file_ra_state.flags. Now make the data structure obvious, and remove the
> > coding tricks.
> 
> > +++ linux-2.6.20-rc4-mm1/include/linux/fs.h
> 
> > -     unsigned long flags;    /* RA_FLAG_xxx | ra_class_old | ra_class_new */
> > +     union {
> > +             unsigned long   flags;  /* RA_FLAG_xxx | class_old | class_new */
> > +             struct {
> > +                     u8      class_new;
> > +                     u8      class_old;
> 
> This doesn't work on big endiam machines, does it?
> 
> IMO you should use a bitfield instead.

Or "use bit masks instead" since

"The order of allocation of bit-fields within a unit (high-order to
low-order or low-order to high-order) is implementation-defined."

---
~Randy
-
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