OpenCloudOS-Kernel/arch
Marco Elver d438fabce7 kfence: use pt_regs to generate stack trace on faults
Instead of removing the fault handling portion of the stack trace based on
the fault handler's name, just use struct pt_regs directly.

Change kfence_handle_page_fault() to take a struct pt_regs, and plumb it
through to kfence_report_error() for out-of-bounds, use-after-free, or
invalid access errors, where pt_regs is used to generate the stack trace.

If the kernel is a DEBUG_KERNEL, also show registers for more information.

Link: https://lkml.kernel.org/r/20201105092133.2075331-1-elver@google.com
Signed-off-by: Marco Elver <elver@google.com>
Suggested-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Jann Horn <jannh@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2021-02-26 09:41:02 -08:00
..
alpha Kbuild updates for v5.12 2021-02-25 10:17:31 -08:00
arc arch: arc: Remove CONFIG_OPROFILE support 2021-01-22 12:12:03 +05:30
arm Kbuild updates for v5.12 2021-02-25 10:17:31 -08:00
arm64 kfence: use pt_regs to generate stack trace on faults 2021-02-26 09:41:02 -08:00
csky local64.h: make <asm/local64.h> mandatory 2020-12-29 15:36:49 -08:00
h8300 h8300: fix PREEMPTION build, TI_PRE_COUNT undefined 2021-02-13 11:42:40 -08:00
hexagon hexagon: remove CONFIG_EXPERIMENTAL from defconfigs 2021-02-24 13:38:26 -08:00
ia64 Kbuild updates for v5.12 2021-02-25 10:17:31 -08:00
m68k Kbuild updates for v5.12 2021-02-25 10:17:31 -08:00
microblaze Kbuild updates for v5.12 2021-02-25 10:17:31 -08:00
mips Kbuild updates for v5.12 2021-02-25 10:17:31 -08:00
nds32 nds32: Fix bogus reference to <asm/procinfo.h> 2021-02-25 14:31:49 +08:00
nios2 nios2: Don't use _end for calculating min_low_pfn 2021-02-19 15:02:09 +08:00
openrisc openrisc: io: Add missing __iomem annotation to iounmap() 2021-01-20 06:14:26 +09:00
parisc Kbuild updates for v5.12 2021-02-25 10:17:31 -08:00
powerpc Kbuild updates for v5.12 2021-02-25 10:17:31 -08:00
riscv Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next 2021-02-20 17:45:32 -08:00
s390 s390/mm: define arch_get_mappable_range() 2021-02-26 09:41:01 -08:00
sh Kbuild updates for v5.12 2021-02-25 10:17:31 -08:00
sparc Kbuild updates for v5.12 2021-02-25 10:17:31 -08:00
um Rework of the X86 irq stack handling: 2021-02-24 16:32:23 -08:00
x86 kfence: use pt_regs to generate stack trace on faults 2021-02-26 09:41:02 -08:00
xtensa Kbuild updates for v5.12 2021-02-25 10:17:31 -08:00
.gitignore
Kconfig Rework of the X86 irq stack handling: 2021-02-24 16:32:23 -08:00