From 735dab32480f58d0c53c2e12ade07067e91981b5 Mon Sep 17 00:00:00 2001 From: Johnny Mnemonic Date: Fri, 17 Apr 2026 23:42:17 +0200 Subject: [PATCH] src/tlb.c: restore original order of operation for atype assignment After 3279e9defb3b trying to boot a Linux kernel in (b)ski's system mode hang early. As `&` takes precedence over `|` the assigned value of atypem is different after 3279e9defb3b than the assigned value of atype was before that commit. Fixes: 3279e9defb3b ("src/tlb.c: fix `Accesstype` vs `Accesstypemask` confsion") Reported-by: Willow Signed-off-by: Johnny Mnemonic --- src/tlb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tlb.c b/src/tlb.c index 9527558..9736d50 100644 --- a/src/tlb.c +++ b/src/tlb.c @@ -691,7 +691,7 @@ static int keyCheck(Accesstype atype, unsigned key) static BOOL accessRights(unsigned ar, unsigned pl, unsigned cpl, Accesstype atype) { - Accesstypemask atypem = atype & READ_ACCESS | WRITE_ACCESS; + Accesstypemask atypem = atype & (READ_ACCESS | WRITE_ACCESS); switch (ar) { case 0: