From: Alexander Graf Date: Mon, 1 Apr 2019 01:27:29 +0700 Subject: [U-Boot] [PATCH 2/2] efi_loader: parameter checks in StartImage and Exit() In-Reply-To: <20190326184158.15458-3-xypron.glpk@gmx.de> References: <20190326184158.15458-1-xypron.glpk@gmx.de> <20190326184158.15458-3-xypron.glpk@gmx.de> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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