lkml.org 
[lkml]   [2008]   [Jan]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86: introduce /dev/mem restrictions with a config option

On Jan 30 2008 12:48, Arjan van de Ven wrote:
>Subject: [PATCH] x86: introduce /dev/mem restrictions with a config option
>
>This patch introduces a restriction on /dev/mem: Only non-memory can be
>read or written unless the newly introduced config option is set.

Would not it be nicer to add a /dev/pcimem that implements the given
restrictive semantics?

Maybe it's just wishful thinking, but I am dreaming of an unprivileged
X, and /dev/pcimem (owned by an 'x11' user or so) would be a step in
that direction.

>The X server needs access to /dev/mem for the PCI space, but it doesn't need
>access to memory; both the file permissions and SELinux permissions of /dev/mem
>just make X effectively super-super powerful. With the exception of the
>BIOS area, there's just no valid app that uses /dev/mem on actual memory.

And so I could even get rid of /dev/mem.

>People who want to use /dev/mem for kernel debugging can enable the config
>option.

With a pcimem, kernel people would not need to reconfig the kernel, just
create/delete the node as they wish.


\
 
 \ /
  Last update: 2008-01-31 17:57    [W:1.500 / U:0.352 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site