public inbox for linux-arch@vger.kernel.org
 help / color / mirror / Atom feed
From: Bernhard Walle <bwalle@suse.de>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: x86@kernel.org, linux-kernel@vger.kernel.org,
	linux-arch@vger.kernel.org, crash-utility@redhat.com
Subject: Re: Turn CONFIG_STRICT_DEVMEM in sysctl dev.mem.restricted
Date: Sun, 16 Nov 2008 16:20:03 +0100	[thread overview]
Message-ID: <20081116162003.04267538@kopernikus.site> (raw)
In-Reply-To: <20081116150756.3cece2de@lxorguk.ukuu.org.uk>

* Alan Cox [2008-11-16 15:07]:
>
> > The protection in the general case and the ability to do live debugging.
> 
> What protection. You've completely failed to explain or provide a single
> example of any protection provided by the STRICT_DEVMEM code.

I don't need to explain what protection STRICT_DEVMEM provides, just
because I didn't submit STRICT_DEVMEM. However:

    Author: Arjan van de Ven <arjan@linux.intel.com>
    Date:   Thu Apr 24 23:40:47 2008 +0200

    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.
    Other popular users of /dev/mem are rootkits and the like.
    (note: mmap access of memory via /dev/mem was already not allowed since
    a really long time)

So without that patch, a distributor needs to have two kernels: One
with SELinux and with /dev/mem protection and one without it. If I
remember correctly, you can turn off SELinux on the boot command line.
But I never used it. At least I don't see -selinux and -noselinux
kernels in Redhat.

However, with my patch you can make everything configurable. With
SELinux or Apparmor you can also protect the user from writing that
sysctl. Or from loading kernel modules that circumvent that protection.



Regards,
Bernhard

  parent reply	other threads:[~2008-11-16 15:20 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-16 14:47 Turn CONFIG_STRICT_DEVMEM in sysctl dev.mem.restricted Bernhard Walle
2008-11-16 14:47 ` [PATCH 1/3] Unify devmem_is_allowed across architectures Bernhard Walle
2008-11-16 14:47 ` [PATCH 2/3] Add dev.mem.restricted sysctl Bernhard Walle
2008-11-16 15:07   ` Willy Tarreau
2008-11-16 14:47 ` [PATCH 3/3] Remove CONFIG_STRICT_DEVMEM Bernhard Walle
2008-11-16 15:09   ` Alan Cox
2008-11-16 15:09     ` Alan Cox
2008-11-16 15:21     ` Bernhard Walle
2008-11-16 15:46       ` Alan Cox
2008-11-16 15:46         ` Alan Cox
2008-11-17 13:57       ` David Howells
2008-11-16 15:07 ` Turn CONFIG_STRICT_DEVMEM in sysctl dev.mem.restricted Alan Cox
2008-11-16 15:07   ` Alan Cox
2008-11-16 15:20   ` Bernhard Walle [this message]
2008-11-16 15:45     ` Alan Cox
2008-11-16 15:45       ` Alan Cox
2008-11-16 16:03       ` Arjan van de Ven
2008-11-16 16:09         ` Alan Cox
2008-11-16 16:09           ` Alan Cox
2008-11-16 16:19         ` Bernhard Walle
2008-11-16 16:11       ` Bernhard Walle
2008-11-16 17:03         ` Alan Cox
2008-11-16 17:03           ` Alan Cox
2008-11-16 15:39 ` Arjan van de Ven
2008-11-16 15:39   ` Arjan van de Ven
2008-11-16 15:56   ` Bernhard Walle
2008-11-16 16:06     ` Arjan van de Ven
2008-11-16 20:32   ` H. Peter Anvin

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=20081116162003.04267538@kopernikus.site \
    --to=bwalle@suse.de \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=crash-utility@redhat.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --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