[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080114222349.GA23409@one.firstfloor.org>
Date: Mon, 14 Jan 2008 23:23:49 +0100
From: Andi Kleen <andi@...stfloor.org>
To: Jeremy Fitzhardinge <jeremy@...p.org>
Cc: Andi Kleen <andi@...stfloor.org>, Ingo Molnar <mingo@...e.hu>,
tglx@...utronix.de, linux-kernel@...r.kernel.org
Subject: Re: 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists