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:	Tue, 28 Oct 2014 19:25:43 -0400
From:	Mike Frysinger <vapier@...too.org>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	Joe Perches <joe@...ches.com>, linux-kernel@...r.kernel.org,
	Al Viro <viro@...iv.linux.org.uk>,
	linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH 1/2 v2] binfmt_misc: add comments & debug logs

On 28 Oct 2014 15:58, Andrew Morton wrote:
> On Mon, 20 Oct 2014 19:54:14 -0400 Mike Frysinger wrote:
> > On 20 Oct 2014 15:59, Joe Perches wrote:
> > > On Mon, 2014-10-20 at 18:45 -0400, Mike Frysinger wrote:
> > > > diff --git a/fs/binfmt_misc.c b/fs/binfmt_misc.c
> > > []
> > > > @@ -323,46 +343,113 @@ static Node *create_entry(const char __user *buffer, size_t count)
> > > []
> > > > +			if (e->mask) {
> > > > +				int i;
> > > > +				char *masked = kmalloc(e->size, GFP_USER);
> > > 
> > > Why GFP_USER?  Does it need it?
> > 
> > mostly a copy & paste from earlier in this func:
> > 	e = kmalloc(memsize, GFP_USER);
> > 
> > the code is running process context and this buffer is only for
> > debugging on behalf of the user (and is shortly freed there after), so
> > GFP_USER seemed appropriate.  that said, i'm certainly not an expert
> > here, so if the convention is to use GFP_KERNEL, it's easy enough to
> > change.  the kmalloc API doesn't seem to provide guidance.
> 
> I can't see any reason to me using GFP_USER for these objects so how
> about
> 
> 
> From: Andrew Morton <akpm@...ux-foundation.org>
> Subject: fs/binfmt_misc.c: use GFP_KERNEL instead of GFP_USER
> 
> GFP_USER means "honour cpuset nodes-allowed beancounting".  These are
> regular old kernel objects and there seems no reason to give them this
> treatment.

tracing the source bits showed that as the only difference i could fine, but as 
to what they actually impacts, i'm not sure :).  i don't think it's super 
critical though considering only root users can update this, so it's hard to see 
how it'd be abused.

Acked-by: Mike Frysinger <vapier@...too.org>
-mike

Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ