From: Leif Lindholm <leif.lindholm@linaro.org>
To: Kees Cook <keescook@chromium.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will.deacon@arm.com>,
Oleg Nesterov <oleg@redhat.com>,
paulus@samba.org, "H. Peter Anvin" <hpa@zytor.com>,
Guan Xuetao <gxt@mprc.pku.edu.cn>,
linux-s390@vger.kernel.org,
Russell King - ARM Linux <linux@arm.linux.org.uk>,
"x86@kernel.org" <x86@kernel.org>,
Christoph Hellwig <hch@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
dave.long@linaro.org, eiko.carstens@de.ibm.com,
Arnd Bergmann <arnd@arndb.de>,
cmetcalf@tilera.com, Thomas Gleixner <tglx@linutronix.de>,
Arjan van de Ven <arjan@linux.intel.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
Greg KH <gregkh@linuxfoundation.org>,
LKML <linux-kernel@vger.kernel.org>,
Andy Lutomirski <luto@amacapital.net>,
Martin Schwidefsky <schwidefsky@de.ibm.com>,
linux390@de.ibm.com, Andrew Morton <akpm@linux-foundation.org>,
linuxppc-dev@lists.ozlabs.org
Subject: Re: [RFC PATCH] make CONFIG_STRICT_DEVMEM a core non-debug feature
Date: Tue, 4 Nov 2014 19:59:14 +0000 [thread overview]
Message-ID: <20141104195914.GY22224@bivouac.eciton.net> (raw)
In-Reply-To: <CAGXu5jL1BBAvoxVqFa1YHJSMCbGdLiPey-dyC15YKVPB2xGfig@mail.gmail.com>
On Tue, Nov 04, 2014 at 10:43:00AM -0800, Kees Cook wrote:
> > diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig
> > index efefd12..39f7817 100644
> > --- a/drivers/char/Kconfig
> > +++ b/drivers/char/Kconfig
> > @@ -6,6 +6,22 @@ menu "Character devices"
> >
> > source "drivers/tty/Kconfig"
> >
> > +config STRICT_DEVMEM
> > + bool "Reduced access to /dev/mem"
> > + depends on HAVE_ARCH_RESTRICTED_DEVMEM
> > + default y
> > + help
> > + If this option is disabled, you allow userspace (root) access to all
> > + of memory, including kernel and userspace memory. Accidental
> > + access to this is obviously disastrous, but specific access can
> > + be used by people debugging the kernel.
> > +
> > + If this option is switched on, the /dev/mem file restricts userspace
> > + access to an architecture-specific subset of the physical address
> > + space.
>
> Great consolidation, thanks! I would probably expand this help text a
> bit to include some of details mentioned in the x86 portion of the
> option. For example:
>
>
> If this option is switched on, the /dev/mem file restricts userspace
> access to an architecture-specific subset of the physical address
> space. For example on x86, PCI space and BIOS code and data
> regions. This is sufficient for things like dosemu and non-KMS
> Xorg and all common users of /dev/mem.
I considered doing that, but didn't want to risk listing too many
details of one architecture, and too few of others.
One alternative would be to add a devmem.txt somewhere in
Documentation, listing the behaviours on different architectures (this
would also be a good place to describe restrictions on types of
mappings and suchlike). The help message could then contain a mention
of that file. Would that work for you?
I really don't have a strong opinion however, and would be happy to go
along with whatever the most people would like to see.
/
Leif
next prev parent reply other threads:[~2014-11-04 19:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-04 17:23 [RFC PATCH] make CONFIG_STRICT_DEVMEM a core non-debug feature Leif Lindholm
2014-11-04 18:43 ` Kees Cook
2014-11-04 19:59 ` Leif Lindholm [this message]
2014-11-04 20:02 ` Kees Cook
2014-11-04 20:18 ` Leif Lindholm
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=20141104195914.GY22224@bivouac.eciton.net \
--to=leif.lindholm@linaro.org \
--cc=akpm@linux-foundation.org \
--cc=arjan@linux.intel.com \
--cc=arnd@arndb.de \
--cc=catalin.marinas@arm.com \
--cc=cmetcalf@tilera.com \
--cc=dave.long@linaro.org \
--cc=eiko.carstens@de.ibm.com \
--cc=gregkh@linuxfoundation.org \
--cc=gxt@mprc.pku.edu.cn \
--cc=hch@infradead.org \
--cc=hpa@zytor.com \
--cc=keescook@chromium.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=linux390@de.ibm.com \
--cc=linux@arm.linux.org.uk \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=luto@amacapital.net \
--cc=mingo@redhat.com \
--cc=oleg@redhat.com \
--cc=paulus@samba.org \
--cc=schwidefsky@de.ibm.com \
--cc=tglx@linutronix.de \
--cc=will.deacon@arm.com \
--cc=x86@kernel.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