[U-Boot] [PATCH 2/2] efi_loader: parameter checks in StartImage and Exit()

Alexander Graf agraf at csgraf.de
Sun Mar 31 18:27:43 UTC 2019


On 27.03.19 01:41, Heinrich Schuchardt wrote:
> Add parameter checks in the StartImage() and Exit() boottime services:
> - check that the image handle is valid and has the loaded image protocol
>   installed
> - in StartImage() record the current image
> - in Exit() check that the image is the current image


Could you please elaborate what the checks are for? Are they mandated by
the spec? Or did you spot them missing in a real world scenario where
everything fell apart without you noticing before?

I'm slightly concerned by the amount of runtime sanity checks we add to
the code. It's a lot of bloat (binary size as well as execution time)
for questionable gain outside of debug builds.


Alex




More information about the U-Boot mailing list