From e021a55abd8b98acc6d29e00b8c36c5ee6e69b13 Mon Sep 17 00:00:00 2001 From: LC Date: Sat, 11 Jul 2026 12:04:36 -0400 Subject: [PATCH] BPFEmitter: Amend instruction class checking in HandleStore() This was previously checking for a load class, which would result in ST clobbering the index register. --- .../Tools/LinuxEmulation/LinuxSyscalls/Seccomp/BPFEmitter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Tools/LinuxEmulation/LinuxSyscalls/Seccomp/BPFEmitter.cpp b/Source/Tools/LinuxEmulation/LinuxSyscalls/Seccomp/BPFEmitter.cpp index 39890d359..be75a67cb 100644 --- a/Source/Tools/LinuxEmulation/LinuxSyscalls/Seccomp/BPFEmitter.cpp +++ b/Source/Tools/LinuxEmulation/LinuxSyscalls/Seccomp/BPFEmitter.cpp @@ -110,7 +110,7 @@ uint64_t BPFEmitter::HandleStore(uint32_t BPFIP, const sock_filter* Inst) { [[maybe_unused]] size_t OpSize {}; - const auto SrcReg = BPF_CLASS(Inst->code) == BPF_LD ? REG_A : REG_X; + const auto SrcReg = BPF_CLASS(Inst->code) == BPF_ST ? REG_A : REG_X; // Must be smaller than scratch space size. VALIDATE(Inst->k < 16);