From: Thavatchai Makphaibulchoke <thavatchai.makpahibulchoke@hp.com>
To: Matthew Garrett <mjg@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>, T Makphaibulchoke <tmac@hp.com>,
tglx@linutronix.de, mingo@redhat.com, x86@kernel.org,
akpm@linux-foundation.org, yinghai@kernel.org, tiwai@suse.de,
viro@zeniv.linux.org.uk, aarcange@redhat.com,
tony.luck@intel.com, mgorman@suse.de, weiyang@linux.vnet.ibm.com,
octavian.purdila@intel.com, paul.gortmaker@windriver.com,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH] Fix devmem_is_allowed for below 1MB accesses for an efi machine
Date: Tue, 02 Oct 2012 23:13:17 -0600 [thread overview]
Message-ID: <506BC96D.10507@hp.com> (raw)
In-Reply-To: <20121003051522.GA27113@srcf.ucam.org>
Thank you both for the comments.
Sounds like a better solution is to allow accesses to only I/O regions
presented in the EFI memory map for physical addresses below 1 MB.
Do we need to worry about the X checksum in the first MB on an EFI system?
Thanks,
Mak.
On 10/02/2012 11:15 PM, Matthew Garrett wrote:
> On Tue, Oct 02, 2012 at 09:44:16PM -0700, H. Peter Anvin wrote:
>
>> We *always* expose the I/O regions to /dev/mem. That is what /dev/mem
>> *does*. The above is an exception (which is really obsolete, too: we
>> should simply disallow access to anything which is treated as system
>> RAM, which doesn't include the BIOS regions in question; the only reason
>> we don't is that some versions of X take a checksum of the RAM in the
>> first megabyte as some kind of idiotic random seed.)
>
> Oh, right, got you. In that case I think we potentially need a
> finer-grained check on EFI platforms - the EFI memory map is kind enough
> to tell us the difference between unusable regions and io regions, and
> we could avoid access to the unusable ones.
>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
WARNING: multiple messages have this Message-ID (diff)
From: Thavatchai Makphaibulchoke <thavatchai.makpahibulchoke@hp.com>
To: Matthew Garrett <mjg@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>, T Makphaibulchoke <tmac@hp.com>,
tglx@linutronix.de, mingo@redhat.com, x86@kernel.org,
akpm@linux-foundation.org, yinghai@kernel.org, tiwai@suse.de,
viro@zeniv.linux.org.uk, aarcange@redhat.com,
tony.luck@intel.com, mgorman@suse.de, weiyang@linux.vnet.ibm.com,
octavian.purdila@intel.com, paul.gortmaker@windriver.com,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH] Fix devmem_is_allowed for below 1MB accesses for an efi machine
Date: Tue, 02 Oct 2012 23:13:17 -0600 [thread overview]
Message-ID: <506BC96D.10507@hp.com> (raw)
In-Reply-To: <20121003051522.GA27113@srcf.ucam.org>
Thank you both for the comments.
Sounds like a better solution is to allow accesses to only I/O regions
presented in the EFI memory map for physical addresses below 1 MB.
Do we need to worry about the X checksum in the first MB on an EFI system?
Thanks,
Mak.
On 10/02/2012 11:15 PM, Matthew Garrett wrote:
> On Tue, Oct 02, 2012 at 09:44:16PM -0700, H. Peter Anvin wrote:
>
>> We *always* expose the I/O regions to /dev/mem. That is what /dev/mem
>> *does*. The above is an exception (which is really obsolete, too: we
>> should simply disallow access to anything which is treated as system
>> RAM, which doesn't include the BIOS regions in question; the only reason
>> we don't is that some versions of X take a checksum of the RAM in the
>> first megabyte as some kind of idiotic random seed.)
>
> Oh, right, got you. In that case I think we potentially need a
> finer-grained check on EFI platforms - the EFI memory map is kind enough
> to tell us the difference between unusable regions and io regions, and
> we could avoid access to the unusable ones.
>
next prev parent reply other threads:[~2012-10-03 5:20 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-02 21:32 [PATCH] Fix devmem_is_allowed for below 1MB accesses for an efi machine T Makphaibulchoke
2012-10-02 21:32 ` T Makphaibulchoke
2012-10-02 21:50 ` H. Peter Anvin
2012-10-02 21:50 ` H. Peter Anvin
2012-10-03 4:31 ` Matthew Garrett
2012-10-03 4:31 ` Matthew Garrett
2012-10-03 4:44 ` H. Peter Anvin
2012-10-03 4:44 ` H. Peter Anvin
2012-10-03 5:15 ` Matthew Garrett
2012-10-03 5:15 ` Matthew Garrett
2012-10-03 5:13 ` Thavatchai Makphaibulchoke [this message]
2012-10-03 5:13 ` Thavatchai Makphaibulchoke
2012-10-03 5:28 ` Matthew Garrett
2012-10-03 5:28 ` Matthew Garrett
2012-10-03 5:35 ` H. Peter Anvin
2012-10-03 5:35 ` H. Peter Anvin
2012-10-03 5:27 ` H. Peter Anvin
2012-10-03 5:27 ` H. Peter Anvin
[not found] <jQim6-6MC-7@gated-at.bofh.it>
[not found] ` <jQiFt-6UB-13@gated-at.bofh.it>
[not found] ` <jQoUx-33k-3@gated-at.bofh.it>
[not found] ` <jQp4d-37r-3@gated-at.bofh.it>
[not found] ` <jQpxf-3Cv-1@gated-at.bofh.it>
2012-10-04 20:07 ` Randy Wright
2012-10-04 21:06 ` 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=506BC96D.10507@hp.com \
--to=thavatchai.makpahibulchoke@hp.com \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=mjg@redhat.com \
--cc=octavian.purdila@intel.com \
--cc=paul.gortmaker@windriver.com \
--cc=tglx@linutronix.de \
--cc=tiwai@suse.de \
--cc=tmac@hp.com \
--cc=tony.luck@intel.com \
--cc=viro@zeniv.linux.org.uk \
--cc=weiyang@linux.vnet.ibm.com \
--cc=x86@kernel.org \
--cc=yinghai@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.