On 6/5/2025 12:32 PM, Sohil Mehta wrote:
On 6/5/2025 11:10 AM, Xin Li (Intel) wrote:
Xin Li (Intel) (2): x86/fred/signal: Prevent single-step upon ERETU completion selftests/x86: Add a test to detect infinite sigtrap handler loop
I tested the patches on a machine that supports FRED. The results are as expected:
Seeing a split lock warning when running the test: x86/split lock detection: #DB: sigtrap_loop_64/4614 took a bus_lock trap at address: 0x4011ae
Wanted to get this out sooner for awareness. Will figure out more details and send out an update.
FRED on — no Fix => FAIL FRED off — no Fix => PASS FRED on — with Fix => PASS FRED off — with Fix => PASS
Tested-by: Sohil Mehta sohil.mehta@intel.com
Though, I haven't tested the 32-bit version of the selftest.
arch/x86/include/asm/sighandling.h | 22 +++++ arch/x86/kernel/signal_32.c | 4 + arch/x86/kernel/signal_64.c | 4 + tools/testing/selftests/x86/Makefile | 2 +- tools/testing/selftests/x86/sigtrap_loop.c | 97 ++++++++++++++++++++++ 5 files changed, 128 insertions(+), 1 deletion(-) create mode 100644 tools/testing/selftests/x86/sigtrap_loop.c