From: Ingo Molnar <mingo@elte.hu>
To: Petr Tesarik <ptesarik@suse.cz>
Cc: Christoph Hellwig <hch@infradead.org>,
Andrew Morton <akpm@linux-foundation.org>,
Fenghua Yu <fenghua.yu@intel.com>,
"H. Peter Anvin" <hpa@zytor.com>, Ingo Molnar <mingo@redhat.com>,
Paul Mundt <lethal@linux-sh.org>,
Russell King <linux@arm.linux.org.uk>,
Thomas Gleixner <tglx@linutronix.de>,
Tony Luck <tony.luck@intel.com>,
x86@kernel.org, linux-arm-kernel@lists.infradead.org,
linux-ia64@vger.kernel.org, linux-sh@vger.kernel.org,
linux-kernel@vger.kernel.org,
Arjan van de Ven <arjan@infradead.org>,
Dave Jones <davej@redhat.com>,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [PATCH 00/10] Enhance /dev/mem to allow read/write of arbitrary physical addresses
Date: Fri, 1 Jul 2011 17:36:34 +0200 [thread overview]
Message-ID: <20110701153634.GA27407@elte.hu> (raw)
In-Reply-To: <201107011654.06651.ptesarik@suse.cz>
* Petr Tesarik <ptesarik@suse.cz> wrote:
> Dne Pá 1. července 2011 16:46:41 Ingo Molnar napsal(a):
> > * Christoph Hellwig <hch@infradead.org> wrote:
> > > On Fri, Jul 01, 2011 at 04:37:35PM +0200, Ingo Molnar wrote:
> > > > After initial modules have loaded i essentially disable crash.ko
> > > > via /proc/sys/kernel/modules_disabled so rootkits have to work a
> > > > bit harder than that.
> > >
> > > Not sure for fedora as I don'[t have a kernel tree at hand right
> > > now, but for x86 systems at least RHEL6 has the module built in.
> > > [...]
> >
> > Fedora Rawhide has it modular:
> >
> > # grep CRASH /boot/config-2.6.38-0.rc7.git2.3.fc16.x86_64
> > CONFIG_CRASH=m
> >
> > # rpm -ql kernel-2.6.38-0.rc7.git2.3.fc16.x86_64 | grep crash
> > /lib/modules/2.6.38-0.rc7.git2.3.fc16.x86_64/kernel/drivers/char/crash.ko
> >
> > > [...] Either way we'll need some way to support crash properly in
> > > mainline, preferably in a boot-time opt-in way. [...]
> >
> > Yes, boot-time opt-in was what i suggested.
> >
> > > [...] I'd tend slightly toward optionally enabling /dev/mem for it
> > > instead of a separate driver, but if people prefer a different
> > > route I'm fine, too.
> >
> > No, sharing the driver is perfectly fine and sane as long as this
> > weird usage is not enabled widely.
>
> Note that if you want to solve the Fedora case, you want to make
> STRICT_DEVMEM run-time configurable. My patch set does nothing
> about it. It merely tries to fix the highmem deficiency (actually,
> the first patch is a plain bugfix on any architecture where loff_t
> is larger than long).
I'm not focused on Fedora here (i brought it up as an example). I'd
like to improve upstream, and if that is done Fedora can just go use
it and symlink /dev/mem to /dev/crash.
> The STRICT_DEVMEM logic is implemented in range_is_allowed(), and I
> leave it as-is.
>
> > > Note that for normal crash usage read only access is just fine.
> >
> > That's true as well. Petr?
>
> Yes, that's true. Although there is some write support in crash, I
> have never ever felt the need to use it, and I've been using crash
> a lot in the last 5 years.
If you make it a read-only thing then that removes many of the
negative aspects of this feature.
Also, does Xorg really need the first 1MB truly write-mapped? Last i
checked it needed it for the BIOS ...
So we could kill multiple birds with the same stone here:
- remove various ugly uses of /dev/mem (including the rootkit usage),
with or without strict-devmem
- extending it to above-4G for inspection purposes
- allowing to kill /dev/mem access runtime similar to the
disable_modules lock-down killswitch, for the so inclined.
Would you be interested in modifying your patch-set in such a
fashion?
Thanks,
Ingo
next prev parent reply other threads:[~2011-07-01 15:36 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-17 8:38 Petr Tesarik
2011-06-17 8:43 ` [PATCH 01/10] Return EOF on out-of-bounds read from /dev/mem Petr Tesarik
2011-06-17 8:44 ` [PATCH 02/10] (un)xlate_dev_mem_ptr: use phys_addr_t for the @phys parameter Petr Tesarik
2011-06-17 8:45 ` [PATCH 03/10] x86: translate highmem /dev/mem pointers Petr Tesarik
2011-06-17 8:45 ` [PATCH 04/10] ia64: change xlate_dev_mem_ptr's argument to phys_addr_t Petr Tesarik
2011-06-17 8:45 ` [PATCH 05/10] valid_phys_addr_range: use phys_addr_t for the @addr parameter Petr Tesarik
2011-06-17 8:46 ` [PATCH 06/10] sh: change valid_phys_addr_range's @addr param to phys_addr_t Petr Tesarik
2011-06-17 8:46 ` [PATCH 07/10] arm: " Petr Tesarik
2011-06-17 8:47 ` [PATCH 08/10] ia64: " Petr Tesarik
2011-06-17 8:48 ` [PATCH 09/10] x86: provide arch-specific valid_phys_addr_range() Petr Tesarik
2011-06-17 8:48 ` [PATCH 10/10] Allow reading/writing all memory through /dev/mem Petr Tesarik
2011-06-17 9:30 ` [PATCH 00/10] Enhance /dev/mem to allow read/write of arbitrary physical addresses Ingo Molnar
2011-06-17 9:41 ` Russell King - ARM Linux
2011-06-17 9:55 ` Petr Tesarik
2011-06-20 2:42 ` Américo Wang
2011-06-27 7:46 ` Petr Tesarik
2011-06-19 23:02 ` Ryan Mallon
2011-06-19 23:44 ` H. Peter Anvin
2011-06-20 7:41 ` Ingo Molnar
2011-06-20 15:59 ` H. Peter Anvin
2011-06-20 16:40 ` Ingo Molnar
2011-06-20 16:44 ` H. Peter Anvin
2011-06-21 6:55 ` Srivatsa Vaddagiri
2011-06-20 0:42 ` Matthew Wilcox
2011-06-20 0:46 ` Ryan Mallon
2011-06-20 0:52 ` Matthew Wilcox
2011-06-20 1:02 ` Ryan Mallon
2011-06-20 7:31 ` Ingo Molnar
2011-06-20 8:03 ` Ryan Mallon
2011-06-20 17:10 ` Ray Lee
2011-06-29 9:05 ` Petr Tesarik
2011-07-01 12:58 ` Ingo Molnar
2011-07-01 13:43 ` Petr Tesarik
2011-07-01 13:47 ` Christoph Hellwig
2011-07-01 14:37 ` Ingo Molnar
2011-07-01 14:41 ` Christoph Hellwig
2011-07-01 14:46 ` Ingo Molnar
2011-07-01 14:54 ` Petr Tesarik
2011-07-01 15:36 ` Ingo Molnar [this message]
2011-07-01 16:00 ` H. Peter Anvin
2011-07-01 16:13 ` Ingo Molnar
2011-07-01 19:34 ` Petr Tesarik
2011-07-01 19:56 ` Ingo Molnar
2011-07-01 20:44 ` Petr Tesarik
2011-07-03 19:46 ` Ingo Molnar
2011-07-05 17:49 ` Matthew Garrett
2011-07-05 17:56 ` H. Peter Anvin
2011-07-05 22:34 ` H. Peter Anvin
2011-06-20 13:24 Dave Anderson
2011-06-21 2:52 ` Cong Wang
2011-06-21 13:03 ` Dave Anderson
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=20110701153634.GA27407@elte.hu \
--to=mingo@elte.hu \
--cc=akpm@linux-foundation.org \
--cc=arjan@infradead.org \
--cc=davej@redhat.com \
--cc=fenghua.yu@intel.com \
--cc=hch@infradead.org \
--cc=hpa@zytor.com \
--cc=lethal@linux-sh.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=mingo@redhat.com \
--cc=ptesarik@suse.cz \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
--cc=torvalds@linux-foundation.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
all inboxes | Powered by JetHome®