1. 12 2月, 2009 1 次提交
  2. 10 2月, 2009 1 次提交
    • T
      x86: implement x86_32 stack protector · 60a5317f
      Tejun Heo 提交于
      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: NTejun Heo <tj@kernel.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      60a5317f
  3. 09 2月, 2009 2 次提交
  4. 31 1月, 2009 2 次提交
  5. 27 1月, 2009 3 次提交
  6. 24 1月, 2009 1 次提交
  7. 20 1月, 2009 1 次提交
    • B
      x86: move stack_canary into irq_stack · 947e76cd
      Brian Gerst 提交于
      Impact: x86_64 percpu area layout change, irq_stack now at the beginning
      
      Now that the PDA is empty except for the stack canary, it can be removed.
      The irqstack is moved to the start of the per-cpu section.  If the stack
      protector is enabled, the canary overlaps the bottom 48 bytes of the irqstack.
      
      tj: * updated subject
          * dropped asm relocation of irq_stack_ptr
          * updated comments a bit
          * rebased on top of stack canary changes
      Signed-off-by: NBrian Gerst <brgerst@gmail.com>
      Signed-off-by: NTejun Heo <tj@kernel.org>
      947e76cd
  8. 18 1月, 2009 1 次提交
    • B
      x86-64: Convert irqstacks to per-cpu · 26f80bd6
      Brian Gerst 提交于
      Move the irqstackptr variable from the PDA to per-cpu.  Make the
      stacks themselves per-cpu, removing some specific allocation code.
      Add a seperate flag (is_boot_cpu) to simplify the per-cpu boot
      adjustments.
      
      tj: * sprinkle some underbars around.
      
          * irq_stack_ptr is not used till traps_init(), no reason to
            initialize it early.  On SMP, just leaving it NULL till proper
            initialization in setup_per_cpu_areas() works.  Dropped
            is_boot_cpu and early irq_stack_ptr initialization.
      
          * do DECLARE/DEFINE_PER_CPU(char[IRQ_STACK_SIZE], irq_stack)
            instead of (char, irq_stack[IRQ_STACK_SIZE]).
      Signed-off-by: NBrian Gerst <brgerst@gmail.com>
      Signed-off-by: NTejun Heo <tj@kernel.org>
      26f80bd6
  9. 12 12月, 2008 1 次提交
  10. 02 11月, 2008 1 次提交
    • A
      x86: Hypervisor detection and get tsc_freq from hypervisor · 88b094fb
      Alok Kataria 提交于
      Impact: Changes timebase calibration on Vmware.
      
      v3->v2 : Abstract the hypervisor detection and feature (tsc_freq) request
      	 behind a hypervisor.c file
      v2->v1 : Add a x86_hyper_vendor field to the cpuinfo_x86 structure.
      	 This avoids multiple calls to the hypervisor detection function.
      
      This patch adds function to detect if we are running under VMware.
      The current way to check if we are on VMware is following,
      #  check if "hypervisor present bit" is set, if so read the 0x40000000
         cpuid leaf and check for "VMwareVMware" signature.
      #  if the above fails, check the DMI vendors name for "VMware" string
         if we find one we query the VMware hypervisor port to check if we are
         under VMware.
      
      The DMI + "VMware hypervisor port check" is needed for older VMware products,
      which don't implement the hypervisor signature cpuid leaf.
      Also note that since we are checking for the DMI signature the hypervisor
      port should never be accessed on native hardware.
      
      This patch also adds a hypervisor_get_tsc_freq function, instead of
      calibrating the frequency which can be error prone in virtualized
      environment, we ask the hypervisor for it. We get the frequency from
      the hypervisor by accessing the hypervisor port if we are running on VMware.
      Other hypervisors too can add code to the generic routine to get frequency on
      their platform.
      Signed-off-by: NAlok N Kataria <akataria@vmware.com>
      Signed-off-by: NDan Hecht <dhecht@vmware.com>
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      88b094fb
  11. 23 10月, 2008 2 次提交
  12. 08 9月, 2008 1 次提交
  13. 05 9月, 2008 2 次提交
  14. 23 8月, 2008 1 次提交
  15. 15 8月, 2008 1 次提交
  16. 31 7月, 2008 3 次提交
  17. 29 7月, 2008 1 次提交
  18. 23 7月, 2008 1 次提交
    • V
      x86: consolidate header guards · 77ef50a5
      Vegard Nossum 提交于
      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: NVegard Nossum <vegard.nossum@gmail.com>
      77ef50a5
  19. 22 7月, 2008 2 次提交
  20. 20 7月, 2008 1 次提交
  21. 19 7月, 2008 2 次提交
  22. 17 7月, 2008 2 次提交
  23. 08 7月, 2008 4 次提交
  24. 04 7月, 2008 1 次提交
  25. 13 5月, 2008 1 次提交
    • M
      x86, ptrace: PEBS support · 93fa7636
      Markus Metzger 提交于
      Polish the ds.h interface and add support for PEBS.
      
      Ds.c is meant to be the resource allocator for per-thread and per-cpu
      BTS and PEBS recording.
      It is used by ptrace/utrace to provide execution tracing of debugged tasks.
      It will be used by profilers (e.g. perfmon2).
      It may be used by kernel debuggers to provide a kernel execution trace.
      
      Changes in detail:
      - guard DS and ptrace by CONFIG macros
      - separate DS and BTS more clearly
      - simplify field accesses
      - add functions to manage PEBS buffers
      - add simple protection/allocation mechanism
      - added support for Atom
      
      Opens:
      - buffer overflow handling
        Currently, only circular buffers are supported. This is all we need
        for debugging. Profilers would want an overflow notification.
        This is planned to be added when perfmon2 is made to use the ds.h
        interface.
      - utrace intermediate layer
      Signed-off-by: NMarkus Metzger <markus.t.metzger@intel.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      93fa7636
  26. 01 5月, 2008 1 次提交