-------- Forwarded Message -------- Subject: [PATCH 0/2] x86/fred: Reconstruct fault state for rejected INT instructions Date: Thu, 17 Sep 2026 16:09:05 -0700 From: Matthew Schwartz <matthew.schwartz@linux.dev> To: Xin Li <xin@zytor.com>, hpa@zytor.com CC: Andy Lutomirski <luto@kernel.org>, Thomas Gleixner <tglx@kernel.org>, Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>, Dave Hansen <dave.hansen@linux.intel.com>, x86@kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Paul Gofman <pgofman@codeweavers.com>, Lionel Landwerlin <lionel.g.landwerlin@intel.com>, Shuah Khan <shuah@kernel.org>, Matthew Schwartz <matthew.schwartz@linux.dev> This series reconstructs the #GP signal context for rejected INT instructions with FRED enabled. The incorrect error code and saved IP break Wine's handling of INT 0x2d, causing Elden Ring to fail with a spurious access violation on Panther Lake. The software event flag handling follows the same reasoning as the existing sigreturn fix in prevent_single_step_upon_eretu(). The second patch adds 32-bit and 64-bit signal-context and ptrace resume coverage. Both selftest variants pass all 29 checks on patched FRED-enabled Panther Lake and on a non-FRED AMD host. With the same binaries on unpatched Panther Lake, 16 signal-context checks and the first ptrace IP check fail. The two dependent ptrace resume checks are not reached. Separate continuation testing with the fix matched an IDT baseline on another system in both bitnesses: unchanged IP retries the INT whether RF is set or clear, and advancing IP resumes at the next instruction. One observed ptrace divergence remains separate: after rewriting IP at the stop from raise(SIGSTOP), PTRACE_SINGLESTEP traps before the target instruction on FRED, whereas IDT executes it. The selftest starts from an INT3 stop to isolate rejected-INT behavior. The syscall-stop case is a follow-up investigation outside this series. Matthew Schwartz (2): x86/fred: Reconstruct the #GP context for rejected INT instructions selftests/x86: Check signal state for rejected software interrupts arch/x86/entry/entry_fred.c | 11 +- tools/testing/selftests/x86/Makefile | 2 +- tools/testing/selftests/x86/int_signal.c | 311 +++++++++++++++++++++++ 3 files changed, 322 insertions(+), 2 deletions(-) create mode 100644 tools/testing/selftests/x86/int_signal.c base-commit: b5a051f6b840d48f159166ef073d3021989bfb50 -- 2.55.0