Skip to content

Commit 66acc49

Browse files
committed
wip - lock still points to patched mgs
1 parent 32d7676 commit 66acc49

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

Cargo.lock

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

drv/lpc55-update-server/src/main.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -508,10 +508,13 @@ impl idl::InOrderUpdateImpl for ServerImpl<'_> {
508508
if active == slot {
509509
return Err(UpdateError::InvalidSlotIdForOperation.into());
510510
}
511-
// Since we will be enforcing rollback protection at the time when the
512-
// boot preference is set, we cannot yet have the alternate image as the
513-
// preferred image. The full image needs to be in place in order to
514-
// evaluate the policy.
511+
// Rollback protection will be implemented by refusing to set
512+
// boot preference to an image that has a lower EPOC vale in the
513+
// caboose.
514+
//
515+
// Setting the boot preference before updating would sidestep that
516+
// protection. So, we will fail the prepare step if any
517+
// preference settings are selecting the update target image.
515518
let (persistent, pending_persistent, transient) = self.boot_preferences()?;
516519
if let Some(pref) = transient {
517520
if active != pref {
@@ -532,7 +535,6 @@ impl idl::InOrderUpdateImpl for ServerImpl<'_> {
532535
_ => return Err(UpdateError::InvalidSlotIdForOperation.into()),
533536
};
534537

535-
536538
self.image = image;
537539
self.state = UpdateState::InProgress;
538540
ringbuf_entry!(Trace::State(self.state));

0 commit comments

Comments
 (0)