From 4f622325efa2e433254ea01d3eabf472dcc6f757 Mon Sep 17 00:00:00 2001 From: Eduard Shishkin Date: Thu, 11 Jun 2026 12:21:09 +0200 Subject: [PATCH] zipl/src: Fix add_component_file_range() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix add_component_file_range() to process components of all types (not only of COMPONENT_TYPE_LOAD), similar to how it is going in add_component_buffer(). Earlier components of COMPONENT_TYPE_SIGNATURE were processed only by add_component_buffer(). Starting from 60bc1e3, signatures for mirrors (i.e. base disks of #1 and larger ID) are processed also by the function add_component_file_range(), which works incorrectly for such type of components. Fixes: 60bc1e38d058 ("zipl/src: Reuse data of buffer components in bootmap") Reviewed-by: Stefan Haberland Signed-off-by: Eduard Shishkin Signed-off-by: Jan Höppner --- zipl/src/bootmap.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/zipl/src/bootmap.c b/zipl/src/bootmap.c index 9b5d2a12..0d6df2d2 100644 --- a/zipl/src/bootmap.c +++ b/zipl/src/bootmap.c @@ -413,8 +413,13 @@ static int add_component_file_range(struct install_set *bis, *count -= DIV_ROUND_UP(trailer, info->phy_block_size); } /* Fill in component location */ - location->addr = load_address; - location->size = *count * info->phy_block_size; + if (component_type_by_id(comp_id) == COMPONENT_TYPE_LOAD) { + location->addr = load_address; + location->size = *count * info->phy_block_size; + } else { + location->addr = 0; + location->size = 0; + } /* Try to compact list */ *count = disk_compact_blocklist(*list, *count, info); write_segment_table: