Skip to contentSkip to conversation

x86: dovetail: Drop superfluous oob trap hooks from kernelmode_fixup_or_oops

PATCH New Jan Kiszka 1 participant 1 message Feb 18, 2022

Subsystems (2)
lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

PATCH 1/1 x86: dovetail: Drop superfluous oob trap hooks from kernelmode_fixup_or_oops

From: Jan Kiszka <[email protected]>

Due to an earlier check for running_oob(), this path will always be entered in-band. So the hooks are pointless.

---
 arch/x86/mm/fault.c | 2 --
 1 file changed, 2 deletions(-)
arch/x86/mm/fault.c +0 -2
index 37111d88add2..75df0fa390cf 100644
@@ -740,7 +740,6 @@ kernelmode_fixup_or_oops(struct pt_regs *regs, unsigned long error_code,
 		if (current->thread.sig_on_uaccess_err && signal) {
 			sanitize_error_code(address, &error_code);
 
-			oob_trap_notify(X86_TRAP_PF, regs);
 			set_signal_archinfo(address, error_code);
 
 			if (si_code == SEGV_PKUERR) {
@@ -749,7 +748,6 @@ kernelmode_fixup_or_oops(struct pt_regs *regs, unsigned long error_code,
 				/* XXX: hwpoison faults will set the wrong code. */
 				force_sig_fault(signal, si_code, (void __user *)address);
 			}
-			oob_trap_unwind(X86_TRAP_PF, regs);
 		}
 
 		/*
Signature · 1 line
2.34.1