From 7973d5454cc90766a32ee816c8909ab58a818eb2 Mon Sep 17 00:00:00 2001 From: Nick Chan Date: Fri, 14 Jun 2024 14:02:00 +0800 Subject: [PATCH] sep: fixed bpr bypass (#183) --- src/drivers/sep/sep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/drivers/sep/sep.c b/src/drivers/sep/sep.c index 3281e5f4..2f9f1ce1 100644 --- a/src/drivers/sep/sep.c +++ b/src/drivers/sep/sep.c @@ -98,7 +98,7 @@ void sepfw_kpf(void* sepfw_bytes, size_t sepfw_size) { fiprintf(stderr, "patched out bpr check\n"); #endif break; - } else if (insn_stream[i] == 0xe1930200) { // orrs r0, r3, r0, lsl 4 + } else if ((insn_stream[i] & 0xfff8ffff) == 0xe1900200) { // orrs r0, r{0-7}, r0, lsl 4 insn_stream[i] = 0xe1500000; // cmp r0, r0 #ifdef SEP_DEBUG fiprintf(stderr, "patched out bpr check\n");