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: <1204061567.5309.42.camel@localhost>
Date:	Tue, 26 Feb 2008 16:32:46 -0500
From:	Lee Schermerhorn <Lee.Schermerhorn@...com>
To:	David Rientjes <rientjes@...gle.com>
Cc:	Paul Jackson <pj@....com>, akpm@...ux-foundation.org,
	clameter@....com, ak@...e.de, linux-kernel@...r.kernel.org
Subject: Re: [patch 3/6] mempolicy: add MPOL_F_STATIC_NODES flag

On Tue, 2008-02-26 at 13:02 -0800, David Rientjes wrote:
> On Tue, 26 Feb 2008, Paul Jackson wrote:
> 
> > >         return do_mbind(start, len, mode, mode_flags, &nodes, flags);
> > 
> > The intermingling of 'flags', 'mode' and 'mode_flags' to refer to the
> > low bits, the high bits or all the bits of the flags field is handled
> > fairly carefully in your patch, but can still be a bit difficult to
> > keep track of which is which when reading.
> > 
> > I'll wager not many readers can immediately say what the 'mode',
> > 'mode_flags' and 'flags' refer to, in the above code snippet, for
> > example.
> > 
> > Do you have any suggestions on how to further improve the clarity of
> > this code?
> > 
> 
> This is a natural implementation detail to accomodate your insistance that 
> the mode and flags be passed as separate actuals throughout many of the 
> mm/mempolicy.c functions.

[:-(]

> 
> No reader is going to understand immediately what 'mode', 'mode_flags', 
> and 'flags' are if you only provide a single line of the code like that. 
> 
> It becomes rather obvious what they represent when you read the entire 
> sys_mbind() implementation, which is serving a syscall that provides its 
> own formal for passing flags.  The name 'mode_flags' is exactly what it 
> is: flags for the mempolicy mode.

Not to be confused with the MPOL_MF_* flags which are MemPOLicy Mbind
Flags passed via the flags parameter.  Nor the other MPOL_F_* flags
which are get_mempolicy() flags, also passed via the flags arg.

:-)

Later,
Lee
> 
> 		David

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