alistair23-linux/arch/x86/kernel/cpu
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
..
cpufreq ACPI: cpufreq: Remove deprecated /proc/acpi/processor/../performance proc entries 2009-02-04 00:12:24 -05:00
mcheck x86: remove include of apic.h from hardirq_64.h 2009-01-23 11:03:29 +09:00
mtrr x86: tone down mtrr_trim_uncached_memory() warning 2009-01-29 11:45:35 +01:00
.gitignore Update .gitignore files for generated targets 2008-10-20 11:24:31 -07:00
addon_cpuid_features.c x86: fix intel x86_64 llc_shared_map/cpu_llc_id anomolies 2008-12-19 09:13:50 +01:00
amd.c x86: support always running TSC on Intel CPUs 2008-12-16 21:02:50 +01:00
bugs.c
bugs_64.c
centaur.c
centaur_64.c
cmpxchg.c
common.c x86: implement x86_32 stack protector 2009-02-10 00:42:01 +01:00
cpu.h
cyrix.c
hypervisor.c x86: hypervisor - fix sparse warnings 2008-11-23 11:11:52 +01:00
intel.c x86: add clflush before monitor for Intel 7400 series 2009-02-09 11:15:15 +01:00
intel_cacheinfo.c Merge commit 'v2.6.29-rc4' into core/percpu 2009-02-09 14:58:11 +01:00
Makefile Merge branch 'tracing-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2008-12-28 12:21:10 -08:00
mkcapflags.pl
perfctr-watchdog.c ftrace: mark lapic_wd_event() notrace 2008-10-14 10:34:36 +02:00
powerflags.c
proc.c x86/proc: fix /proc/cpuinfo cpu offline bug 2008-10-22 14:29:37 +02:00
transmeta.c
umc.c
vmware.c x86: vmware - fix sparse warnings 2008-11-23 11:02:36 +01:00