forked from pool/s390-tools
( jsc#IBM-1447, jsc#IBM-1062 ) * s390-tools-General-update-01.patch * s390-tools-General-update-02.patch * s390-tools-General-update-03.patch * s390-tools-General-update-04.patch * s390-tools-General-update-05.patch * s390-tools-General-update-06.patch * s390-tools-General-update-07.patch * s390-tools-General-update-08.patch * s390-tools-General-update-09.patch * s390-tools-General-update-10.patch * s390-tools-General-update-11.patch * s390-tools-General-update-12.patch * s390-tools-Additional-update-01.patch * s390-tools-Additional-update-02.patch ( jsc#IBM-1570, jsc#IBM-1571 ) * s390-tools-Support-unencrypted-SE-images-01.patch ( jsc#IBM-1572, jsc#IBM-1573 ) * s390-tools-pvimg-info-command-01.patch * s390-tools-pvimg-info-command-02.patch * s390-tools-pvimg-info-command-03.patch * s390-tools-pvimg-info-command-04.patch ( jsc#IBM-1576, jsc#IBM-1577 ) * s390-tools-pvimg-additional-01.patch - Renamed patches from - to * s390-tools-01-opticsmon-Fix-runaway-loop-in-on_link_change.patch to s390-tools-Additional-update-01.patch * s390-tools-02-libzpci-opticsmon-Refactor-on_link_change-using-new.patch to s390-tools-Additional-update-02.patch * s390-tools-03-rust-pvimg-Add-enable-disable-image-encryption-flags-to-pvimg-create.patch to s390-tools-Support-unencrypted-SE-images-01.patch - Revendored vendor.tar.gz OBS-URL: https://build.opensuse.org/package/show/Base:System/s390-tools?expand=0&rev=243
64 lines
2.1 KiB
Diff
64 lines
2.1 KiB
Diff
From 592a016a1095fa9813f0bae8256433ba5af4ab9b Mon Sep 17 00:00:00 2001
|
|
From: Eduard Shishkin <edward6@linux.ibm.com>
|
|
Date: Sat, 7 Dec 2024 12:48:12 +0100
|
|
Subject: [PATCH s390-tools 2/2] zipl/src: fix imprecise check that file is on
|
|
specified device
|
|
|
|
This fixes c0f02d2
|
|
|
|
The check that file is on specified disk is imprecise: In case when
|
|
target parameters are specified by user, the check compares a logical
|
|
device with a base disk, which is incorrect.
|
|
|
|
The fixup makes the check compare base disks (a specified one with
|
|
the base disk determined by disk_get_info() procedure).
|
|
|
|
Signed-off-by: Eduard Shishkin <edward6@linux.ibm.com>
|
|
---
|
|
zipl/src/bootmap.c | 9 +++++----
|
|
1 file changed, 5 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/zipl/src/bootmap.c b/zipl/src/bootmap.c
|
|
index 7d340156..880b93ce 100644
|
|
--- a/zipl/src/bootmap.c
|
|
+++ b/zipl/src/bootmap.c
|
|
@@ -299,14 +299,15 @@ create_component_header(void* buffer, component_header_type type)
|
|
}
|
|
|
|
/*
|
|
- * Not precise check that the file FILENAME locates on specified physical DISK.
|
|
+ * Not precise check that the file FILENAME locates on the physical
|
|
+ * disk specified by WHERE.
|
|
*
|
|
* Try to auto-detect parameters of the disk which the file locates on
|
|
* and compare found device-ID with DISK.
|
|
* Return 0, if auto-detection succeeded, and it is proven that the
|
|
* file does NOT locate on DISK. Otherwise, return 1.
|
|
*/
|
|
-static int file_is_on_disk(const char *filename, dev_t disk)
|
|
+static int file_is_on_disk(const char *filename, struct disk_info *where)
|
|
{
|
|
/*
|
|
* Retrieve info of the underlying disk without any user hints
|
|
@@ -331,7 +332,7 @@ static int file_is_on_disk(const char *filename, dev_t disk)
|
|
"Warning: Preparing a logical device for boot might fail\n");
|
|
return 1;
|
|
}
|
|
- if (info->device != disk) {
|
|
+ if (info->basedisks[0] != where->basedisks[0]) {
|
|
disk_free_info(info);
|
|
return 0;
|
|
}
|
|
@@ -378,7 +379,7 @@ static int add_component_file_range(struct install_set *bis,
|
|
return -1;
|
|
}
|
|
} else {
|
|
- if (!file_is_on_disk(filename, bis->info->device)) {
|
|
+ if (!file_is_on_disk(filename, bis->info)) {
|
|
error_reason("File is not on target device");
|
|
return -1;
|
|
}
|
|
--
|
|
2.39.0
|
|
|