lkml.org 
[lkml]   [2008]   [Jan]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: unify pagetable accessors patch causes double fault II
> OK, I see the problem.  The problem is that the _PAGE_X defines are 
> defined with _AC(UL, 1 << _PAGE_BIT_X), which has unsigned long type.
> This means that ~_PAGE_X also has unsigned long type, and so when cast
> to 64-bit in pte_mkX, it ends up &ing the pte with 0x00000000ffffffxxx,
> with predictable results.

Actually I fixed some of that -- see the pgtable-nx patch on firstfloor -- but
it still doesn't work. Or maybe my patch was not complete.
>
> The original code just used signed constants for the _PAGE_X
> definitions, which will sign-extend when cast to 64-bit, and so have the
> upper bits set when masking. (Well, actually, the old code just
> operated on pte_low, so the problem didn't arise; however, pgtable_64.h
> also uses integers for its _PAGE_X, which has the same sign-extended
> 32->64 casting property).
>
> I'll put together a fixup patch now.

I'm leaving now but can test later.

-Andi


\
 
 \ /
  Last update: 2008-01-14 23:31    [W:0.061 / U:1.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site