android_kernel_oneplus_msm8998/arch/x86
Steven Rostedt (VMware) 1f9d5f75a7 kprobes, x86/ptrace.h: Make regs_get_kernel_stack_nth() not fault on bad stack
[ Upstream commit c2712b858187f5bcd7b042fe4daa3ba3a12635c0 ]

Andy had some concerns about using regs_get_kernel_stack_nth() in a new
function regs_get_kernel_argument() as if there's any error in the stack
code, it could cause a bad memory access. To be on the safe side, call
probe_kernel_read() on the stack address to be extra careful in accessing
the memory. A helper function, regs_get_kernel_stack_nth_addr(), was added
to just return the stack address (or NULL if not on the stack), that will be
used to find the address (and could be used by other functions) and read the
address with kernel_probe_read().

Requested-by: Andy Lutomirski <luto@amacapital.net>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Reviewed-by: Joel Fernandes (Google) <joel@joelfernandes.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20181017165951.09119177@gandalf.local.home
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-11-28 18:25:44 +01:00
..
boot x86, boot: Remove multiple copy of static function sanitize_boot_params() 2019-09-16 08:13:36 +02:00
configs
crypto crypto: x86/crct10dif-pcl - fix use via crypto_shash_digest() 2019-06-11 12:23:35 +02:00
entry x86/vdso: Remove direct HPET access through the vDSO 2019-08-25 10:53:04 +02:00
ia32 x86/ia32: Fix ia32_restore_sigcontext() AC leak 2019-06-11 12:24:03 +02:00
include kprobes, x86/ptrace.h: Make regs_get_kernel_stack_nth() not fault on bad stack 2019-11-28 18:25:44 +01:00
kernel uprobes/x86: Prohibit probing on MOV SS instruction 2019-11-25 15:54:23 +01:00
kvm KVM/x86: Fix invvpid and invept register operand size in 64-bit mode 2019-11-28 18:25:40 +01:00
lguest
lib x86/asm: Fix MWAITX C-state hint value 2019-10-17 13:41:06 -07:00
math-emu x86: math-emu: Hide clang warnings for 16-bit overflow 2019-08-06 18:28:27 +02:00
mm x86/mm: Sync also unmappings in vmalloc_sync_all() 2019-08-25 10:52:43 +02:00
net bpf, x64: increase number of passes 2018-03-28 18:40:17 +02:00
oprofile x86/cpufeature: Carve out X86_FEATURE_* 2018-07-17 11:31:44 +02:00
pci x86/PCI: Fix PCI IRQ routing table memory leak 2019-06-22 08:18:20 +02:00
platform efi/x86: Do not clean dummy variable in kexec path 2019-11-06 12:09:14 +01:00
power x86/CPU/AMD: Clear RDRAND CPUID bit on AMD family 15h/16h 2019-09-06 10:18:14 +02:00
purgatory x86/kexec: add -fno-PIE 2016-11-26 09:54:52 +01:00
ras
realmode x86/build: Specify elf_i386 linker emulation explicitly for i386 objects 2019-04-27 09:33:53 +02:00
tools x86: Treat R_X86_64_PLT32 as R_X86_64_PC32 2018-03-18 11:17:52 +01:00
um um: Compile with modern headers 2019-07-10 09:56:39 +02:00
video
xen xen: fix xen_qlock_wait() 2018-11-21 09:27:36 +01:00
.gitignore
Kbuild
Kconfig x86/olpc: Fix build error with CONFIG_MFD_CS5535=m 2019-11-25 15:54:45 +01:00
Kconfig.cpu
Kconfig.debug x86/cpufeature: Replace the old static_cpu_has() with safe variant 2018-07-17 11:31:44 +02:00
Makefile x86/build: Add -Wnoaddress-of-packed-member to REALMODE_CFLAGS, to silence GCC9 build warning 2019-09-21 07:12:45 +02:00
Makefile.um
Makefile_32.cpu