13 Feb, 2010

1 commit


17 Nov, 2009

3 commits

  • Function prototypes don't need "extern", and it is generally frowned
    upon to have them.

    Signed-off-by: H. Peter Anvin

    H. Peter Anvin
     
  • It is possible for x86_64 systems to lack the NX bit either due to the
    hardware lacking support or the BIOS having turned off the CPU capability,
    so NX status should be reported. Additionally, anyone booting NX-capable
    CPUs in 32bit mode without PAE will lack NX functionality, so this change
    provides feedback for that case as well.

    Signed-off-by: Kees Cook
    Signed-off-by: H. Peter Anvin
    LKML-Reference:

    Kees Cook
     
  • The 32- and 64-bit code used very different mechanisms for enabling
    NX, but even the 32-bit code was enabling NX in head_32.S if it is
    available. Furthermore, we had a bewildering collection of tests for
    the available of NX.

    This patch:

    a) merges the 32-bit set_nx() and the 64-bit check_efer() function
    into a single x86_configure_nx() function. EFER control is left
    to the head code.

    b) eliminates the nx_enabled variable entirely. Things that need to
    test for NX enablement can verify __supported_pte_mask directly,
    and cpu_has_nx gives the supported status of NX.

    Signed-off-by: H. Peter Anvin
    Cc: Tejun Heo
    Cc: Brian Gerst
    Cc: Yinghai Lu
    Cc: Pekka Enberg
    Cc: Vegard Nossum
    Cc: Jeremy Fitzhardinge
    Cc: Chris Wright
    LKML-Reference:
    Acked-by: Kees Cook

    H. Peter Anvin
     

03 Jul, 2009

1 commit

  • These macros had two bugs:
    - the type of the mask was not correctly expanded to the full size of
    the argument being expanded, resulting in possible loss of high bits
    when mixing types.
    - the alignment argument was evaluated twice, despite the macro looking
    like a fancy function (but it really does need to be a macro, since
    it works on arbitrary integer types)

    Noticed by Peter Anvin, and with a fix that is a modification of his
    suggestion (bug noticed by Yinghai Lu).

    Cc: Peter Anvin
    Cc: Yinghai Lu
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

29 Jan, 2009

1 commit


23 Oct, 2008

2 commits