OpenCloudOS-Kernel/arch
Josh Poimboeuf fb799447ae x86,objtool: Split UNWIND_HINT_EMPTY in two
Mark reported that the ORC unwinder incorrectly marks an unwind as
reliable when the unwind terminates prematurely in the dark corners of
return_to_handler() due to lack of information about the next frame.

The problem is UNWIND_HINT_EMPTY is used in two different situations:

  1) The end of the kernel stack unwind before hitting user entry, boot
     code, or fork entry

  2) A blind spot in ORC coverage where the unwinder has to bail due to
     lack of information about the next frame

The ORC unwinder has no way to tell the difference between the two.
When it encounters an undefined stack state with 'end=1', it blindly
marks the stack reliable, which can break the livepatch consistency
model.

Fix it by splitting UNWIND_HINT_EMPTY into UNWIND_HINT_UNDEFINED and
UNWIND_HINT_END_OF_STACK.

Reported-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/fd6212c8b450d3564b855e1cb48404d6277b4d9f.1677683419.git.jpoimboe@kernel.org
2023-03-23 23:18:58 +01:00
..
alpha sched/idle: Mark arch_cpu_idle_dead() __noreturn 2023-03-08 08:44:28 -08:00
arc - Daniel Verkamp has contributed a memfd series ("mm/memfd: add 2023-02-23 17:09:35 -08:00
arm sched/idle: Mark arch_cpu_idle_dead() __noreturn 2023-03-08 08:44:28 -08:00
arm64 sched/idle: Mark arch_cpu_idle_dead() __noreturn 2023-03-08 08:44:28 -08:00
csky sched/idle: Mark arch_cpu_idle_dead() __noreturn 2023-03-08 08:44:28 -08:00
hexagon VM_FAULT_RETRY fixes 2023-03-05 11:07:58 -08:00
ia64 sched/idle: Mark arch_cpu_idle_dead() __noreturn 2023-03-08 08:44:28 -08:00
loongarch sched/idle: Mark arch_cpu_idle_dead() __noreturn 2023-03-08 08:44:28 -08:00
m68k VM_FAULT_RETRY fixes 2023-03-05 11:07:58 -08:00
microblaze VM_FAULT_RETRY fixes 2023-03-05 11:07:58 -08:00
mips sched/idle: Mark arch_cpu_idle_dead() __noreturn 2023-03-08 08:44:28 -08:00
nios2 VM_FAULT_RETRY fixes 2023-03-05 11:07:58 -08:00
openrisc VM_FAULT_RETRY fixes 2023-03-05 11:07:58 -08:00
parisc sched/idle: Mark arch_cpu_idle_dead() __noreturn 2023-03-08 08:44:28 -08:00
powerpc sched/idle: Mark arch_cpu_idle_dead() __noreturn 2023-03-08 08:44:28 -08:00
riscv sched/idle: Mark arch_cpu_idle_dead() __noreturn 2023-03-08 08:44:28 -08:00
s390 sched/idle: Mark arch_cpu_idle_dead() __noreturn 2023-03-08 08:44:28 -08:00
sh sched/idle: Mark arch_cpu_idle_dead() __noreturn 2023-03-08 08:44:28 -08:00
sparc sched/idle: Mark arch_cpu_idle_dead() __noreturn 2023-03-08 08:44:28 -08:00
um This pull request contains the following changes for UML: 2023-03-01 09:13:00 -08:00
x86 x86,objtool: Split UNWIND_HINT_EMPTY in two 2023-03-23 23:18:58 +01:00
xtensa sched/idle: Mark arch_cpu_idle_dead() __noreturn 2023-03-08 08:44:28 -08:00
.gitignore
Kconfig arch/Kconfig: fix indentation 2023-02-09 17:03:20 -08:00