From: James Morris <jmorris@namei.org>
To: Eric Paris <eparis@redhat.com>
Cc: linux-kernel@vger.kernel.org, selinux@tycho.nsa.gov,
linux-security-module@vger.kernel.org, sds@tycho.nsa.gov,
spender@grsecurity.net, dwalsh@redhat.com,
cl@linux-foundation.org, arjan@infradead.org,
alan@lxorguk.ukuu.org.uk, kyle@mcmartin.ca, cpardy@redhat.com,
arnd@arndb.de
Subject: Re: [PATCH -v2 1/2] VM/SELinux: require CAP_SYS_RAWIO for all mmap_zero operations
Date: Wed, 22 Jul 2009 19:23:27 +1000 (EST) [thread overview]
Message-ID: <alpine.LRH.2.00.0907221921150.15799@tundra.namei.org> (raw)
In-Reply-To: <20090721230339.20180.99803.stgit@paris.rdu.redhat.com>
On Tue, 21 Jul 2009, Eric Paris wrote:
> +
> + if ((addr < mmap_min_addr) && !capable(CAP_SYS_RAWIO))
> + return -EACCES;
Please make this check a static inline. Less chance of someone breaking
it, or it having some subtle bug, and easier to maintain.
> address &= PAGE_MASK;
> +
Whitespace leak.
- James
--
James Morris
<jmorris@namei.org>
next prev parent reply other threads:[~2009-07-22 9:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-21 23:03 Eric Paris
2009-07-21 23:03 ` [PATCH -v2 2/2] Security/SELinux: seperate lsm specific mmap_min_addr Eric Paris
2009-07-22 9:23 ` James Morris [this message]
2009-07-22 13:53 ` [PATCH -v2 1/2] VM/SELinux: require CAP_SYS_RAWIO for all mmap_zero operations James Morris
2009-07-22 15:42 ` Christoph Lameter
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=alpine.LRH.2.00.0907221921150.15799@tundra.namei.org \
--to=jmorris@namei.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=arjan@infradead.org \
--cc=arnd@arndb.de \
--cc=cl@linux-foundation.org \
--cc=cpardy@redhat.com \
--cc=dwalsh@redhat.com \
--cc=eparis@redhat.com \
--cc=kyle@mcmartin.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=sds@tycho.nsa.gov \
--cc=selinux@tycho.nsa.gov \
--cc=spender@grsecurity.net \
/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®