Sync from SUSE:SLFO:Main s390-tools revision ca6e8fd2e5ddbe310b053b103d70157f

This commit is contained in:
Adrian Schröter 2024-07-12 10:34:06 +02:00
parent 58a9859124
commit cb044ca585
4 changed files with 70 additions and 25 deletions

View File

@ -37,9 +37,9 @@ enum datatypes {
#define WITHOUT_KEY 0
#define WITH_KEY 1
static char *versionstring = "Version 1.0.4 2023-12-17 06:58";
static char *versionstring = "Version 1.0.5 2024-06-20 14:30";
static char *version = "1.0.4";
static char *version = "1.0.5";
void *configuration_handle = NULL;
int layers = -1;
@ -249,6 +249,7 @@ void print_scc()
{
print_version();
print_attribute("Type", 0, qc_type, string, WITH_KEY);
print_attribute("Type Name", 0, qc_type_name, string, WITH_KEY);
print_attribute("Sequence Code", 0, qc_sequence_code, string, WITH_KEY);
print_attribute("CPUs Total", 0, qc_num_ifl_total, integer, WITH_KEY);
print_attribute("CPUs IFL", 0, qc_num_ifl_total, integer, WITH_KEY);
@ -368,7 +369,7 @@ struct utsname uts;
} /* endif */
} /* endif */
for ( i = 0; i < 8; i++) {
for ( i = 0; i < layers; i++) {
erg = qc_get_attribute_int(configuration_handle, qc_layer_type_num, i, &Layer);
if (erg == 1) {
print_attribute("Secure mode on ", i, qc_has_secure, integer, WITH_KEY);

View File

@ -1,19 +1,28 @@
From 3ea6d6dfd2eb120ffee4c44ff51b7e9e7a9097a6 Mon Sep 17 00:00:00 2001
From 001c5aa5d40ffa7a40d64416c43c67004de29b8f Mon Sep 17 00:00:00 2001
From: Thomas Blume <Thomas.Blume@suse.com>
Date: Thu, 28 Mar 2024 13:32:46 +0100
Subject: [PATCH] parse ipl device for activation
ported from dracut modules
---
zdev/dracut/95zdev/parse-dasd.sh | 15 ++++++++---
zdev/dracut/95zdev/parse-zfcp.sh | 46 +++++++++++++++++++-------------
2 files changed, 39 insertions(+), 22 deletions(-)
zdev/dracut/95zdev/parse-dasd.sh | 20 ++++++++++--
zdev/dracut/95zdev/parse-zfcp.sh | 56 +++++++++++++++++++++-----------
2 files changed, 54 insertions(+), 22 deletions(-)
diff --git a/zdev/dracut/95zdev/parse-dasd.sh b/zdev/dracut/95zdev/parse-dasd.sh
index a97801f..eb2fa64 100644
index a97801fe..cce0435a 100644
--- a/zdev/dracut/95zdev/parse-dasd.sh
+++ b/zdev/dracut/95zdev/parse-dasd.sh
@@ -27,9 +27,18 @@ zdev_vinfo() {
@@ -10,6 +10,8 @@
# parameters are evaluated and used to configure dasd devices.
#
+zdev_dasd_base_args="--no-settle --yes --no-root-update --force"
+
# shellcheck source=/dev/null
type zdev_parse_dasd_list > /dev/null 2>&1 || . /lib/s390-tools/zdev-from-dasd_mod.dasd
@@ -27,9 +29,21 @@ zdev_vinfo() {
zdev_parse_rd_dasd() {
local _zdev_dasd _zdev_dasd_list
@ -26,7 +35,10 @@ index a97801f..eb2fa64 100644
+ && [[ $(< /sys/firmware/ipl/ipl_type) == "ccw" ]]; then
+ read -r _ccw < /sys/firmware/ipl/device
+
+ chzdev --offline --existing --enable --active dasd "$_ccw"
+ if lszdev --offline "$_ccw" &>/dev/null; then
+ chzdev --offline --existing --enable --active $zdev_dasd_base_args \
+ dasd "$_ccw"
+ fi
+ else
+ for _zdev_dasd in $(getargs rd.dasd -d 'rd_DASD='); do
+ _zdev_dasd_list="${_zdev_dasd_list:+${_zdev_dasd_list},}$_zdev_dasd"
@ -36,10 +48,10 @@ index a97801f..eb2fa64 100644
}
diff --git a/zdev/dracut/95zdev/parse-zfcp.sh b/zdev/dracut/95zdev/parse-zfcp.sh
index 715aa00..6279beb 100644
index 715aa009..e4fef0b9 100644
--- a/zdev/dracut/95zdev/parse-zfcp.sh
+++ b/zdev/dracut/95zdev/parse-zfcp.sh
@@ -12,25 +12,33 @@
@@ -12,25 +12,43 @@
zdev_zfcp_base_args="--no-settle --yes --no-root-update --force"
@ -53,11 +65,25 @@ index 715aa00..6279beb 100644
- IFS="$IFS_SAVED"
- echo "rd.zfcp ${zdev_zfcp_arg} :" | zdev_vinfo
- if [ "$#" -eq 1 ]; then
- # shellcheck disable=SC2086
- chzdev --enable --persistent $zdev_zfcp_base_args \
- zfcp-host "$args" 2>&1 | zdev_vinfo
- else
+zdev_vinfo() {
+ local _zdev_vinfo_line
+ while read -r _zdev_vinfo_line || [ -n "$_zdev_vinfo_line" ]; do
+ # Prefix "<30>" represents facility LOG_DAEMON 3 and loglevel INFO 6:
+ # (facility << 3) | level.
+ echo "<30>dracut: $_zdev_vinfo_line" > /dev/kmsg
+ done
+}
+
+# autodetect active bootdev from zipl device
+if ! getargbool 0 'rd.zfcp' \
+ && [[ -f /sys/firmware/ipl/ipl_type ]] \
+ && [[ $(< /sys/firmware/ipl/ipl_type) == "fcp" ]]; then
+ chzdev --offline --existing --enable --active zfcp-host 2>&1 | zdev_vinfo
+ chzdev --offline --existing --enable --active $zdev_zfcp_base_args \
+ zfcp-host 2>&1 | zdev_vinfo
+else
+ for zdev_zfcp_arg in $(getargs rd.zfcp -d 'rd_ZFCP='); do
+ (
@ -65,10 +91,6 @@ index 715aa00..6279beb 100644
+ IFS="," # did not work in front of built-in set command below
# shellcheck disable=SC2086
- chzdev --enable --persistent $zdev_zfcp_base_args \
- zfcp-host "$args" 2>&1 | zdev_vinfo
- else
- # shellcheck disable=SC2086
- chzdev --enable --persistent $zdev_zfcp_base_args \
- zfcp-lun "$args" 2>&1 | zdev_vinfo
- fi
- )
@ -92,6 +114,3 @@ index 715aa00..6279beb 100644
+
unset zdev_zfcp_arg
unset zdev_zfcp_base_args
--
2.44.0

View File

@ -1,3 +1,25 @@
-------------------------------------------------------------------
Thu Jul 11 14:56:34 UTC 2024 - Nikolay Gueorguiev <nikolay.gueorguiev@suse.com>
- Applied a new patch (bsc#1227602)
* s390-tools-slfo-01-parse-ipl-device-for-activation.patch
- Removed the old 'initial' patch
* s390-tools-sles15sp6-01-parse-ipl-device-for-activation.patch
-------------------------------------------------------------------
Thu Jun 20 13:58:08 UTC 2024 - Nikolay Gueorguiev <nikolay.gueorguiev@suse.com>
- Amended read_values.c (bsc#1226609)
* Added print for 'qc_type_name', amended the layers
- Updated %description in the .spec file
-------------------------------------------------------------------
Thu Apr 25 14:56:25 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
- s390-tools-genprotimg-data needs to require filesystem in order
to ensure we are not installed before potential UsrMerge
migration code was running (boo#1223090).
-------------------------------------------------------------------
Thu Apr 18 11:05:53 UTC 2024 - Nikolay Gueorguiev <nikolay.gueorguiev@suse.com>

View File

@ -154,7 +154,7 @@ Patch911: s390-tools-sles15sp5-remove-no-pie-link-arguments.patch
Patch912: s390-tools-ALP-zdev-live.patch
Patch913: s390-tools-sles15sp6-kdump-initrd-59-zfcp-compat-rules.patch
Patch914: s390-tools-sles15sp6-genprotimg-makefile.patch
Patch915: s390-tools-sles15sp6-01-parse-ipl-device-for-activation.patch
Patch915: s390-tools-slfo-01-parse-ipl-device-for-activation.patch
### SE-tooling: New IBM host-key subject locality (s390-tools)
Patch916: s390-tools-sles15sp5-01-rust-pv-support-Armonk-in-IBM-signing-key-subject.patch
Patch917: s390-tools-sles15sp6-02-genprotimg-support-Armonk-in-IBM-signing-key-subject.patch
@ -201,8 +201,8 @@ Requires: util-linux
Requires: gawk
Requires: perl-base
Requires: rsync
Requires: tar
Requires: s390-tools-genprotimg-data
Requires: tar
%endif
Requires(post): %fillup_prereq
Requires(post): permissions
@ -213,7 +213,7 @@ Provides: group(cpacfstats)
Provides: group(ts-shell)
Provides: group(zkeyadm)
%ifarch x86_64
Recommends: s390-tools-genprotimg-data
Recommends: s390-tools-genprotimg-data
%endif
###
ExclusiveArch: s390x x86_64
@ -231,8 +231,10 @@ zgetdump - tool to get linux system dumps from DASD
- x86_64
genprotimg - create a protected virtualization image
pvattest - create, perform, and verify protected virtualization attestation measurements
pvsecret - manage secrets for IBM Secure Execution guests.
pvapconfig - used to automatically set up the AP configuration within an IBM Secure Execution guest.
Note: The package requires - s390-tools-genprotimg-data-*.noarch.rpm - installed
Note: Auxiliary data package - s390-tools-genprotimg-data
%package -n osasnmpd
Summary: OSA-Express SNMP subagent
@ -348,11 +350,12 @@ Summary: Auxiliary data used by genprotimg
License: MIT
Group: System/Boot
BuildArch: noarch
Requires(pre): filesystem
%description genprotimg-data
The genprotimg allows preparing and analyzing boot images
in the realm of IBM Secure Execution on a trusted environment,
such as the laptop of an admin by limiting the build targets
such as the laptop of an admin by limiting the build targets
depending on the defined or detected host architecture.
This package provides auxiliary data used by genprotimg.