Skip to content
Snippets Groups Projects
  1. Oct 19, 2010
    • Jan Beulich's avatar
      x86, asm: Fix CFI macro invocations to deal with shortcomings in gas · 3234282f
      Jan Beulich authored
      
      gas prior to (perhaps) 2.16.90 has problems with passing non-
      parenthesized expressions containing spaces to macros. Spaces, however,
      get inserted by cpp between any macro expanding to a number and a
      subsequent + or -. For the +, current x86 gas then removes the space
      again (future gas may not do so), but for the - the space gets retained
      and is then considered a separator between macro arguments.
      
      Fix the respective definitions for both the - and + cases, so that they
      neither contain spaces nor make cpp insert any (the latter by adding
      seemingly redundant parentheses).
      
      Signed-off-by: default avatarJan Beulich <jbeulich@novell.com>
      LKML-Reference: <4CBDBEBA020000780001E05A@vpn.id2.novell.com>
      Cc: Alexander van Heukelum <heukelum@fastmail.fm>
      Signed-off-by: default avatarH. Peter Anvin <hpa@linux.intel.com>
      3234282f
  2. Feb 10, 2009
    • Tejun Heo's avatar
      x86: implement x86_32 stack protector · 60a5317f
      Tejun Heo authored
      
      Impact: stack protector for x86_32
      
      Implement stack protector for x86_32.  GDT entry 28 is used for it.
      It's set to point to stack_canary-20 and have the length of 24 bytes.
      CONFIG_CC_STACKPROTECTOR turns off CONFIG_X86_32_LAZY_GS and sets %gs
      to the stack canary segment on entry.  As %gs is otherwise unused by
      the kernel, the canary can be anywhere.  It's defined as a percpu
      variable.
      
      x86_32 exception handlers take register frame on stack directly as
      struct pt_regs.  With -fstack-protector turned on, gcc copies the
      whole structure after the stack canary and (of course) doesn't copy
      back on return thus losing all changed.  For now, -fno-stack-protector
      is added to all files which contain those functions.  We definitely
      need something better.
      
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      60a5317f
  3. Oct 23, 2008
  4. Oct 13, 2008
  5. Jul 22, 2008
    • Vegard Nossum's avatar
      x86: consolidate header guards · 77ef50a5
      Vegard Nossum authored
      
      This patch is the result of an automatic script that consolidates the
      format of all the headers in include/asm-x86/.
      
      The format:
      
      1. No leading underscore. Names with leading underscores are reserved.
      2. Pathname components are separated by two underscores. So we can
         distinguish between mm_types.h and mm/types.h.
      3. Everything except letters and numbers are turned into single
         underscores.
      
      Signed-off-by: default avatarVegard Nossum <vegard.nossum@gmail.com>
      77ef50a5
  6. Jul 17, 2008
    • H. Peter Anvin's avatar
      x86: unify and correct the GDT_ENTRY() macro · f910d134
      H. Peter Anvin authored
      
      Impact: None (cleanup only)
      
      Merge the GDT_ENTRY() macro between arch/x86/boot/pm.c and
      arch/x86/kernel/acpi/sleep.c and put the new one in
      <asm-x86/segment.h>.
      
      While we're at it, correct the bitmasks for the limit and flags.  The
      new version relies on using ULL constants in order to cause type
      promotion rather than explicit casts; this avoids having to include
      <linux/types.h> in <asm-x86/segments.h>.
      
      Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
      f910d134
    • H. Peter Anvin's avatar
      x86: unify and correct the GDT_ENTRY() macro · 4fdf08b5
      H. Peter Anvin authored
      
      Merge the GDT_ENTRY() macro between arch/x86/boot/pm.c and
      arch/x86/kernel/acpi/sleep.c and put the new one in
      <asm-x86/segment.h>.
      
      While we're at it, correct the bitmasks for the limit and flags.  The
      new version relies on using ULL constants in order to cause type
      promotion rather than explicit casts; this avoids having to include
      <linux/types.h> in <asm-x86/segments.h>.
      
      Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
      4fdf08b5
  7. Jul 08, 2008
  8. Apr 17, 2008
  9. Jan 30, 2008
  10. Oct 11, 2007
Loading