zipl: prevent endless loop during IPL

In case secure boot is enabled but no components in the IPL report
are found it ends up in an endless loop in the component verification.
To prevent this check if components are found and exit if not.

Signed-off-by: Stefan Haberland <sth@linux.ibm.com>
Reviewed-by: Philipp Rudo <prudo@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Stefan Haberland
2020-03-31 19:01:32 +02:00
committed by Jan Höppner
parent e67f630086
commit c4a0933165

View File

@@ -106,6 +106,10 @@ is_verified_address(unsigned long image_addr)
rb_hdr = (void *) rb_hdr + rb_hdr->len;
}
if (!comps)
return 0;
for_each_rb_entry(comp, comps) {
if (image_addr == comp->addr &&
comp->flags & IPL_RB_COMPONENT_FLAG_SIGNED &&