[PATCH] efi: Restrict the simple file system protocol to support only FAT

Ilias Apalodimas ilias.apalodimas at linaro.org
Thu Jun 3 08:24:56 CEST 2021


[...]
> >
> > At least Debian and Ubuntu do not allow /boot to be on a FAT file system. If we want to boot Linux via the EFI stub without GRUB, we need ext4 support exposed to the EFI sub-system. See Ilias' recent contributions for the EFI_LOAD_FILE2_PROTOCOL for initrd and efidebug. This came in handy for booting via EFI on RISC-V where the initrd= command line parameter is not supported by Linux.
> 
> IMHO, such dependency is out of UEFI spec. That means Debian/Ubuntu
> doesn't follow the UEFI spec. (but as far as I know, those install ESP
> on the disk and install GRUB efi application for boot)
> And yes, EFI_LOAD_FILE2_PROTOCOL needs to load initrd from somewhere
> (I'm usually put it on the ESP). But, if the EFI_LOAD_FILE2_PROTOCOL
> *requires* to access ext4 partition, I think that is not supported by
> UEFI spec.

One of the advantages in using EFI_LOAD_FILE2_PROTOCOL is that you can load
it from *any* file system the firmware has access to. The only thing the
kernel does is provide a buffer big enough to fit in the initrd.  The
firmware is free to locate the file and copy it in that memory however it
sees fit.

Cheers
/Ilias
> 
> Anyway, I agree that denying access to non-FAT partitions is too
> restricted. What about my other ideas? If the volume is set to
> ReadOnly, that is good for both of the SCT and the
> EFI_LOAD_FILE2_PROTOCOL.
> 
> 
> Thank you,
> 
> >
> > Best regards
> >
> > Heinrich
> >
> >


More information about the U-Boot mailing list