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
Unknown Object (File)
Mar 12 2024, 8:53 AM
Unknown Object (File)
Mar 8 2024, 4:53 PM
Unknown Object (File)
Mar 8 2024, 4:53 PM
Unknown Object (File)
Mar 8 2024, 5:25 AM
Unknown Object (File)
Mar 1 2024, 12:28 PM
Unknown Object (File)
Feb 2 2024, 6:22 AM
Unknown Object (File)
Jan 4 2024, 3:11 PM
Unknown Object (File)
Jan 4 2024, 7:05 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.