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: <alpine.DEB.1.00.0802121955040.11889@chino.kir.corp.google.com>
Date:	Tue, 12 Feb 2008 20:03:45 -0800 (PST)
From:	David Rientjes <rientjes@...gle.com>
To:	Paul Jackson <pj@....com>
cc:	Lee Schermerhorn <Lee.Schermerhorn@...com>,
	akpm@...ux-foundation.org, clameter@....com, ak@...e.de,
	linux-kernel@...r.kernel.org, mel@....ul.ie
Subject: Re: [patch 3/4] mempolicy: add MPOL_F_STATIC_NODES flag

On Tue, 12 Feb 2008, Paul Jackson wrote:

> > 1) we've discussed the issue of returning EINVAL for non-empty nodemasks
> > with MPOL_DEFAULT.  By removing this restriction, we run the risk of
> > breaking applications if we should ever want to define a semantic to
> > non-empty node mask for MPOL_DEFAULT. 
> 
> The bigger risk, in my view, is breaking some piece of existing user code.
> Properly written user code wouldn't break, but that doesn't mean much.
> Changes, even minor corner case changes, often break something, so should
> not be done with out cause.  Whether or not code cleanup in mempolicy.c is
> sufficient cause here is not clear to me.
> 
> Future room for growth doesn't mean so much for me here; if we close one
> future alternative, we always have others, such as more mode flag bits.
> 

I've redone my patchset based on the feedback that I've received, and in 
my latest revisions I folded the entire equivalent of mpol_check_policy() 
into mpol_new().

Lee, you feel strongly that non-empty nodemasks passed with MPOL_DEFAULT 
should be considered invalid and rejected by the kernel, as the current 
implementation does.  I've brought up a counter-argument based on the 
set_mempolicy() man page and the Linux documentation that don't specify 
anything about what the nodemask shall contain if it's not a NULL pointer.

My position was to give the user the benefit of the doubt.  Because Linux 
has been vague in specifying what the nodemask shall contain, that (to me) 
means that it can contain anything.  It's undefined, in a standards sense.  
The only thing that we should look for is whether the user passed 
MPOL_DEFAULT as the first parameter and then we should effect that policy 
because it's clearly the intention.

I don't think there's a super strong case for either behavior, and that's 
why I just folded the mpol_check_policy() logic straight into mpol_new().  

		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