Files
linux/arch/x86/kernel
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
..
2009-01-20 12:29:20 +09:00
2009-01-09 03:39:43 -05:00
2009-01-21 13:00:42 +01:00
2009-01-21 13:00:42 +01:00
2009-01-21 17:26:06 +09:00
2009-01-20 12:29:19 +09:00
2008-12-12 11:08:42 +01:00
2009-01-04 18:19:37 +01:00
2008-12-31 18:07:42 -05:00
2009-01-04 13:23:07 +01:00
2009-01-02 17:46:24 +01:00
2008-07-26 12:00:04 -07:00
2009-01-12 11:22:50 +01:00
2009-01-20 17:14:28 +01:00
2009-02-10 00:42:00 +01:00
2008-12-16 20:36:44 +01:00
2008-10-20 08:52:41 -07:00
2009-02-10 00:41:58 +01:00
2008-07-16 12:15:17 -07:00
2008-07-26 16:31:35 +02:00
2008-07-22 14:35:57 +02:00
2008-10-22 22:55:23 -07:00
2009-01-04 13:23:05 +01:00
2009-01-04 13:23:05 +01:00
2009-01-31 14:23:37 +09:00
2008-07-22 14:35:57 +02:00
2008-10-16 16:53:13 +02:00
2009-02-10 00:41:58 +01:00