Page MenuHomeFreeBSD

bhyveload: open guest boot disk image O_RDWR
ClosedPublic

Authored by rew on Nov 4 2022, 10:16 PM.
Tags
None
Referenced Files
F102818979: D37274.diff
Sun, Nov 17, 2:32 PM
Unknown Object (File)
Oct 1 2024, 11:26 PM
Unknown Object (File)
Sep 17 2024, 5:19 PM
Unknown Object (File)
Sep 5 2024, 4:05 AM
Unknown Object (File)
Aug 31 2024, 6:38 PM
Unknown Object (File)
Aug 18 2024, 6:22 PM
Unknown Object (File)
Aug 17 2024, 4:56 PM
Unknown Object (File)
Aug 8 2024, 7:03 AM

Details

Summary

When a boot environment has been booted via the bootonce feature,
userboot clears the bootonce value from an nvlist but fails to write the
updated nvlist back to disk.

The failure occurs because bhyveload opens the guest boot disk image
O_RDONLY, fix this by opening it O_RDWR.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

rew requested review of this revision.Nov 4 2022, 10:16 PM
markj added a subscriber: markj.

Seems reasonable to me.

This revision is now accepted and ready to land.Nov 5 2022, 3:57 PM

Keeping it read-only might be good to ensure we're not changing the image... But that seems like too fine a detail to control via an option, and I've not looked to see how careful other things are... So, seems fine overall, but I thought I'd mention this in case I've missed something...

jhb added a subscriber: jhb.

The UFS nextboot also needs write support. Note that cb_diskwrite assumes it can write to this fd.

This revision was automatically updated to reflect the committed changes.