From: David Howells <dhowells@redhat.com>
To: graff yang <graff.yang@gmail.com>
Cc: dhowells@redhat.com, linux-kernel@vger.kernel.org,
gyang@blackfin.uclinux.org, akpm@linux-foundation.org,
uclinux-dist-devel@blackfin.uclinux.org,
Graff Yang <graf.yang@analog.com>,
linux-security-module@vger.kernel.org
Subject: Re: [PATCH] mm/nommu.c: Fix improperly call of security API in mmap
Date: Thu, 15 Oct 2009 08:07:21 +0100 [thread overview]
Message-ID: <6954.1255590441@redhat.com> (raw)
In-Reply-To: <7d86d44a0910142045n585c099l50b1efec12c1db3e@mail.gmail.com>
graff yang <graff.yang@gmail.com> wrote:
> Your patch works both with SELINUX enabled or disabled.
Thanks.
> But, how to prevent the address that attempting to be mapped to be lower
> than CONFIG_LSM_MMAP_MIN_ADDR/CONFIG_DEFAULT_MMAP_MIN_ADDR?
> This is what the security_file_mmap() is doing and mmu's
> do_mmap_pgoff() has implemented.
You need to ask yourself two questions:
(1) Does the test make any sense in the NOMMU context? Given that the
userspace program _cannot_ specify that something should be mapped below
that address (since MAP_FIXED gives an error and the hint is ignored),
I'd say not.
(2) Is it likely that LSM security would be used with NOMMU anyway, given
that there is nothing stopping userspace programs editing the kernel
directly?
You need to show that it makes sense to do the test in a NOMMU context.
Remember, if there is no physical medium at address 0 (RAM, flash, whatever),
you can't map anything there. This might best be left to the arch to not
provide page 0 of RAM to the page allocator during memory initialisation.
David
next prev parent reply other threads:[~2009-10-15 7:09 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-14 10:28 [PATCH] mm/nommu.c: Fix improperly call of security API in mmap graff.yang
2009-10-14 14:08 ` David Howells
2009-10-15 2:21 ` graff yang
2009-10-15 3:45 ` graff yang
2009-10-15 7:07 ` David Howells [this message]
2009-10-16 7:06 ` [Uclinux-dist-devel] " Mike Frysinger
2009-10-16 15:01 ` Eric Paris
2009-10-16 15:14 ` David Howells
2009-10-16 15:21 ` Eric Paris
2009-10-16 15:43 ` David Howells
2009-10-16 15:55 ` Eric Paris
2009-11-17 22:13 ` Andrew Morton
2009-11-17 23:24 ` Mike Frysinger
2009-11-18 21:10 ` Eric Paris
2009-11-20 15:00 ` David Howells
2009-11-20 17:42 ` Andrew Morton
2009-11-20 17:54 ` David Howells
2009-11-20 19:32 ` Eric Paris
2009-11-20 19:50 ` Andrew Morton
2009-11-20 19:58 ` Eric Paris
2009-11-21 0:16 ` David Howells
2009-11-21 16:15 ` Eric Paris
2009-11-23 10:10 ` John Johansen
2009-10-16 15:43 ` [Uclinux-dist-devel] " Mike Frysinger
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=6954.1255590441@redhat.com \
--to=dhowells@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=graf.yang@analog.com \
--cc=graff.yang@gmail.com \
--cc=gyang@blackfin.uclinux.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=uclinux-dist-devel@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