1. 18 May, 2011 3 commits
    • Fenghua Yu's avatar
      x86, cpu: Enable/disable Supervisor Mode Execution Protection · de5397ad
      Fenghua Yu authored
      Enable/disable newly documented SMEP (Supervisor Mode Execution Protection) CPU
      feature in kernel. CR4.SMEP (bit 20) is 0 at power-on. If the feature is
      supported by CPU (X86_FEATURE_SMEP), enable SMEP by setting CR4.SMEP. New kernel
      option nosmep disables the feature even if the feature is supported by CPU.
      
      [ hpa: moved the call to setup_smep() until after the vendor-specific
        initialization; that ensures that CPUID features are unmasked.  We
        will still run it before we have userspace (never mind uncontrolled
        userspace). ]
      Signed-off-by: default avatarFenghua Yu <fenghua.yu@intel.com>
      LKML-Reference: <1305157865-31727-1-git-send-email-fenghua.yu@intel.com>
      Signed-off-by: default avatarH. Peter Anvin <hpa@linux.intel.com>
      de5397ad
    • Fenghua Yu's avatar
      x86, cpu: Add SMEP CPU feature in CR4 · dc23c0bc
      Fenghua Yu authored
      Add support for newly documented SMEP (Supervisor Mode Execution Protection)
      CPU feature in CR4.
      Signed-off-by: default avatarFenghua Yu <fenghua.yu@intel.com>
      LKML-Reference: <1305683069-25394-3-git-send-email-fenghua.yu@intel.com>
      Signed-off-by: default avatarH. Peter Anvin <hpa@linux.intel.com>
      dc23c0bc
    • Fenghua Yu's avatar
      x86, cpufeature: Add cpufeature flag for SMEP · d0281a25
      Fenghua Yu authored
      Add support for newly documented SMEP (Supervisor Mode Execution Protection) CPU
      feature flag.
      
      SMEP prevents the CPU in kernel-mode to jump to an executable page
      that has the user flag set in the PTE.  This prevents the kernel from
      executing user-space code accidentally or maliciously, so it for
      example prevents kernel exploits from jumping to specially prepared
      user-mode shell code.
      
      [ hpa: added better description by Ingo Molnar ]
      Signed-off-by: default avatarFenghua Yu <fenghua.yu@intel.com>
      LKML-Reference: <1305683069-25394-2-git-send-email-fenghua.yu@intel.com>
      Signed-off-by: default avatarH. Peter Anvin <hpa@linux.intel.com>
      d0281a25
  2. 17 May, 2011 2 commits
  3. 10 May, 2011 2 commits
  4. 09 May, 2011 27 commits
  5. 08 May, 2011 6 commits