diff --git a/.gitignore b/.gitignore index 4eb33e6..2e735dc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ SOURCES/cmsfs-1.1.8c.tar.gz -SOURCES/s390-tools-2.22.0.tar.gz +SOURCES/s390-tools-2.25.0.tar.gz SOURCES/src_vipa-2.1.0.tar.gz diff --git a/.s390utils.metadata b/.s390utils.metadata index 00bf6c1..3c07f8b 100644 --- a/.s390utils.metadata +++ b/.s390utils.metadata @@ -1,3 +1,3 @@ 9c9a4e89bddb2b4e6e09ef6fc7c2e6f2ad6316de SOURCES/cmsfs-1.1.8c.tar.gz -7023dd992d5cb418cb522a62c6f8550bf3d4ec37 SOURCES/s390-tools-2.22.0.tar.gz +e8e0d3f651179fd14dc4a40d53a1e4ef6edaae7d SOURCES/s390-tools-2.25.0.tar.gz 8ed8592a0a9370ce8422df9231ccb17f6cf49bed SOURCES/src_vipa-2.1.0.tar.gz diff --git a/SOURCES/s390-tools-zipl-blscfg-rpm-nvr-sort.patch b/SOURCES/s390-tools-zipl-blscfg-rpm-nvr-sort.patch index 54e357d..4c55e19 100644 --- a/SOURCES/s390-tools-zipl-blscfg-rpm-nvr-sort.patch +++ b/SOURCES/s390-tools-zipl-blscfg-rpm-nvr-sort.patch @@ -1,4 +1,4 @@ -From 14119148dabb7f4f633623c00eece44c5771db10 Mon Sep 17 00:00:00 2001 +From a17c57bf2b7b6d64a509cb5fb02fe46849bc550c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Mon, 20 Jun 2022 17:43:05 +0200 Subject: [PATCH 1/2] Revert "zipl/src: Implement sorting bls entries by @@ -194,10 +194,10 @@ index 0cea1d4..9352f76 100644 return n; -- -2.36.1 +2.38.1 -From 661f143bb0b429c732d0ad9756c745dcb8799bc7 Mon Sep 17 00:00:00 2001 +From 7a51cfc15b870d90bffe1e24a1da922663ffe1d7 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Mon, 20 Jun 2022 17:46:59 +0200 Subject: [PATCH 2/2] blscfg: sort like rpm nvr, not like a single version @@ -208,20 +208,19 @@ Content-Transfer-Encoding: 8bit Signed-off-by: Peter Jones Signed-off-by: Dan Horák --- - zipl/src/Makefile | 2 +- + zipl/src/Makefile | 1 + zipl/src/scan.c | 96 ++++++++++++++++++++++++++++++++++++++++++++++- - 2 files changed, 95 insertions(+), 3 deletions(-) + 2 files changed, 95 insertions(+), 2 deletions(-) diff --git a/zipl/src/Makefile b/zipl/src/Makefile -index 786bb7f..1adc486 100644 +index 64eabe4..7043005 100644 --- a/zipl/src/Makefile +++ b/zipl/src/Makefile -@@ -7,7 +7,7 @@ ALL_CPPFLAGS += -I../include -I../boot \ - -D_FILE_OFFSET_BITS=64 $(NO_PIE_CFLAGS) - ALL_LDFLAGS += -Wl,-z,noexecstack $(NO_PIE_LDFLAGS) +@@ -9,6 +9,7 @@ ALL_LDFLAGS += -Wl,-z,noexecstack $(NO_PIE_LDFLAGS) --libs = $(rootdir)/libutil/libutil.a -+libs = $(rootdir)/libutil/libutil.a -lrpm + libs = $(rootdir)/libutil/libutil.a \ + $(rootdir)/libvtoc/libvtoc.a \ ++ -lrpmio -lrpm objects = misc.o error.o scan.o job.o boot.o bootmap.o fs-map.o disk.o \ bootmap_header.o envblk.o install.o zipl.o $(rootdir)/zipl/boot/data.o @@ -345,5 +344,5 @@ index 9352f76..3327e2d 100644 static int scan_append_section_heading(struct scan_token* scan, int* index, char* name); -- -2.36.1 +2.38.1 diff --git a/SOURCES/s390utils-2.22.0-rhel.patch b/SOURCES/s390utils-2.22.0-rhel.patch deleted file mode 100644 index d76e383..0000000 --- a/SOURCES/s390utils-2.22.0-rhel.patch +++ /dev/null @@ -1,99 +0,0 @@ -From ce0ae3c869dccaff3ed976d58b2d63ce461507e6 Mon Sep 17 00:00:00 2001 -From: Steffen Eiden -Date: Mon, 25 Jul 2022 12:57:53 +0200 -Subject: [PATCH 1/2] zipl: Add missing check for a nullpointer. - -Fixes a bug that leads to a segmentation fault when no parmline is -provided. - -Fixes: 11b401b5 ("zipl: move and make check for maximum command line length dynamic") -Signed-off-by: Steffen Eiden -Reviewed-by: Marc Hartmayer -Reviewed-by: Stefan Haberland ---- - zipl/src/job.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/zipl/src/job.c b/zipl/src/job.c -index ffdc297..b5bf5b2 100644 ---- a/zipl/src/job.c -+++ b/zipl/src/job.c -@@ -790,7 +790,7 @@ check_common_ipl_data(struct job_common_ipl_data *common, const char *section, - if (!max_parm_size) - max_parm_size = LEGACY_MAXIMUM_PARMLINE_SIZE; - -- len = strlen(common->parmline); -+ len = common->parmline ? strlen(common->parmline) : 0; - if (len > max_parm_size) { - error_text("The length of the parameters line " - "(%d bytes) exceeds the allowed maximum " --- -2.38.1 - - -From 5066a940f7a705c342deba8296a57dc786a19c5f Mon Sep 17 00:00:00 2001 -From: Peter Oberparleiter -Date: Fri, 16 Sep 2022 15:13:01 +0200 -Subject: [PATCH 2/2] zipl/boot: add secure boot trailer -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This patch enhances the zipl stage3 loader image adding a trailer as -required for secure boot by future firmware versions. - -Note: with the change in this patch the padding via objcopy command line -options is replaced by padding via linker script directives with the -same effect. - -Signed-off-by: Peter Oberparleiter -Signed-off-by: Jan Höppner ---- - zipl/boot/Makefile | 2 +- - zipl/boot/stage3.lds.S | 10 ++++++++++ - 2 files changed, 11 insertions(+), 1 deletion(-) - -diff --git a/zipl/boot/Makefile b/zipl/boot/Makefile -index c2ec76a..f195df0 100644 ---- a/zipl/boot/Makefile -+++ b/zipl/boot/Makefile -@@ -106,7 +106,7 @@ stage3.bin: stage3.exec - --only-section=.stage2dump.tail \ - --only-section=.eckd2dump_mv.tail \ - --only-section=.fixup \ -- --pad-to=0xe000 \ -+ --only-section=.sb.trailer \ - $< $@ - - data.o: $(FILES) -diff --git a/zipl/boot/stage3.lds.S b/zipl/boot/stage3.lds.S -index fa4c81f..d8305f1 100644 ---- a/zipl/boot/stage3.lds.S -+++ b/zipl/boot/stage3.lds.S -@@ -14,6 +14,7 @@ - */ - - #include "boot/loaders_layout.h" -+#include "boot/s390.h" - - SECTIONS - { -@@ -46,6 +47,15 @@ SECTIONS - .rodata : {*(.rodata) } - .data : { *(.data) } - -+ /* Trailer needed for Secure Boot */ -+ . = COMMAND_LINE_EXTRA - 32; -+ .sb.trailer : { -+ QUAD(0x0000c00000000000) -+ QUAD(STAGE3_ENTRY + PSW_LOAD) -+ QUAD(STAGE3_ENTRY) -+ QUAD(0x000000207a49504c) -+ } -+ - . = COMMAND_LINE_EXTRA; - .cmdline_extra : { - . += COMMAND_LINE_EXTRA_SIZE; --- -2.38.1 - diff --git a/SOURCES/s390utils-2.25.0-rhel.patch b/SOURCES/s390utils-2.25.0-rhel.patch new file mode 100644 index 0000000..8bc5883 --- /dev/null +++ b/SOURCES/s390utils-2.25.0-rhel.patch @@ -0,0 +1,205 @@ +From 48324b579e825a30110abac0369e9d544350ead1 Mon Sep 17 00:00:00 2001 +From: Steffen Eiden +Date: Wed, 14 Dec 2022 14:25:21 +0100 +Subject: [PATCH 1/4] zdump: replace atomic refcount with atomic int + +(Atomic) refcounting was introduced in glib2.58. +We want to support v2.56 as well, so replace it with int and the atomic +operations introduced in glib 2.4. + +Fixes: https://github.com/ibm-s390-linux/s390-tools/issues/146 +Reviewed-by: Jan Hoeppner +Signed-off-by: Steffen Eiden +--- + zdump/pv_utils.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/zdump/pv_utils.c b/zdump/pv_utils.c +index 6d9f0bb..a39bfc5 100644 +--- a/zdump/pv_utils.c ++++ b/zdump/pv_utils.c +@@ -674,7 +674,7 @@ struct _storage_state_mmap { + size_t mapped_size; + pv_tweak_component_t *tweak_components; + size_t num_tweaks; +- gatomicrefcount ref_count; ++ int ref_count; + }; + + storage_state_mmap_t *storage_state_mmap_new(const int fd, const size_t file_size, const u64 offset, +@@ -733,14 +733,14 @@ storage_state_mmap_t *storage_state_mmap_new(const int fd, const size_t file_siz + ret->tweak_components = (pv_tweak_component_t *)(ptr + in_page_offset); + ret->num_tweaks = tweak_components_cnt; + ret->mapped_size = mmapped_size; +- g_atomic_ref_count_init(&ret->ref_count); ++ ret->ref_count = 1; + return g_steal_pointer(&ret); + } + + storage_state_mmap_t *storage_state_mmap_ref(storage_state_mmap_t *storage_state) + { + g_assert(storage_state); +- g_atomic_ref_count_inc(&storage_state->ref_count); ++ g_atomic_int_inc(&storage_state->ref_count); + return storage_state; + } + +@@ -748,7 +748,7 @@ void storage_state_mmap_unref(storage_state_mmap_t *storage_state) + { + if (!storage_state) + return; +- if (storage_state->ref_count && !g_atomic_ref_count_dec(&storage_state->ref_count)) ++ if (storage_state->ref_count && !g_atomic_int_dec_and_test(&storage_state->ref_count)) + return; + if (storage_state->first_page_ptr) { + int rc = munmap(storage_state->first_page_ptr, storage_state->mapped_size); +-- +2.39.1 + + +From 4007220d35a9e33186fdfe3a4b5c22cd2eea9bb9 Mon Sep 17 00:00:00 2001 +From: Steffen Eiden +Date: Wed, 14 Dec 2022 13:53:29 +0100 +Subject: [PATCH 2/4] libpv: disallow glib features from after 2.56 + +Enforce that the first glib.h include is done via glib-helper.h for libpv +so that glib version checks are in place. + +Change zdump and pvattest such that they never include glibstuff before +libpv/glib-helper.h + +Reviewed-by: Jan Hoeppner +Signed-off-by: Steffen Eiden +--- + include/libpv/glib-helper.h | 6 ++++++ + pvattest/src/common.h | 2 +- + zdump/dfi_pv_elf.c | 1 - + 3 files changed, 7 insertions(+), 2 deletions(-) + +diff --git a/include/libpv/glib-helper.h b/include/libpv/glib-helper.h +index 5d3df50..9f90b28 100644 +--- a/include/libpv/glib-helper.h ++++ b/include/libpv/glib-helper.h +@@ -18,6 +18,12 @@ + #define GLIB_VERSION_MIN_REQUIRED GLIB_VERSION_2_56 + #endif + ++#define GLIB_VERSION_MAX_ALLOWED GLIB_VERSION_2_56 ++ ++#ifdef __G_LIB_H__ ++#error "glib.h must be included via libpv/glib-helper.h" ++#endif ++ + #include + #include + #include +diff --git a/pvattest/src/common.h b/pvattest/src/common.h +index e2e3ef1..43d2ab9 100644 +--- a/pvattest/src/common.h ++++ b/pvattest/src/common.h +@@ -11,10 +11,10 @@ + /* Must be included before any other header */ + #include "config.h" + +-#include + #include + + #include "libpv/glib-helper.h" ++#include + #include "libpv/macros.h" + #include "lib/zt_common.h" + +diff --git a/zdump/dfi_pv_elf.c b/zdump/dfi_pv_elf.c +index 8d1021e..9d33e8f 100644 +--- a/zdump/dfi_pv_elf.c ++++ b/zdump/dfi_pv_elf.c +@@ -21,7 +21,6 @@ + #include + #include + +-#include + #include + #include + +-- +2.39.1 + + +From fb01fb45bb6a9e62313e9cdb79ad5ed39471cfe7 Mon Sep 17 00:00:00 2001 +From: Marc Hartmayer +Date: Mon, 19 Dec 2022 09:51:51 +0000 +Subject: [PATCH 3/4] zgetdump/Makefile: don't use `.check_dep_zgetdump` as + linker input + +The `.check_dep_zgetdump` file is used to cache the result of the +dependency checks and should not be used as input for linking or +anything else. Let's add it as dependency for the objects file. This +shouldn't cause any problems since the Makefile rule for object files is +defined in `common.mak` as follows: + +%.o: %.c + $(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) -c $< -o $@ + +Fixes: https://github.com/ibm-s390-linux/s390-tools/issues/147 +Fixes: 8d8d5e9746a4 ("zdump: Fix Makefile dependencies") +Signed-off-by: Marc Hartmayer +Reviewed-by: Jan Hoeppner +Signed-off-by: Jan Hoeppner +--- + zdump/Makefile | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/zdump/Makefile b/zdump/Makefile +index ca8aadc..934dc47 100644 +--- a/zdump/Makefile ++++ b/zdump/Makefile +@@ -119,7 +119,9 @@ libs = $(rootdir)/libutil/libutil.a $(LIBPV) + + all: $(BUILD_TARGETS) + +-zgetdump: .check_dep_zgetdump $(OBJECTS) $(libs) ++$(OBJECTS): .check_dep_zgetdump ++ ++zgetdump: $(OBJECTS) $(libs) + + skip-zgetdump: + echo " SKIP zgetdump due to unresolved dependencies" +-- +2.39.1 + + +From 1ad208c17a0edc65e6abd47b68a7d9c206faf2a6 Mon Sep 17 00:00:00 2001 +From: Ingo Franzki +Date: Fri, 20 Jan 2023 11:04:18 +0100 +Subject: [PATCH 4/4] zkey: Support EP11 host library version 4 (#2165811) +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Try to load libep11.so.4 if available, but fallback to older +library versions if not. + +Reviewed-by: Jörg Schmidbauer +Signed-off-by: Ingo Franzki +Signed-off-by: Steffen Eiden +(cherry picked from commit 6222c384958729bc4b5bad61ad38967647cc3248) +--- + zkey/ep11.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/zkey/ep11.c b/zkey/ep11.c +index 58dc3c5..8359929 100644 +--- a/zkey/ep11.c ++++ b/zkey/ep11.c +@@ -35,7 +35,7 @@ + * Definitions for the EP11 library + */ + #define EP11_LIBRARY_NAME "libep11.so" +-#define EP11_LIBRARY_VERSION 3 ++#define EP11_LIBRARY_VERSION 4 + #define EP11_WEB_PAGE "http://www.ibm.com/security/cryptocards" + + /** +-- +2.39.1 + diff --git a/SPECS/s390utils.spec b/SPECS/s390utils.spec index cf4a8f2..29b7fd3 100644 --- a/SPECS/s390utils.spec +++ b/SPECS/s390utils.spec @@ -12,8 +12,8 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems -Version: 2.22.0 -Release: 2%{?dist}.1 +Version: 2.25.0 +Release: 2%{?dist} Epoch: 2 License: MIT ExclusiveArch: s390 s390x @@ -46,8 +46,8 @@ Source26: 91-zipl.install Patch0: s390-tools-zipl-invert-script-options.patch Patch1: s390-tools-zipl-blscfg-rpm-nvr-sort.patch -# backported fixes -Patch100: s390utils-%{version}-rhel.patch +# upstream fixes/updates +Patch100: s390utils-%%{version}-rhel.patch Patch1000: cmsfs-1.1.8-warnings.patch Patch1001: cmsfs-1.1.8-kernel26.patch @@ -82,7 +82,8 @@ be used together with the zSeries (s390) Linux kernel and device drivers. %patch0 -p1 -b .zipl-invert-script-options %patch1 -p1 -b .blscfg-rpm-nvr-sort -%patch100 -p1 +# upstream fixes/updates +%%patch100 -p1 # # cmsfs @@ -132,7 +133,6 @@ make \ %endif NO_PIE_LDFLAGS="" \ BINDIR=/usr/sbin \ - UDEVRUNDIR=/run/udev \ DISTRELEASE=%{release} \ V=1 @@ -155,7 +155,6 @@ make install \ DESTDIR=%{buildroot} \ BINDIR=/usr/sbin \ SYSTEMDSYSTEMUNITDIR=%{_unitdir} \ - UDEVRUNDIR=/run/udev \ DISTRELEASE=%{release} \ V=1 @@ -353,7 +352,6 @@ BuildRequires: json-c-devel BuildRequires: rpm-devel BuildRequires: glib2-devel BuildRequires: libxml2-devel -BuildRequires: liblockfile-devel %description base @@ -564,6 +562,11 @@ getent group zkeyadm > /dev/null || groupadd -r zkeyadm %config(noreplace) %{_sysconfdir}/sysconfig/dumpconf %{_sysconfdir}/mdevctl.d/* /usr/lib/dracut/modules.d/99ngdump/ +# own the mdevctl dirs until new release is available +%dir /usr/lib/mdevctl +%dir /usr/lib/mdevctl/scripts.d +%dir /usr/lib/mdevctl/scripts.d/callouts +/usr/lib/mdevctl/scripts.d/callouts/ap-check /lib/s390-tools/dumpconf /lib/s390-tools/lsznet.raw %dir /lib/s390-tools/zfcpdump @@ -919,6 +922,7 @@ Requires(preun): systemd Requires(postun): systemd Requires(pre): shadow-utils BuildRequires: systemd +BuildRequires: systemd-devel %description cpacfstatsd The cpacfstats tools provide a client/server application set to monitor @@ -1006,9 +1010,19 @@ User-space development files for the s390/s390x architecture. %changelog -* Thu Dec 08 2022 Dan Horák - 2:2.22.0-2.1 -- zipl: Add secure boot trailer (#2151821) -- Resolves: #2151821 +* Fri Feb 03 2023 Dan Horák - 2:2.25.0-2 +- zkey: Support EP11 host library version 4 (#2165811) +- Resolves: #2165811 + +* Tue Dec 13 2022 Dan Horák - 2:2.25.0-1 +- rebased to 2.25.0 (#2110312) +- KVM: Tool to process encrypted Secure Execution guest dumps (#2043851) +- zipl: Support for Secure Boot IPL and Dump from ECKD DASD (#2043852) +- zdev: Site-aware device configuration (#2043858) +- Display Processor Activity Instrumentation CPACF counters (#2111013) +- Transparent DASD PPRC (Peer-to-Peer Remote Copy) handling (#2126618) +- zipl: Add secure boot trailer (#2142884) +- Resolves: #2110312 #2043851 #2043852 #2043858 #2111013 #2126618 #2142884 * Fri Aug 05 2022 Dan Horák - 2:2.22.0-2 - zipl: Add missing check for a nullpointer (#2113976)