All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: xen-devel <xen-devel@lists.xenproject.org>, Keir Fraser <keir@xen.org>
Subject: Re: [PATCH 4/4] x86: check for canonical address before doing page walks
Date: Thu, 10 Oct 2013 15:17:40 +0100	[thread overview]
Message-ID: <5256B704.1010206@citrix.com> (raw)
In-Reply-To: <5256D16902000078000FA46C@nat28.tlf.novell.com>

On 10/10/13 15:10, Jan Beulich wrote:
>>>> On 10.10.13 at 16:01, Andrew Cooper <andrew.cooper3@citrix.com> wrote:
>> On 10/10/13 14:55, Jan Beulich wrote:
>>> --- a/xen/arch/x86/x86_64/traps.c
>>> +++ b/xen/arch/x86/x86_64/traps.c
>>> @@ -170,6 +170,8 @@ void show_page_walk(unsigned long addr)
>>>      l1_pgentry_t l1e, *l1t;
>>>  
>>>      printk("Pagetable walk from %016lx:\n", addr);
>>> +    if ( !is_canonical_address(addr) )
>>> +        return;
>>>  
>>>      l4t = map_domain_page(mfn);
>>>      l4e = l4t[l4_table_offset(addr)];
>>>
>> I was intending something a little more like
>>
>> if ( !is_canonical_address(addr) )
>> {
>>     printk(" Not canonical\n");
>>     return;
>> }
>>
>> So it doesn't appear on the console that show_page_walk() got stuck
>> somewhere.
> Seems pretty pointless - the address is being printed, and anyone
> (I would hope) can easily see whether it is non-canonical.
>
> Jan
>

True I suppose, although it would start getting harder if/when the
non-canonical section shrinks in size.

I would prefer the printk(), but am not overly fussed and the other fix
is certainly good, so

Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>

  reply	other threads:[~2013-10-10 14:17 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-10 13:49 [PATCH 0/4] x86: XSA-67 follow-up Jan Beulich
2013-10-10 13:53 ` [PATCH 1/4] x86: correct LDT checks Jan Beulich
2013-10-10 13:54 ` [PATCH 2/4] x86: add address validity check to guest_map_l1e() Jan Beulich
2013-10-10 13:57   ` Andrew Cooper
2013-10-10 13:54 ` [PATCH 3/4] x86: use {rd, wr}{fs, gs}base when available Jan Beulich
2013-10-10 14:15   ` Andrew Cooper
2013-10-10 13:55 ` [PATCH 4/4] x86: check for canonical address before doing page walks Jan Beulich
2013-10-10 14:01   ` Andrew Cooper
2013-10-10 14:10     ` Jan Beulich
2013-10-10 14:17       ` Andrew Cooper [this message]
2013-10-10 15:13 ` [PATCH 0/4] x86: XSA-67 follow-up Keir Fraser

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=5256B704.1010206@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=keir@xen.org \
    --cc=xen-devel@lists.xenproject.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.