From: "Mike Frysinger" <vapier.adi@gmail.com>
To: "Bernd Schmidt" <bernds_cb1@t-online.de>
Cc: "David Howells" <dhowells@redhat.com>,
"Greg Ungerer" <gerg@snapgear.com>,
"David McCullough" <David_Mccullough@securecomputing.com>,
LKML <linux-kernel@vger.kernel.org>,
"Bryan Wu" <Bryan.Wu@analog.com>,
"Robin Getz" <rgetz@blackfin.uclinux.org>
Subject: Re: nommu: handling anonymous mmap clearing in userspace rather than kernel
Date: Thu, 3 Apr 2008 10:46:55 -0400 [thread overview]
Message-ID: <8bd0f97a0804030746k155a716tb1ced0d1aec6047f@mail.gmail.com> (raw)
In-Reply-To: <47F4BA31.1080702@t-online.de>
On Thu, Apr 3, 2008 at 7:06 AM, Bernd Schmidt <bernds_cb1@t-online.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
next prev parent reply other threads:[~2008-04-03 14:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-01 21:34 Mike Frysinger
2008-04-02 14:20 ` David Howells
2008-04-02 14:47 ` Mike Frysinger
2008-04-02 15:03 ` Bernd Schmidt
2008-04-02 15:07 ` Mike Frysinger
2008-04-03 11:06 ` Bernd Schmidt
2008-04-03 14:46 ` Mike Frysinger [this message]
2008-04-03 13:14 ` David Howells
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8bd0f97a0804030746k155a716tb1ced0d1aec6047f@mail.gmail.com \
--to=vapier.adi@gmail.com \
--cc=Bryan.Wu@analog.com \
--cc=David_Mccullough@securecomputing.com \
--cc=bernds_cb1@t-online.de \
--cc=dhowells@redhat.com \
--cc=gerg@snapgear.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rgetz@blackfin.uclinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®