original_kernel/arch/x86/mm
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
..
kmemcheck
Makefile xen: make -fstack-protector work under Xen 2009-09-09 16:37:39 -07:00
dump_pagetables.c
extable.c
fault.c x86: Remove spurious printk level from segfault message 2009-07-11 09:56:19 +02:00
gup.c
highmem_32.c x86: Export kmap_atomic_prot() needed for TTM. 2009-07-29 15:56:22 +10:00
hugetlbpage.c
init.c
init_32.c
init_64.c x86: Fix an incorrect argument of reserve_bootmem() 2009-08-24 20:22:55 +02:00
iomap_32.c
ioremap.c
k8topology_64.c
kmmio.c
memtest.c
mmap.c
mmio-mod.c
numa.c
numa_32.c
numa_64.c
pageattr-test.c
pageattr.c x86: Fix CPA memtype reserving in the set_pages_array*() cases 2009-08-03 19:36:09 +02:00
pat.c x86, pat: Allow ISA memory range uncacheable mapping requests 2009-08-17 14:12:44 -07:00
pf_in.c
pf_in.h
pgtable.c x86, 32-bit: Fix double accounting in reserve_top_address() 2009-08-04 16:27:29 +02:00
pgtable_32.c
srat_32.c
srat_64.c x86-64: Fix bad_srat() to clear all state 2009-07-21 15:20:01 -07:00
testmmiotrace.c
tlb.c x86: don't call '->send_IPI_mask()' with an empty mask 2009-08-21 09:48:10 -07:00