Accepting request 401235 from home:jones_tony:branches:Kernel:kdump

- Update to version 2.0.12 (FATE#320915, bsc#980545)
  Changelog: http://git.kernel.org/cgit/utils/kernel/kexec/kexec-tools.git/log/?id=refs/tags/v2.0.10..v2.0.12
  Drop following patches (upstream):
   kexec-tools-load-crash-kernel-high.patch
-  Fix pkg-config to check >= 4.7 rather than > 4.6 for xenlight
-  Specifically name Files in specfile rather than using glob.

OBS-URL: https://build.opensuse.org/request/show/401235
OBS-URL: https://build.opensuse.org/package/show/Kernel:kdump/kexec-tools?expand=0&rev=71
This commit is contained in:
Tony Jones 2016-06-10 20:07:09 +00:00 committed by Git OBS Bridge
parent a9cfdb74ab
commit cf62e2066a
6 changed files with 24 additions and 107 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e23e4149712c861b2755e268a89d2e73a6cd1af4abc362a1ce419e212d19a1a3
size 273104

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:14ce67b6242426a7ded10f58b7d29d3cfef5c1379850e8ba3816bb42053f920d
size 274776

View File

@ -1,97 +0,0 @@
From: Petr Tesarik <ptesarik@suse.com>
Date: Thu Sep 24 08:48:52 2015 +0200
Subject: Load crash kernel high on x86
References: bsc#946365
Patch-mainline: post-v2.0.10
Git-commit: 4fbf781eb0383a491906d3851b066657b29c2816
There may be more than one crash kernel regions on x86. Currently,
kexec-tools picks the largest one. If high reservation is smaller
than low, it will try to load panic kernel low. However, the kexec
syscall checks that target address is within crashk_res boundaries,
so attempts to load crash kernel low result in -EADDRNOTAVAIL, and
kexec prints out this error message:
kexec_load failed: Cannot assign requested address
Looking at the logic in arch/x86/kernel/setup.c, there are only two
possible layouts:
1. crashk_res is below 4G, and there is only one region,
2. crashk_res is above 4G, and crashk_low_res is below 4G
In either case, kexec-tools must pick the highest region.
Changelog:
* v3: rename function to get_crash_kernel_load_range
* v2: remove unnecessary local variables
Signed-off-by: Petr Tesarik <ptesarik@suse.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
---
kexec/arch/i386/crashdump-x86.c | 21 +++++++--------------
kexec/arch/i386/kexec-x86-common.c | 4 ++--
kexec/kexec.h | 2 +-
3 files changed, 10 insertions(+), 17 deletions(-)
--- a/kexec/arch/i386/crashdump-x86.c
+++ b/kexec/arch/i386/crashdump-x86.c
@@ -1017,24 +1017,17 @@ int load_crashdump_segments(struct kexec
return 0;
}
-int get_max_crash_kernel_limit(uint64_t *start, uint64_t *end)
+/* On x86, the kernel may make a low reservation in addition to the
+ * normal reservation. However, the kernel refuses to load the panic
+ * kernel to low memory, so always choose the highest range.
+ */
+int get_crash_kernel_load_range(uint64_t *start, uint64_t *end)
{
- int i, idx = -1;
- unsigned long sz_max = 0, sz;
-
if (!crash_reserved_mem_nr)
return -1;
- for (i = crash_reserved_mem_nr - 1; i >= 0; i--) {
- sz = crash_reserved_mem[i].end - crash_reserved_mem[i].start +1;
- if (sz <= sz_max)
- continue;
- sz_max = sz;
- idx = i;
- }
-
- *start = crash_reserved_mem[idx].start;
- *end = crash_reserved_mem[idx].end;
+ *start = crash_reserved_mem[crash_reserved_mem_nr - 1].start;
+ *end = crash_reserved_mem[crash_reserved_mem_nr - 1].end;
return 0;
}
--- a/kexec/arch/i386/kexec-x86-common.c
+++ b/kexec/arch/i386/kexec-x86-common.c
@@ -361,9 +361,9 @@ int get_memory_ranges(struct memory_rang
!(kexec_flags & KEXEC_PRESERVE_CONTEXT)) {
uint64_t start, end;
- ret = get_max_crash_kernel_limit(&start, &end);
+ ret = get_crash_kernel_load_range(&start, &end);
if (ret != 0) {
- fprintf(stderr, "get_max_crash_kernel_limit failed.\n");
+ fprintf(stderr, "get_crash_kernel_load_range failed.\n");
return -1;
}
--- a/kexec/kexec.h
+++ b/kexec/kexec.h
@@ -286,7 +286,7 @@ int arch_process_options(int argc, char
int arch_compat_trampoline(struct kexec_info *info);
void arch_update_purgatory(struct kexec_info *info);
int is_crashkernel_mem_reserved(void);
-int get_max_crash_kernel_limit(uint64_t *start, uint64_t *end);
+int get_crash_kernel_load_range(uint64_t *start, uint64_t *end);
char *get_command_line(void);
int kexec_iomem_for_each_line(char *match,

View File

@ -18,11 +18,11 @@ Signed-off-by: Bernhard Walle <bwalle@suse.de>
dnl find Xen control stack libraries
if test "$with_xen" = yes ; then
+ if pkg-config --exists 'xenlight > 4.6' ; then
+ if pkg-config --exists 'xenlight >= 4.7' ; then
AC_CHECK_HEADER(xenctrl.h,
- [AC_CHECK_LIB(xenctrl, xc_kexec_load, ,
+ [AC_CHECK_LIB(xenctrl, xc_kexec_load,
+ [AC_DEFINE([HAVE_LIBXENCTRL], [1], [libxenctrl]) [LIBS="-Wl,-Bstatic -lxenctrl -lxencall -lxentoollog -lxenforeignmemory -Wl,-Bdynamic -lpthread -ldl $LIBS"]],
+ [AC_DEFINE([HAVE_LIBXENCTRL], [1], [libxenctrl]) [LIBS="-Wl,-Bstatic -lxenctrl -lxencall -lxentoollog -lxenforeignmemory -Wl,-Bdynamic -lpthread -ldl $LIBS"]],
AC_MSG_NOTICE([Xen support disabled]))])
+ else
+ AC_CHECK_HEADER(xenctrl.h,

View File

@ -1,3 +1,16 @@
-------------------------------------------------------------------
Fri Jun 3 18:16:51 UTC 2016 - tonyj@suse.com
- Update to version 2.0.12 (FATE#320915, bsc#980545)
Changelog: http://git.kernel.org/cgit/utils/kernel/kexec/kexec-tools.git/log/?id=refs/tags/v2.0.10..v2.0.12
Drop following patches (upstream):
kexec-tools-load-crash-kernel-high.patch
- Fix pkg-config to check >= 4.7 rather than > 4.6 for xenlight
- Specifically name Files in specfile rather than using glob.
-------------------------------------------------------------------
Tue May 3 15:17:15 UTC 2016 - olaf@aepfle.de

View File

@ -28,7 +28,7 @@ Requires(postun): coreutils
Summary: Tools for fast kernel loading
License: GPL-2.0+
Group: System/Kernel
Version: 2.0.10
Version: 2.0.12
Release: 0
Source: ftp://kernel.org/pub/linux/utils/kernel/kexec/%{name}-%{version}.tar.xz
Source1: kexec-bootloader
@ -40,7 +40,6 @@ Patch2: %{name}-xen-balloon-up.patch
Patch3: %{name}-disable-test.patch
Patch4: %{name}-enable-aarch64.patch
Patch5: %{name}-enable-aarch64-fixup.patch
Patch6: %{name}-load-crash-kernel-high.patch
Url: ftp://kernel.org/pub/linux/utils/kernel/kexec/%{name}-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@ -68,7 +67,6 @@ the loaded kernel after it panics.
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%build
# disable as-needed
@ -126,10 +124,13 @@ ln -s %{_sbindir}/kexec $RPM_BUILD_ROOT/sbin
%doc AUTHORS COPYING News TODO doc
%doc %{_mandir}/man*/*
#UsrMerge
/sbin/*
/sbin/kdump
/sbin/kexec
#EndUsrMerge
%{_sbindir}/*
%{_sbindir}/kdump
%{_sbindir}/kexec
%{_sbindir}/kexec-bootloader
%{_sbindir}/vmcore-dmesg
%{_unitdir}/kexec-load.service
%changelog