From: Willy Tarreau <w@1wt.eu>
To: Bernhard Walle <bwalle@suse.de>
Cc: x86@kernel.org, linux-kernel@vger.kernel.org,
linux-arch@vger.kernel.org, crash-utility@redhat.com
Subject: Re: [PATCH 2/3] Add dev.mem.restricted sysctl
Date: Sun, 16 Nov 2008 16:07:56 +0100 [thread overview]
Message-ID: <20081116150756.GA24654@1wt.eu> (raw)
In-Reply-To: <1226846868-9595-3-git-send-email-bwalle@suse.de>
On Sun, Nov 16, 2008 at 03:47:47PM +0100, Bernhard Walle wrote:
> When CONFIG_STRICT_DEVMEM is set, live debugging is not possible with the
> crash utility (see http://people.redhat.com/~anderson). For distributors
> who ship a generic kernel it's difficult: Disabling CONFIG_STRICT_DEVMEM
> is possible, but in general the protection provided by CONFIG_STRICT_DEVMEM
> is useful. However, live debugging should be still neceessary.
>
> This patch now adds a dev.mem.restricted sysctl that defaults to 0 (off).
> When set to 1 (on), /dev/mem access is unrestricted and crash can be used.
I like your approach. I use /dev/mem a lot for debugging purposes, and
even sometimes to recover important data from memory after a crash has
occurred. Having the ability to inspect memory again by setting a sysctl
seems very appealing to me.
> >From a security point of view the sysctl should be no problem. It's already
> possible to circumvent that restriction if you have root access by loading
> a kernel module that installs a kretprobe that returns 1 for the check function.
I agree.
> I thought of a command line parameter first, but we already have lots of
> command line parameters and rebooting the machine is more difficult than
> just setting a sysctl to 1. It may be possible to implement setting that
> variable in the tools automatically, but that's out of the scope of that
> patch for the kernel and should also not be discussed on LKML.
Rebooting the machine voids any ability to debug or recover data, so the
sysctl is the way to go IMHO.
Regards,
Willy
next prev parent reply other threads:[~2008-11-16 15:08 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 [this message]
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
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=20081116150756.GA24654@1wt.eu \
--to=w@1wt.eu \
--cc=bwalle@suse.de \
--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