android_kernel_oneplus_msm8998/arch
Thomas Gleixner bc791e8195 x86/irq/64: Limit IST stack overflow check to #DB stack
[ Upstream commit 7dbcf2b0b770eeb803a416ee8dcbef78e6389d40 ]

Commit

  37fe6a42b3 ("x86: Check stack overflow in detail")

added a broad check for the full exception stack area, i.e. it considers
the full exception stack area as valid.

That's wrong in two aspects:

 1) It does not check the individual areas one by one

 2) #DF, NMI and #MCE are not enabling interrupts which means that a
    regular device interrupt cannot happen in their context. In fact if a
    device interrupt hits one of those IST stacks that's a bug because some
    code path enabled interrupts while handling the exception.

Limit the check to the #DB stack and consider all other IST stacks as
'overflow' or invalid.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Mitsuo Hayasaka <mitsuo.hayasaka.hu@hitachi.com>
Cc: Nicolai Stange <nstange@suse.de>
Cc: Sean Christopherson <sean.j.christopherson@intel.com>
Cc: x86-ml <x86@kernel.org>
Link: https://lkml.kernel.org/r/20190414160143.682135110@linutronix.de
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-06-11 12:23:59 +02:00
..
alpha alpha: Fix Eiger NR_IRQS to 128 2019-02-20 10:13:22 +01:00
arc ARC: uacces: remove lp_start, lp_end from clobber list 2019-03-23 08:44:34 +01:00
arm KVM: arm/arm64: Ensure vcpu target is unset on reset failure 2019-06-11 12:23:49 +02:00
arm64 arm64: futex: Restore oldval initialization to work around buggy compilers 2019-04-27 09:34:01 +02:00
avr32
blackfin
c6x
cris
frv
h8300 h8300: use cc-cross-prefix instead of hardcoding h8300-unknown-linux- 2019-04-27 09:33:48 +02:00
hexagon
ia64
m32r
m68k m68k: Add -ffreestanding to CFLAGS 2019-03-23 08:44:36 +01:00
metag
microblaze
mips MIPS: scall64-o32: Fix indirect syscall number load 2019-05-16 19:44:43 +02:00
mn10300
nios2
openrisc
parisc
powerpc powerpc/numa: improve control of topology updates 2019-06-11 12:23:58 +02:00
s390 s390/smp: Fix calling smp_call_ipl_cpu() from ipl CPU 2019-02-06 19:43:05 +01:00
score
sh
sparc
tile
um um: Avoid marking pages with "changed protection" 2019-02-20 10:13:13 +01:00
unicore32
x86 x86/irq/64: Limit IST stack overflow check to #DB stack 2019-06-11 12:23:59 +02:00
xtensa xtensa: fix return_address 2019-04-27 09:33:56 +02:00
.gitignore
Kconfig