kernel-ark/arch/x86
Tejun Heo ccbeed3a05 x86: make lazy %gs optional on x86_32
Impact: pt_regs changed, lazy gs handling made optional, add slight
        overhead to SAVE_ALL, simplifies error_code path a bit

On x86_32, %gs hasn't been used by kernel and handled lazily.  pt_regs
doesn't have place for it and gs is saved/loaded only when necessary.
In preparation for stack protector support, this patch makes lazy %gs
handling optional by doing the followings.

* Add CONFIG_X86_32_LAZY_GS and place for gs in pt_regs.

* Save and restore %gs along with other registers in entry_32.S unless
  LAZY_GS.  Note that this unfortunately adds "pushl $0" on SAVE_ALL
  even when LAZY_GS.  However, it adds no overhead to common exit path
  and simplifies entry path with error code.

* Define different user_gs accessors depending on LAZY_GS and add
  lazy_save_gs() and lazy_load_gs() which are noop if !LAZY_GS.  The
  lazy_*_gs() ops are used to save, load and clear %gs lazily.

* Define ELF_CORE_COPY_KERNEL_REGS() which always read %gs directly.

xen and lguest changes need to be verified.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Jeremy Fitzhardinge <jeremy@xensource.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-02-10 00:42:00 +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: make lazy %gs optional on x86_32 2009-02-10 00:42:00 +01:00
kernel x86: make lazy %gs optional on x86_32 2009-02-10 00:42:00 +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: make lazy %gs optional on x86_32 2009-02-10 00:42:00 +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 x86: merge winchip-2 and winchip-2a cpu choices 2008-10-13 10:22:48 +02:00