[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 4/4] x86: check for canonical address before doing page walks
On 10/10/13 15:10, Jan Beulich wrote: >>>> On 10.10.13 at 16:01, Andrew Cooper <andrew.cooper3@xxxxxxxxxx> 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@xxxxxxxxxx> _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |