public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Jan Beulich <jbeulich@novell.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	Chris Lalancette <clalance@redhat.com>,
	linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>
Subject: Re: [Xen-devel] [PATCH]: Fix Xen domU boot with batched			 mprotect
Date: Fri, 17 Oct 2008 08:19:19 -0700	[thread overview]
Message-ID: <48F8ACF7.6050905@goop.org> (raw)
In-Reply-To: <48F85711.76E4.0078.0@novell.com>

Jan Beulich wrote:
>>>> Jeremy Fitzhardinge <jeremy@goop.org> 16.10.08 18:10 >>>
>>>>         
>> The current x86-64 implementation is:
>>
>> bool __virt_addr_valid(unsigned long x)
>> {
>> 	if (x >= __START_KERNEL_map) {
>> 		x -= __START_KERNEL_map;
>> 		if (x >= KERNEL_IMAGE_SIZE)
>> 			return false;
>>     
>
> This, imo, is still broken (i.e. the name of the function still isn't matched
> by the implementation): KERNEL_IMAGE_SIZE is a constant and doesn't
> account for the fact that only the real kernel image can be relied upon
> to be mapped.
>   

Perhaps, but I don't think it matters too much.  Unless you have a tiny 
amount of physical memory, locations in the kernel mapping beyond the 
actual kernel will still resolve to proper locations in the linear map.

>> and 32-bit is similar (but simpler, since it doesn't need to worry about a separate kernel mapping).
>>     
>
> This continues to be broken, but not as badly as it used to be - while it
> now covers user space and the vmalloc area (I'm unclear why this is
> excluded only after booting completed, though), hypervisor space
> continues to not be considered here.
>
> But as mentioned before - excluding the vmalloc area seems bogus wrt
> the name of the function, but as I take it the confusion here is intended.
>   

I think a strictly correct name for the function would be 
can_i_use___pa_on_this_address(vaddr).  It isn't 
is_this_really_an_addressable_location(vaddr).

    J

  reply	other threads:[~2008-10-17 15:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-15 11:03 [PATCH]: Fix Xen domU boot with batched mprotect Chris Lalancette
2008-10-15 15:24 ` [Xen-devel] " Jan Beulich
2008-10-15 16:23   ` Jeremy Fitzhardinge
2008-10-16  7:28     ` Jan Beulich
2008-10-16  9:58     ` Jan Beulich
2008-10-16 16:10       ` Jeremy Fitzhardinge
2008-10-17  7:12         ` Jan Beulich
2008-10-17 15:19           ` Jeremy Fitzhardinge [this message]
2008-10-17 15:30             ` Jan Beulich
2008-10-17 15:36               ` Jeremy Fitzhardinge

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=48F8ACF7.6050905@goop.org \
    --to=jeremy@goop.org \
    --cc=clalance@redhat.com \
    --cc=jbeulich@novell.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=xen-devel@lists.xensource.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