All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/9] x86/entry/head: standardize the end of the stack
@ 2016-09-20 20:02 Josh Poimboeuf
  2016-09-20 20:02 ` [PATCH 1/9] x86/entry/head/32: use local labels Josh Poimboeuf
                   ` (8 more replies)
  0 siblings, 9 replies; 17+ messages in thread
From: Josh Poimboeuf @ 2016-09-20 20:02 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, H . Peter Anvin
  Cc: x86, linux-kernel, Andy Lutomirski, Linus Torvalds, Brian Gerst,
	Peter Zijlstra, Nilay Vaish

Thanks to all the recent x86 entry code refactoring, most tasks' kernel
stacks start at the same offset right below their saved pt_regs,
regardless of which syscall was used to enter the kernel.  That creates
a nice convention which makes it straightforward to identify the end of
the stack, which can be useful [*] for the unwinder.

But there a few places where tasks don't yet follow the convention.
This patch set finishes the job.

[*] This will be useful for three upcoming proposed features:

- Detecting corrupt stacks in the unwinder (which will also be a force
  for ensuring this end of stack convention continues to be followed in
  the future).

- Printing all saved pt_regs on the stack during an oops/warning.

- Validating stacks in the livepatch consistency model.


Josh Poimboeuf (9):
  x86/entry/head/32: use local labels
  x86/entry/32: rename 'error_code' to 'common_exception'
  x86/entry/32: fix the end of the stack for newly forked tasks
  x86/head/32: fix the end of the stack for idle tasks
  x86/smp: fix initial idle stack location on 32-bit
  x86/asm/head: use a common function for starting CPUs
  x86/head: put real return address on idle task stack
  x86/head: fix the end of the stack for idle tasks
  x86: move _stext marker to before head code

 arch/x86/entry/entry_32.S     | 120 ++++++++++++++++++++++++------------------
 arch/x86/kernel/head_32.S     |  49 ++++++++++-------
 arch/x86/kernel/head_64.S     |  42 +++++++--------
 arch/x86/kernel/smpboot.c     |   4 +-
 arch/x86/kernel/vmlinux.lds.S |   2 +-
 5 files changed, 122 insertions(+), 95 deletions(-)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2016-09-21 11:35 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-20 20:02 [PATCH 0/9] x86/entry/head: standardize the end of the stack Josh Poimboeuf
2016-09-20 20:02 ` [PATCH 1/9] x86/entry/head/32: use local labels Josh Poimboeuf
2016-09-21  0:57   ` Andy Lutomirski
2016-09-21  2:52     ` Josh Poimboeuf
2016-09-20 20:02 ` [PATCH 2/9] x86/entry/32: rename 'error_code' to 'common_exception' Josh Poimboeuf
2016-09-20 20:02 ` [PATCH 3/9] x86/entry/32: fix the end of the stack for newly forked tasks Josh Poimboeuf
2016-09-21  1:10   ` Brian Gerst
2016-09-21  3:25     ` Josh Poimboeuf
2016-09-21  3:33       ` Josh Poimboeuf
2016-09-21  6:39       ` Andy Lutomirski
2016-09-21 11:35         ` Josh Poimboeuf
2016-09-20 20:02 ` [PATCH 4/9] x86/head/32: fix the end of the stack for idle tasks Josh Poimboeuf
2016-09-20 20:02 ` [PATCH 5/9] x86/smp: fix initial idle stack location on 32-bit Josh Poimboeuf
2016-09-20 20:02 ` [PATCH 6/9] x86/asm/head: use a common function for starting CPUs Josh Poimboeuf
2016-09-20 20:02 ` [PATCH 7/9] x86/head: put real return address on idle task stack Josh Poimboeuf
2016-09-20 20:02 ` [PATCH 8/9] x86/head: fix the end of the stack for idle tasks Josh Poimboeuf
2016-09-20 20:02 ` [PATCH 9/9] x86: move _stext marker to before head code Josh Poimboeuf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.