lkml.org 
[lkml]   [2008]   [Mar]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: bisected boot regression post 2.6.25-rc3.. please revert
Segher Boessenkool wrote:
>>> so (on 32-bit) ~_PAGE_PSE is ~0x80L is 0xffffff7f, which when cast to
>>> 64-bit is 0x00000000ffffff7f,
>>
>> Actually, it is signed, so this isn't true. Comments about unsafeness
>> still apply.
>
> It turns out that PAGE_SIZE is unsigned. So this gives us for
>
> (~PAGE_MASK & ~_PAGE_USER & ~_PAGE_PSE & ~_PAGE_NX)
>
> the types UL, L, L, ULL resp.
>
> The associativity of & is left-to-right, so this in turn becomes
>
> UL, L, ULL
>
> UL, ULL
>
> ULL
>
> and that cast from UL to ULL doesn't sign-extend.
>

All the masks either need to be the proper size or signed.

-hpa


\
 
 \ /
  Last update: 2008-03-04 00:01    [W:0.044 / U:0.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site