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:	Thu, 3 Apr 2008 10:46:55 -0400
From:	"Mike Frysinger" <vapier.adi@...il.com>
To:	"Bernd Schmidt" <bernds_cb1@...nline.de>
Cc:	"David Howells" <dhowells@...hat.com>,
	"Greg Ungerer" <gerg@...pgear.com>,
	"David McCullough" <David_Mccullough@...urecomputing.com>,
	LKML <linux-kernel@...r.kernel.org>,
	"Bryan Wu" <Bryan.Wu@...log.com>,
	"Robin Getz" <rgetz@...ckfin.uclinux.org>
Subject: Re: nommu: handling anonymous mmap clearing in userspace rather than kernel

On Thu, Apr 3, 2008 at 7:06 AM, Bernd Schmidt <bernds_cb1@...nline.de> wrote:
> Mike Frysinger wrote:
> > i also expected MAP_UNINITIALIZE to be unacceptable to LKML.  and
> > afaik, there doesnt seem to be a way to distinguish in the kernel
> > whether the call is coming from userspace or kernel space, so the
> > memset() call will still be called for the kernel.  ideally the code
> > would read:
> > if (!kernel && !(flags & MAP_UNINITIALIZE))
> >    memset(base, 0, len);
> >
>
>  Have you examined all callers in the kernel whether they can take
> uninitialized memory?

if they cant, they're broken, and need to get fixed.  i see these
crashes then as a good thing :).

> (Your code doesn't match your description btw, so I'm
> only guessing what you actually want to achieve.)

doesnt it ?  the memset should only be called for userspace when it
hasnt given the uninitialize flag.  if it's kernel space, we want to
skip it.  if the uninitialize flag is given, we want to skip it.

>  Really, if MAP_UNINITIALIZE is unacceptable, then that's too bad and we'll
> carry it as a local patch, but all the other proposed mechanisms are
> non-solutions because they break an established interface.

i'm just airing out the different solutions so people get a better
idea of what's going on.  i dont think the userspace <-> kernelspace
breakage is important, as the ABI is maintained at the important
layer: user application <-> C library.
-mike
--
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