From ed1f19984f38604b6c6ba25b86799f5222dad972 Mon Sep 17 00:00:00 2001 From: bunnie Date: Fri, 14 Nov 2025 16:16:46 +0800 Subject: [PATCH] loosen restriction on zero keys seen during wiping this is to handle an edge case where an improperly set ACL on the alpha0 boards would cause a set of keys to be inaccessible to the boot routine --- libs/bao1x-hal/src/sigcheck.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/libs/bao1x-hal/src/sigcheck.rs b/libs/bao1x-hal/src/sigcheck.rs index cc9eae8dc..ef4d8234c 100644 --- a/libs/bao1x-hal/src/sigcheck.rs +++ b/libs/bao1x-hal/src/sigcheck.rs @@ -221,10 +221,9 @@ pub fn erase_secrets() { let mut rram = crate::rram::Reram::new(); let mut zero_key_count = 0; - // statistically speaking, I suppose, maybe we could have "a" set of keys that are 0 out of a randomly - // generated set. But if we see more than the threshold below of zero keys, conclude that we don't - // have access permissions, and panic instead of allowing a boot. - const ZERO_ERR_THRESH: usize = 2; + // This is set to a higher level because we need to work around an earlier issue + // with overly-broad ACL settings on alpha0 boards + const ZERO_ERR_THRESH: usize = 64; for slot in crate::board::KEY_SLOTS.iter() { if slot.get_type() == SlotType::Data { let (_pa, rw_perms) = slot.get_access_spec();