linux/drivers/xen
Jeremy Fitzhardinge 577eebeae3 xen: make -fstack-protector work under Xen
-fstack-protector uses a special per-cpu "stack canary" value.
gcc generates special code in each function to test the canary to make
sure that the function's stack hasn't been overrun.

On x86-64, this is simply an offset of %gs, which is the usual per-cpu
base segment register, so setting it up simply requires loading %gs's
base as normal.

On i386, the stack protector segment is %gs (rather than the usual kernel
percpu %fs segment register).  This requires setting up the full kernel
GDT and then loading %gs accordingly.  We also need to make sure %gs is
initialized when bringing up secondary cpus too.

To keep things consistent, we do the full GDT/segment register setup on
both architectures.

Because we need to avoid -fstack-protected code before setting up the GDT
and because there's no way to disable it on a per-function basis, several
files need to have stack-protector inhibited.

[ Impact: allow Xen booting with stack-protector enabled ]

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
2009-09-09 16:37:39 -07:00
..
xenbus xen/xenbus: export xenbus_dev_changed 2009-03-30 09:26:56 -07:00
xenfs xen: add "capabilities" file 2009-03-30 09:59:20 -07:00
balloon.c [IA64] xen_domu_defconfig: fix build issues/warnings 2009-05-05 11:43:13 -07:00
cpu_hotplug.c xen: honour VCPU availability on boot 2009-04-08 14:25:51 -07:00
events.c xen: Use kcalloc() in xen_init_IRQ() 2009-07-01 11:19:47 +02:00
evtchn.c xen/dev-evtchn: clean up locking in evtchn 2009-03-30 09:26:49 -07:00
features.c
grant-table.c
Kconfig Merge commit 'origin/master' into for-linus/xen/master 2009-04-07 13:34:16 -07:00
Makefile xen: make -fstack-protector work under Xen 2009-09-09 16:37:39 -07:00
manage.c PM core: rename suspend and resume functions 2009-06-12 21:32:31 +02:00
sys-hypervisor.c xen: drop kexec bits from /sys/hypervisor since kexec isn't implemented yet 2009-03-30 09:27:07 -07:00
xencomm.c