From: "Luck, Tony" <tony.luck@intel.com>
To: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: linux-kernel@vger.kernel.org, Andrew Morton <akpm@osdl.org>,
linux-ia64@vger.kernel.org
Subject: Re: [patch 2/2] /dev/mem validate mmap requests
Date: Thu, 15 Dec 2005 14:06:40 -0800 [thread overview]
Message-ID: <20051215220640.GA8967@agluck-lia64.sc.intel.com> (raw)
In-Reply-To: <200512140848.56570.bjorn.helgaas@hp.com>
On Wed, Dec 14, 2005 at 08:48:56AM -0700, Bjorn Helgaas wrote:
> > I think you may need a more complex checker that does aggregation
> > of adjacent efi memory descriptors with the same attributes.
>
> We could, but I don't think it's worth it at this point. We've
> been using the same simple-minded scheme for validating /dev/mem
> read & write requests for quite a while with no problems, and I
> don't want to over-engineer this.
Here's the spot in the efi memory map that worried me:
4000000 - 4a54000 type=2 attr=b
4a54000 - ff80000 type=7 attr=b
The first of these two blocks is the space that Elilo allocated
to hold the kernel, the second is the remainder of memory in
the block of same-attribute memory. In this case the boundary
is on a 16K boundary, so all is well. But is this guaranteed
to work?
Booting a kernel with a 64K pagesize, I see:
4000000 - 4aa0000 type=2 attr=b
4aa0000 - ff80000 type=7 attr=b
So perhaps this is ok ... maybe the size of the kernel
will always come out as a whole number of pages?
But looking further down the map (on the 64K boot) I see:
180000000 - 1fedfa000 type=7 attr=b
1fedfa000 - 1fee00000 type=2 attr=b
1fee00000 - 1fee01000 type=7 attr=b
1fee01000 - 1fef56000 type=2 attr=b
1fef56000 - 1fefae000 type=1 attr=b
1fefae000 - 1fefb8000 type=2 attr=b
1fefb8000 - 1feffe000 type=1 attr=b
1feffe000 - 1ff454000 type=7 attr=b
1ff454000 - 1ff801000 type=4 attr=b
1ff801000 - 1ff8cc000 type=7 attr=b
1ff8cc000 - 1ff904000 type=4 attr=b
1ff904000 - 1ff908000 type=7 attr=b
1ff908000 - 1ff90a000 type=4 attr=b
Now these EFI areas all have the same attributes, but the boundaries
are not neatly aligned to kernel page size.
-Tony
next prev parent reply other threads:[~2005-12-15 22:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-14 0:25 [patch 2/2] /dev/mem validate mmap requests Luck, Tony
2005-12-14 15:48 ` Bjorn Helgaas
2005-12-15 22:06 ` Luck, Tony [this message]
2005-12-20 20:53 ` Bjorn Helgaas
2005-12-22 21:49 ` Bjorn Helgaas
-- strict thread matches above, loose matches on Subject: below --
2005-12-13 23:56 Bjorn Helgaas
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=20051215220640.GA8967@agluck-lia64.sc.intel.com \
--to=tony.luck@intel.com \
--cc=akpm@osdl.org \
--cc=bjorn.helgaas@hp.com \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.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;
as well as URLs for NNTP newsgroup(s).