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, 1 Nov 2007 11:52:28 -0700 (PDT)
From:	David Rientjes <rientjes@...gle.com>
To:	Paul Jackson <pj@....com>
cc:	Christoph Lameter <clameter@....com>, Lee.Schermerhorn@...com,
	linux-kernel@...r.kernel.org, ak@...e.de
Subject: Re: [RFC] cpuset relative memory policies - second choice

On Wed, 31 Oct 2007, Paul Jackson wrote:

> The basic reason that I went with an additional per-task modal
> state, rather than a modal flag for each mbind, set_mempolicy and
> get_mempolicy call was to reduce the likely rate of bugs in user
> level C code using this API.
> 

I think it may be more error prone to accidently leave off the 
get_mempolicy() system call to use the system-wide numbering or for 
user-level code to forget that the mode was already set (and now stored in 
their task_struct) without a subsequent get_mempolicy() to revert back to 
the default behavior.  Both of these problems can be addressed by checking 
the *policy returned by get_mempolicy(), as you've coded it, but many 
applications will probably ignore that overhead.

Allowing the mode to be passed on each set_mempolicy() system call seems 
better, this is where the nodemask is passed anyway so it's legitimate for 
the caller to specify how that nodemask should be interpreted (either 
system-wide or cpuset-wide).  This keeps all semantics of the nodemask to 
a single invocation of a system call instead of setting policy modes with 
get_mempolicy() and confusing the matter later.

I think get_mempolicy() can remain unchanged because it will simply return 
the contextualized nodemask in either case and would not require a mode to 
be passed.

		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