Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

um: remove broken double fault detection

The show_stack function had some code to detect double faults. However,
the logic is wrong and it would e.g. trigger if a WARNING happened
inside an IRQ.

Remove it without trying to add a new logic. The current behaviour,
which will just fault repeatedly until the IRQ stack is used up and the
host kills UML, seems to be good enough.

Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
Link: https://patch.msgid.link/20241103150506.1367695-5-benjamin@sipsolutions.net
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

authored by

Benjamin Berg and committed by
Johannes Berg
ce6e85a1 b69f22df

-15
-1
arch/um/include/shared/os.h
··· 241 241 extern void unblock_signals(void); 242 242 extern int um_set_signals(int enable); 243 243 extern int um_set_signals_trace(int enable); 244 - extern int os_is_signal_stack(void); 245 244 extern void deliver_alarm(void); 246 245 extern void register_pm_wake_signal(void); 247 246 extern void block_signals_hard(void);
-6
arch/um/kernel/sysrq.c
··· 32 32 struct pt_regs *segv_regs = current->thread.segv_regs; 33 33 int i; 34 34 35 - if (!segv_regs && os_is_signal_stack()) { 36 - pr_err("Received SIGSEGV in SIGSEGV handler," 37 - " aborting stack trace!\n"); 38 - return; 39 - } 40 - 41 35 if (!stack) 42 36 stack = get_stack_pointer(task, segv_regs); 43 37
-8
arch/um/os-Linux/signal.c
··· 487 487 unblocking = false; 488 488 } 489 489 #endif 490 - 491 - int os_is_signal_stack(void) 492 - { 493 - stack_t ss; 494 - sigaltstack(NULL, &ss); 495 - 496 - return ss.ss_flags & SS_ONSTACK; 497 - }