OSDN Git Service

x86/entry: Assert that syscalls are on the right stack
authorAndy Lutomirski <luto@kernel.org>
Fri, 26 Jun 2020 17:21:11 +0000 (10:21 -0700)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 1 Jul 2020 08:00:25 +0000 (10:00 +0200)
commitc9c26150e61de441ab58b25c1f64afc049ee0fee
tree0292fa333d46db5c508cfeeaf40cc4365c0b084a
parent009bce1df0bb5eb970b9eb98d963861f7fe353c7
x86/entry: Assert that syscalls are on the right stack

Now that the entry stack is a full page, it's too easy to regress the
system call entry code and end up on the wrong stack without noticing.
Assert that all system calls (SYSCALL64, SYSCALL32, SYSENTER, and INT80)
are on the right stack and have pt_regs in the right place.

Signed-off-by: Andy Lutomirski <luto@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/52059e42bb0ab8551153d012d68f7be18d72ff8e.1593191971.git.luto@kernel.org
arch/x86/entry/common.c