zipl: detect signed files and create bootmap components

Add support for parsing IPL file signatures as produced by the Linux
kernel's sign-file tool. When preparing a disk for IPL, the signatures
will be added as separate data components that can be used by the Secure
Boot firmware feature to validate the integrity of the IPL files.

Signed-off-by: Stefan Haberland <sth@linux.ibm.com>
Reviewed-by: Peter Oberparleiter <oberpar@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Stefan Haberland
2019-03-28 14:41:07 +01:00
committed by Jan Höppner
parent 0c1a63ce5e
commit 7c7e10ed8f
4 changed files with 218 additions and 61 deletions

View File

@@ -115,8 +115,13 @@ void start(void)
/* skip header */
entry = (struct component_entry *)
(load_address + sizeof(struct component_header));
while (entry->type == COMPONENT_LOAD) {
while (entry->type == COMPONENT_LOAD ||
entry->type == COMPONENT_SIGNATURE) {
if (entry->type == COMPONENT_SIGNATURE) {
/* Skip unhandled signature components */
entry++;
continue;
}
load_address = (void *)(unsigned long)
entry->address.load_address[1];
load_blocklist(entry, subchannel_id, load_address);

View File

@@ -61,7 +61,8 @@ struct component_entry {
typedef enum {
COMPONENT_EXECUTE = 0x01,
COMPONENT_LOAD = 0x02
COMPONENT_LOAD = 0x02,
COMPONENT_SIGNATURE = 0x03
} component_type;
struct stage2_descr {