From: Petr Vandrovec <vandrove@vc.cvut.cz>
To: Manfred Spraul <manfred@colorfullife.com>
Cc: Dave Jones <davej@redhat.com>, linux-kernel@vger.kernel.org
Subject: Re: EFAULT reading /dev/mem... - broken x86info
Date: Mon, 10 Nov 2003 19:05:51 +0100 [thread overview]
Message-ID: <20031110180551.GA20168@vana.vc.cvut.cz> (raw)
In-Reply-To: <3FAFC831.4090108@colorfullife.com>
On Mon, Nov 10, 2003 at 06:17:37PM +0100, Manfred Spraul wrote:
> DEBUG_PAGEALLOC unmaps pages on kmem_cache_free and __free_pages(). The
> pages are mapped again during get_free_pages and kmem_cache_alloc.
>
> 0x86000 looks like a normal page - what guarantees that it's not used by
> the kernel?
With DEBUG_PAGEALLOC there is no problem with page if it is USED by the kernel.
Problem is if page is NOT USED - in this case kernel does not have it in its
mapping, and bad thing happen.
x86info (and other simillar tools for dumping different BIOS structures) just
scans physical memory for some well known signatures - hoping that kernel did
not smash these structures.
Up to now it was possible to read whole physical memory from userspace - some
pages by reading /dev/mem, some pages by mmaping /dev/mem. Now it is not possible
anymore - which I think is bad, as /dev/mem has semantic of it. Manual (mem(4))
says that "mem is a character device file that is an image of the main memory
of the computer. It may be used, for example, to examine (and even patch) the
system." I have no idea what POSIX says about /dev/mem being unreadable...
Thanks anyway. As DEBUG_PAGEALLOC did not catch memory corruption I'm seeing,
I'll disable it.
Best regards,
Petr Vandrovec
next prev parent reply other threads:[~2003-11-10 18:06 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-08 16:27 Petr Vandrovec
2003-11-10 13:55 ` Richard B. Johnson
2003-11-10 16:11 ` Dave Jones
2003-11-10 16:50 ` Manfred Spraul
2003-11-10 16:56 ` Dave Jones
2003-11-10 17:17 ` Manfred Spraul
2003-11-10 18:05 ` Petr Vandrovec [this message]
2003-11-10 18:59 ` Manfred Spraul
2003-11-10 19:36 ` Mika Penttilä
2003-11-10 19:47 ` Manfred Spraul
2003-11-10 20:24 ` Dave Jones
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=20031110180551.GA20168@vana.vc.cvut.cz \
--to=vandrove@vc.cvut.cz \
--cc=davej@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=manfred@colorfullife.com \
/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®