Hello community, here is the log from the commit of package kdump for openSUSE:Factory checked in at 2018-01-30 15:37:15 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kdump (Old) and /work/SRC/openSUSE:Factory/.kdump.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kdump" Tue Jan 30 15:37:15 2018 rev:92 rq:569861 version:0.8.16 Changes: -------- --- /work/SRC/openSUSE:Factory/kdump/kdump.changes 2018-01-16 09:32:57.692109982 +0100 +++ /work/SRC/openSUSE:Factory/.kdump.new/kdump.changes 2018-01-30 15:37:25.282163680 +0100 @@ -1,0 +2,18 @@ +Fri Jan 26 13:03:47 UTC 2018 - [email protected] + +- kdump-fix-m_threads-missing-initialization.patch: Fix m_threads + missing initialization (bsc#1047609). + +------------------------------------------------------------------- +Tue Jan 16 13:35:49 UTC 2018 - [email protected] + +- kdump-try-both-kexec_load-and-kexec_file_load.patch: Try both + kexec_load(2) and kexec_file_load(2) (bsc#951144). + +------------------------------------------------------------------- +Tue Jan 16 13:32:25 UTC 2018 - [email protected] + +- kdump-kdump_echo-and-kdump_logger-helpers.patch: load.sh: + introduce kdump_echo and kdump_logger helpers (bsc#951144). + +------------------------------------------------------------------- New: ---- kdump-fix-m_threads-missing-initialization.patch kdump-kdump_echo-and-kdump_logger-helpers.patch kdump-try-both-kexec_load-and-kexec_file_load.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kdump.spec ++++++ --- /var/tmp/diff_new_pack.w5zrSa/_old 2018-01-30 15:37:26.714096825 +0100 +++ /var/tmp/diff_new_pack.w5zrSa/_new 2018-01-30 15:37:26.718096638 +0100 @@ -1,7 +1,7 @@ # # spec file for package kdump # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -76,6 +76,9 @@ Patch27: %{name}-Limit-kdump-cpus-to-number-provided-by-config.patch Patch28: %{name}-Don-t-split-by-default.patch Patch29: %{name}-fillupdir-fixes.patch +Patch30: %{name}-kdump_echo-and-kdump_logger-helpers.patch +Patch31: %{name}-try-both-kexec_load-and-kexec_file_load.patch +Patch32: %{name}-fix-m_threads-missing-initialization.patch BuildRequires: asciidoc BuildRequires: cmake BuildRequires: gcc-c++ @@ -167,6 +170,9 @@ %if 0%{?suse_version} >= 1330 %patch29 -p1 %endif +%patch30 -p1 +%patch31 -p1 +%patch32 -p1 %build export CFLAGS="%{optflags}" ++++++ kdump-fix-m_threads-missing-initialization.patch ++++++ From: Lance Wang <[email protected]> Date: Fri, 19 Jan 2018 16:05:42 +0800 Subject: Fix m_threads missing initialization References: bsc#1047609 Upstream: merged Git-commit: 0905910da2eaa856a0e8bf26bbe6b5e4e9dc0788 kdumptool randomly outputs value for --num-threads. So an error like following happened: makedumpfile --num-threads 5223023572093018873 -d 31 -l /proc/vmcore. Signed-off-by: Lance Wang <[email protected]> --- kdumptool/savedump.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/kdumptool/savedump.cc +++ b/kdumptool/savedump.cc @@ -61,7 +61,7 @@ using std::ifstream; SaveDump::SaveDump() throw () : m_dump(DEFAULT_DUMP), m_transfer(NULL), m_usedDirectSave(false), - m_useMakedumpfile(false), m_split(0), m_nomail(false) + m_useMakedumpfile(false), m_split(0), m_threads(0), m_nomail(false) { Debug::debug()->trace("SaveDump::SaveDump()"); ++++++ kdump-kdump_echo-and-kdump_logger-helpers.patch ++++++ From: Lance Wang <[email protected]> Date: Tue, 16 Jan 2018 13:37:37 +0100 Subject: load.sh: introduce kdump_echo and kdump_logger helpers References: bsc#951144 Upstream: merged Git-commit: b76b8fccbac6a7d2340d0452a6ba86530f588bfa Instead of checking the verbosity flags every time, check them once and provide an appropriate function definition. Signed-off-by: Lance Wang <[email protected]> --- init/load.sh | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) --- a/init/load.sh +++ b/init/load.sh @@ -163,9 +163,7 @@ function load_kdump_kexec() KEXEC_CALL="$KEXEC -p $kdump_kernel --append=\"$kdump_commandline\"" KEXEC_CALL="$KEXEC_CALL --initrd=$kdump_initrd $kexec_options" - if [ $((${KDUMP_VERBOSE:-0} & 4)) -gt 0 ] ; then - echo "Loading kdump kernel: $KEXEC_CALL" - fi + kdump_echo "Loading kdump kernel: $KEXEC_CALL" local output output=$(eval "$KEXEC_CALL" 2>&1) @@ -179,14 +177,10 @@ function load_kdump_kexec() # would be supressed (bnc#374185) echo -n "$output" - if [ $((${KDUMP_VERBOSE:-0} & 1)) -gt 0 ] ; then - if [ $result -eq 0 ] ; then - logger -i -t kdump \ - "Loaded kdump kernel: $KEXEC_CALL, Result: $output" - else - logger -i -t kdump \ - "FAILED to load kdump kernel: $KEXEC_CALL, Result: $output" - fi + if [ $result -eq 0 ] ; then + kdump_logger "Loaded kdump kernel: $KEXEC_CALL, Result: $output" + else + kdump_logger "FAILED to load kdump kernel: $KEXEC_CALL, Result: $output" fi return $result @@ -299,6 +293,24 @@ function rebuild_kdumprd() eval $($KDUMPTOOL dump_config) +if [ $((${KDUMP_VERBOSE:-0} & 4)) -gt 0 ] ; then + function kdump_echo() + { + echo "$@" + } +else + function kdump_echo(){ :; } +fi + +if [ $((${KDUMP_VERBOSE:-0} & 1)) -gt 0 ] ; then + function kdump_logger() + { + logger -i -t kdump "$@" + } +else + function kdump_logger(){ :; } +fi + if [ $((${KDUMP_VERBOSE:-0} & 16)) -gt 0 ] ; then KDUMPTOOL="$KDUMPTOOL -D" fi ++++++ kdump-try-both-kexec_load-and-kexec_file_load.patch ++++++ From: Lance Wang <[email protected]> Date: Tue, 16 Jan 2018 13:53:40 +0100 Subject: Try both kexec_load(2) and kexec_file_load(2) References: bsc#951144 Upstream: merged Git-commit: ab9c22489ef7627e3f0ad67f46ea19e8d401d044 The logic in load.sh will use kexec_load first. If kexec_load fails or is blocked by kernel, then it will try kexec_load_file on x86_64. Signed-off-by: Joey Lee <[email protected]> Signed-off-by: Lance Wang <[email protected]> Signed-off-by: Petr Tesarik <[email protected]> --- init/load.sh | 38 +++++++++++++++++++++++++------------- 1 file changed, 25 insertions(+), 13 deletions(-) --- a/init/load.sh +++ b/init/load.sh @@ -138,11 +138,6 @@ function build_kexec_options() options="$options --noio" fi - # add -s on x86_64 for signature verification of kernel - if [ "$(uname -i)" = "x86_64" ] ; then - options="$options -s" - fi - echo "$options" } @@ -151,6 +146,7 @@ function build_kexec_options() function load_kdump_kexec() { local result + local output if [ ! -f "$kdump_initrd" ] ; then echo "No kdump initial ramdisk found. Tried to locate $kdump_initrd." @@ -163,19 +159,35 @@ function load_kdump_kexec() KEXEC_CALL="$KEXEC -p $kdump_kernel --append=\"$kdump_commandline\"" KEXEC_CALL="$KEXEC_CALL --initrd=$kdump_initrd $kexec_options" - kdump_echo "Loading kdump kernel: $KEXEC_CALL" + kdump_echo "Starting load kdump kernel with kexec_file_load(2)" + kdump_echo "kexec cmdline: $KEXEC_CALL -s" - local output - output=$(eval "$KEXEC_CALL" 2>&1) - if [ $? -eq 0 ] ; then - result=0 - else - result=1 + output=$(eval "$KEXEC_CALL -s" 2>&1) + result=$? + if [ $result -eq 255 ] ; then + echo $output | grep -q 'syscall kexec_file_load not available' && result=7 fi # print stderr in any case to show warnings that normally # would be supressed (bnc#374185) - echo -n "$output" + echo -n "$output"; echo + + if [ $result -eq 0 ] ; then + kdump_logger "Loaded kdump kernel: $KEXEC_CALL -s, Result: $output" + return 0 + elif [ $result -ne 7 ]; then + kdump_logger "FAILED to load kdump kernel: $KEXEC_CALL -s, Result: $output" + return $result + fi + + # kexec_file_load(2) not available + kdump_echo "kexec_file_load(2) not available" + kdump_echo "Starting load kdump kernel with kexec_load(2)" + kdump_echo "kexec cmdline: $KEXEC_CALL" + + output=$(eval "$KEXEC_CALL" 2>&1) + result=$? + echo -n "$output";echo if [ $result -eq 0 ] ; then kdump_logger "Loaded kdump kernel: $KEXEC_CALL, Result: $output"
