1. 26 5月, 2008 6 次提交
    • I
      x86: if stackprotector is enabled, thn use stack-protector-all by default · 72370f2a
      Ingo Molnar 提交于
      also enable the rodata and nx tests.
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      72370f2a
    • I
      x86: fix canary of the boot CPU's idle task · 7e09b2a0
      Ingo Molnar 提交于
      the boot CPU's idle task has a zero stackprotector canary value.
      
      this is a special task that is never forked, so the fork code
      does not randomize its canary. Do it when we hit cpu_idle().
      
      Academic sidenote: this means that the early init code runs with a
      zero canary and hence the canary becomes predictable for this short,
      boot-only amount of time.
      
      Although attack vectors against early init code are very rare, it might
      make sense to move this initialization to an earlier point.
      (to one of the early init functions that never return - such as
      start_kernel())
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      7e09b2a0
    • A
      x86: setup stack canary for the idle threads · ce22bd92
      Arjan van de Ven 提交于
      The idle threads for non-boot CPUs are a bit special in how they
      are created; the result is that these don't have the stack canary
      set up properly in their PDA. Easiest fix is to just always set
      the PDA up correctly when entering the idle thread; this is a NOP
      for the boot cpu.
      Signed-off-by: NArjan van de Ven <arjan@linux.intel.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      ce22bd92
    • I
      x86: fix stackprotector canary updates during context switches · e0032087
      Ingo Molnar 提交于
      fix a bug noticed and fixed by pageexec@freemail.hu.
      
      if built with -fstack-protector-all then we'll have canary checks built
      into the __switch_to() function. That does not work well with the
      canary-switching code there: while we already use the %rsp of the
      new task, we still call __switch_to() whith the previous task's canary
      value in the PDA, hence the __switch_to() ssp prologue instructions
      will store the previous canary. Then we update the PDA and upon return
      from __switch_to() the canary check triggers and we panic.
      
      so update the canary after we have called __switch_to(), where we are
      at the same stackframe level as the last stackframe of the next
      (and now freshly current) task.
      
      Note: this means that we call __switch_to() [and its sub-functions]
      still with the old canary, but that is not a problem, both the previous
      and the next task has a high-quality canary. The only (mostly academic)
      disadvantage is that the canary of one task may leak onto the stack of
      another task, increasing the risk of information leaks, were an attacker
      able to read the stack of specific tasks (but not that of others).
      
      To solve this we'll have to reorganize the way we switch tasks, and move
      the PDA setting into the switch_to() assembly code. That will happen in
      another patch.
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      e0032087
    • I
      x86: stackprotector & PARAVIRT fix · 4c7f8900
      Ingo Molnar 提交于
      on paravirt enabled 64-bit kernels the paravirt ops do function
      calls themselves - which is bad with the stackprotector - for
      example pda_init() loads 0 into %gs and then does MSR_GS_BASE
      write (which modifies gs.base) - but that MSR write is a function
      call on paravirt, which with stackprotector tries to read the
      stack canary from the PDA ... crashing the bootup.
      
      the solution was suggested by Arjan van de Ven: to exclude paravirt.c
      from stackprotector, too many lowlevel functionality is in it. It's
      not like we'll have paravirt functions with character arrays on
      their stack anyway...
      Signed-off-by: NArjan van de Ven <arjan@linux.intel.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      4c7f8900
    • S
      Kconfig: introduce ARCH_DEFCONFIG to DEFCONFIG_LIST · 73531905
      Sam Ravnborg 提交于
      init/Kconfig contains a list of configs that are searched
      for if 'make *config' are used with no .config present.
      Extend this list to look at the config identified by
      ARCH_DEFCONFIG.
      
      With this change we now try the defconfig targets last.
      
      This fixes a regression reported
      by: Linus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      73531905
  2. 25 5月, 2008 1 次提交
  3. 24 5月, 2008 1 次提交
  4. 23 5月, 2008 14 次提交
  5. 22 5月, 2008 16 次提交
  6. 20 5月, 2008 2 次提交
    • P
      09c20121
    • D
      sparc64: Add global register dumping facility. · 93dae5b7
      David S. Miller 提交于
      When a cpu really is stuck in the kernel, it can be often
      impossible to figure out which cpu is stuck where.  The
      worst case is when the stuck cpu has interrupts disabled.
      
      Therefore, implement a global cpu state capture that uses
      SMP message interrupts which are not disabled by the
      normal IRQ enable/disable APIs of the kernel.
      
      As long as we can get a sysrq 'y' to the kernel, we can
      get a dump.  Even if the console interrupt cpu is wedged,
      we can trigger it from userspace using /proc/sysrq-trigger
      
      The output is made compact so that this facility is more
      useful on high cpu count systems, which is where this
      facility will likely find itself the most useful :)
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      93dae5b7