linux/arch/x86
Tejun Heo 60a5317ff0 x86: implement x86_32 stack protector
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: Tejun Heo <tj@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-02-10 00:42:01 +01:00
..
boot x86 setup: fix asm constraints in vesa_store_edid 2009-01-30 23:55:25 +01:00
configs eeprom: More consistent symbol names 2009-01-26 21:19:57 +01:00
crypto crypto: crc32c-intel - Switch to shash 2008-12-25 11:01:37 +11:00
ia32 Merge branch 'x86/uaccess' into core/percpu 2009-02-10 00:40:48 +01:00
include/asm x86: implement x86_32 stack protector 2009-02-10 00:42:01 +01:00
kernel x86: implement x86_32 stack protector 2009-02-10 00:42:01 +01:00
kvm KVM: change KVM to use IOMMU API 2009-01-03 14:11:07 +01:00
lguest x86: make lazy %gs optional on x86_32 2009-02-10 00:42:00 +01:00
lib x86: use early clobbers in usercopy*.c 2009-01-21 09:43:17 +01:00
mach-default x86/Voyager: make it build and boot 2009-01-31 18:26:07 +01:00
mach-generic x86: rename all fields of mpc_table mpc_X to X 2009-01-05 14:08:34 +01:00
mach-rdc321x
mach-voyager Merge commit 'v2.6.29-rc4' into core/percpu 2009-02-09 14:58:11 +01:00
math-emu x86: add %gs accessors for x86_32 2009-02-10 00:41:58 +01:00
mm Merge branch 'x86/uaccess' into core/percpu 2009-02-10 00:40:48 +01:00
oprofile Merge branch 'oprofile/ring_buffer' into oprofile/oprofile-for-tip 2009-01-08 14:27:34 +01:00
pci PCI: irq and pci_ids patch for Intel Tigerpoint DeviceIDs 2009-01-27 09:46:08 -08:00
power x86, hibernate: fix breakage on x86_32 with CONFIG_NUMA set 2008-11-12 23:28:51 +01:00
vdso x86: no stack protector for vdso 2009-02-10 00:41:56 +01:00
video
xen x86: make lazy %gs optional on x86_32 2009-02-10 00:42:00 +01:00
Kconfig x86: implement x86_32 stack protector 2009-02-10 00:42:01 +01:00
Kconfig.cpu Merge branch 'x86/urgent' into core/percpu 2009-02-10 00:41:02 +01:00
Kconfig.debug Merge branch 'linus' into stackprotector 2008-12-31 08:31:57 +01:00
Makefile stackprotector: update make rules 2009-02-10 00:41:54 +01:00
Makefile_32.cpu