mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-16 08:38:26 +00:00
remove redundant prints in loader
the first check should *never* print a message because an attacker can trigger a glitch off of the UART. this eliminates the diagnostic print on the first check.
This commit is contained in:
parent
0bb693449b
commit
c499087d5a
2 changed files with 7 additions and 2 deletions
|
|
@ -313,8 +313,7 @@ pub unsafe extern "C" fn rust_entry(signed_buffer: *const usize, signature: u32)
|
|||
}
|
||||
bao1x_hal::sigcheck::die_no_std();
|
||||
} else {
|
||||
println!("{}LOADER.KERNDEV,{}", BOOKEND_START, BOOKEND_END);
|
||||
println!("Developer key detected on kernel. Proceeding in developer mode!");
|
||||
// don't print anything on the first check, so a double-glitch is harder
|
||||
}
|
||||
}
|
||||
csprng.random_delay();
|
||||
|
|
|
|||
|
|
@ -279,6 +279,12 @@ impl SwapHal {
|
|||
);
|
||||
bao1x_hal::sigcheck::die_no_std();
|
||||
} else {
|
||||
bollard!(bao1x_hal::sigcheck::die_no_std, 4);
|
||||
// check if it's still 0 - force a double-glitch
|
||||
if owc.get(bao1x_api::DEVELOPER_MODE).unwrap() == 0 {
|
||||
bao1x_hal::sigcheck::die_no_std();
|
||||
}
|
||||
bollard!(bao1x_hal::sigcheck::die_no_std, 4);
|
||||
println!("{}LOADER.SWAPDEV,{}", BOOKEND_START, BOOKEND_END);
|
||||
println!(
|
||||
"Developer key detected on swap. Proceeding in developer mode!"
|
||||
|
|
|
|||
Loading…
Reference in a new issue