[SLOF] [PATCH 0/4] Block write support for SCSI and virtio-block disks
Nikunj A Dadhania
nikunj at linux.vnet.ibm.com
Mon Nov 14 17:32:43 AEDT 2016
Hi Thomas,
Thomas Huth <thuth at redhat.com> writes:
> GRUB2 uses a file called grubenv in the boot partition to store certain
> information like which kernel should be booted the next time (see
> https://www.gnu.org/software/grub/manual/html_node/Environment-block.html
> for details). If the user set the "next_entry" variable here, e.g. with
> the "grub2-reboot" command under Linux, the corresponding kernel should
> only be booted once, so the GRUB2 bootloader has to update the grubenv
> file on the boot partition to avoid that it is booted again after the next
> reboot. That means GRUB2 needs write support at the firmware layer!
> This patch series implements this block write support in SLOF, so that
> the "grub2-reboot" command now works with SLOF as with other firmware
> implementations (i.e. the grubenv file is updated after the kernel that
> should be booted only once has been selected).
My only worry here is that it would open up a way to write to the
critical section of the disk image from the SLOF prompt. Is there a way
we can prevent this?
>
> Thomas Huth (4):
> deblocker: Add a 'write' function
> scsi: Add SCSI block write support
> virtio: Implement block write support
> Provide "write" function in the disk-label package
>
> board-qemu/slof/virtio-block.fs | 8 ++++++
> lib/libvirtio/virtio-blk.c | 24 +++++++++--------
> lib/libvirtio/virtio-blk.h | 3 ++-
> lib/libvirtio/virtio.code | 11 +++++++-
> lib/libvirtio/virtio.in | 1 +
> slof/fs/packages/deblocker.fs | 21 +++++++++++++++
> slof/fs/packages/disk-label.fs | 5 ++++
> slof/fs/scsi-disk.fs | 32 +++++++++++++++++++++++
> slof/fs/scsi-support.fs | 58 +++++++++++++++++++++++++++++++++++++++++
> 9 files changed, 150 insertions(+), 13 deletions(-)
Regards,
Nikunj
More information about the SLOF
mailing list