From a38570dee87140e7ad06aef78c040bb238eb7b0f65a720441cf8a97f1b6b1b56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Tesa=C5=99=C3=ADk?= Date: Fri, 3 Apr 2020 11:48:44 +0000 Subject: [PATCH] Accepting request 791179 from home:ptesarik:branches:Kernel:kdump - kexec-tools-s390-Reset-kernel-command-line-on-syscal.patch: s390: Reset kernel command line on syscall fallback (bsc#1167868). OBS-URL: https://build.opensuse.org/request/show/791179 OBS-URL: https://build.opensuse.org/package/show/Kernel:kdump/kexec-tools?expand=0&rev=125 --- ...-Reset-kernel-command-line-on-syscal.patch | 31 +++++++++++++++++++ kexec-tools.changes | 6 ++++ kexec-tools.spec | 2 ++ 3 files changed, 39 insertions(+) create mode 100644 kexec-tools-s390-Reset-kernel-command-line-on-syscal.patch diff --git a/kexec-tools-s390-Reset-kernel-command-line-on-syscal.patch b/kexec-tools-s390-Reset-kernel-command-line-on-syscal.patch new file mode 100644 index 0000000..08ea841 --- /dev/null +++ b/kexec-tools-s390-Reset-kernel-command-line-on-syscal.patch @@ -0,0 +1,31 @@ +From: Petr Tesarik +Date: Fri, 3 Apr 2020 13:12:00 +0200 +Subject: kexec-tools: s390: Reset kernel command line on syscall fallback +References: bsc#1167868 +Upstream: submitted 2020-04-03 + +The command line is duplicated on s390 if kexec_file_load(2) is not +implemented. That's because the corresponding variable is not reset +to an empty string before re-parsing the kexec command line. + +Fixes: 9cf721279f6c ("Reset getopt before falling back to legacy syscall") +Signed-off-by: Petr Tesarik +--- + kexec/arch/s390/kexec-image.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/kexec/arch/s390/kexec-image.c b/kexec/arch/s390/kexec-image.c +index 8b39566..3c24fdf 100644 +--- a/kexec/arch/s390/kexec-image.c ++++ b/kexec/arch/s390/kexec-image.c +@@ -112,6 +112,7 @@ image_s390_load(int argc, char **argv, const char *kernel_buf, + }; + static const char short_options[] = KEXEC_OPT_STR ""; + ++ command_line[0] = 0; + ramdisk = NULL; + ramdisk_len = 0; + ramdisk_origin = 0; +-- +2.16.4 + diff --git a/kexec-tools.changes b/kexec-tools.changes index f473d24..0bd759f 100644 --- a/kexec-tools.changes +++ b/kexec-tools.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Apr 3 11:24:02 UTC 2020 - Petr Tesařík + +- kexec-tools-s390-Reset-kernel-command-line-on-syscal.patch: s390: + Reset kernel command line on syscall fallback (bsc#1167868). + ------------------------------------------------------------------- Fri Mar 13 14:11:55 UTC 2020 - Petr Tesařík diff --git a/kexec-tools.spec b/kexec-tools.spec index 3c1a1b0..578bc7e 100644 --- a/kexec-tools.spec +++ b/kexec-tools.spec @@ -38,6 +38,7 @@ Patch9: %{name}-video-capability.patch Patch10: %{name}-SYS_getrandom.patch Patch11: %{name}-fix-kexec_file_load-error-handling.patch Patch12: %{name}-reset-getopt-before-falling-back-to-legacy.patch +Patch13: %{name}-s390-Reset-kernel-command-line-on-syscal.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: systemd-rpm-macros @@ -72,6 +73,7 @@ the loaded kernel after it panics. %patch10 -p1 %patch11 -p1 %patch12 -p1 +%patch13 -p1 %build autoreconf -fvi