lkml.org 
[lkml]   [2008]   [Jan]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Subject[PATCH 4 of 4] x86: mask NX from pte_pfn
    Date
    From
    In 32-bit PAE, mask NX from pte_pfn, since it isn't part of the PFN.
    This code is due for unification anyway, but this fixes a latent bug.

    Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>

    ---
    include/asm-x86/pgtable-3level.h | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/include/asm-x86/pgtable-3level.h b/include/asm-x86/pgtable-3level.h
    --- a/include/asm-x86/pgtable-3level.h
    +++ b/include/asm-x86/pgtable-3level.h
    @@ -139,7 +139,7 @@ static inline int pte_none(pte_t pte)

    static inline unsigned long pte_pfn(pte_t pte)
    {
    - return pte_val(pte) >> PAGE_SHIFT;
    + return (pte_val(pte) >> PAGE_SHIFT) & ~_PAGE_NX;
    }

    /*



    \
     
     \ /
      Last update: 2008-01-15 23:31    [W:0.018 / U:59.292 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site