Accepting request 254894 from Kernel:kdump
1 OBS-URL: https://build.opensuse.org/request/show/254894 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/kexec-tools?expand=0&rev=106
This commit is contained in:
commit
5b07fb43b2
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:216f91cadd1cd7ab3dd96b9d50a8d1ae68c65ae01f5b19233d985d75fbbf56e7
|
||||
size 279684
|
3
kexec-tools-2.0.8.tar.xz
Normal file
3
kexec-tools-2.0.8.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f3abe96fa0793e63936725a4471429f070039a1e81e605deb378747194a50c47
|
||||
size 272648
|
@ -1,54 +0,0 @@
|
||||
From: Laurent Dufour <ldufour@linux.vnet.ibm.com>
|
||||
Subject: [PATCH] kexec/fs2dt : Fix endianess issue with initrd base and size
|
||||
Date: Fri, 11 Apr 2014 12:10:30 +0200
|
||||
Git-commit: db3c32babc5279816344be8210ca91a64331f0fe
|
||||
References: bnc#873169
|
||||
Signed-off-by: Tony Jones <tonyj@suse.de>
|
||||
|
||||
The initrd values exposed in the device tree of the kexeced kernel must be
|
||||
encoded in Big Endian format.
|
||||
|
||||
Without this patch, kexeced LE kernel are expected to panic when dealing
|
||||
with the initrd image.
|
||||
|
||||
Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
|
||||
---
|
||||
kexec/fs2dt.c | 9 +++++----
|
||||
1 file changed, 5 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/kexec/fs2dt.c b/kexec/fs2dt.c
|
||||
index 5e6b98d..2a90979 100644
|
||||
--- a/kexec/fs2dt.c
|
||||
+++ b/kexec/fs2dt.c
|
||||
@@ -531,7 +531,7 @@ static void putnode(void)
|
||||
/* Add initrd entries to the second kernel */
|
||||
if (initrd_base && initrd_size && !strcmp(basename,"chosen/")) {
|
||||
int len = 8;
|
||||
- unsigned long long initrd_end;
|
||||
+ uint64_t bevalue;
|
||||
|
||||
dt_reserve(&dt, 12); /* both props, of 6 words ea. */
|
||||
*dt++ = cpu_to_be32(3);
|
||||
@@ -539,7 +539,8 @@ static void putnode(void)
|
||||
*dt++ = cpu_to_be32(propnum("linux,initrd-start"));
|
||||
pad_structure_block(len);
|
||||
|
||||
- memcpy(dt,&initrd_base,len);
|
||||
+ bevalue = cpu_to_be64(initrd_base);
|
||||
+ memcpy(dt, &bevalue, len);
|
||||
dt += (len + 3)/4;
|
||||
|
||||
len = 8;
|
||||
@@ -547,10 +548,10 @@ static void putnode(void)
|
||||
*dt++ = cpu_to_be32(len);
|
||||
*dt++ = cpu_to_be32(propnum("linux,initrd-end"));
|
||||
|
||||
- initrd_end = initrd_base + initrd_size;
|
||||
+ bevalue = cpu_to_be64(initrd_base + initrd_size);
|
||||
pad_structure_block(len);
|
||||
|
||||
- memcpy(dt,&initrd_end,len);
|
||||
+ memcpy(dt, &bevalue, len);
|
||||
dt += (len + 3)/4;
|
||||
|
||||
reserve(initrd_base, initrd_size);
|
@ -1,24 +0,0 @@
|
||||
From: Tony Jones <tonyj@suse.de>
|
||||
Subject: i386: fix build failure (bzImage_support_efi_boot)
|
||||
Upstream: yes
|
||||
Git-commit: 9bcefc97bc6c03b6acc8c25f6b1d4e796521ea4c
|
||||
|
||||
Commit 9c200a85de2245a850546fded96a1977b84ad24d referenced
|
||||
'bzImage_support_efi_boot' without matching 32-bit definition.
|
||||
|
||||
Signed-off-by: Tony Jones <tonyj@suse.de>
|
||||
Signed-off-by: Simon Horman <horms@verge.net.au>
|
||||
---
|
||||
kexec/arch/i386/kexec-bzImage.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
--- a/kexec/arch/i386/kexec-bzImage.c
|
||||
+++ b/kexec/arch/i386/kexec-bzImage.c
|
||||
@@ -40,6 +40,7 @@
|
||||
#include <arch/options.h>
|
||||
|
||||
static const int probe_debug = 0;
|
||||
+int bzImage_support_efi_boot = 0;
|
||||
|
||||
int bzImage_probe(const char *buf, off_t len)
|
||||
{
|
@ -1,31 +0,0 @@
|
||||
From: Laurent Dufour <ldufour@linux.vnet.ibm.com>
|
||||
Subject: kdump fix ELF header endianess
|
||||
References: bnc#888150
|
||||
Signed-off-by: Tony Jones <tonyj@suse.de>
|
||||
Upstream: pending
|
||||
|
||||
The ELF header created among the loading of the kdump kernel should be
|
||||
flagged using the current endianess and not always as big endian.
|
||||
|
||||
Without this patch the data exposed in /proc/vmcore are not readable when
|
||||
running in LE mode.
|
||||
|
||||
Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
|
||||
---
|
||||
kexec/arch/ppc64/crashdump-ppc64.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
--- a/kexec/arch/ppc64/crashdump-ppc64.c
|
||||
+++ b/kexec/arch/ppc64/crashdump-ppc64.c
|
||||
@@ -38,7 +38,11 @@
|
||||
static struct crash_elf_info elf_info64 =
|
||||
{
|
||||
class: ELFCLASS64,
|
||||
+#if BYTE_ORDER == LITTLE_ENDIAN
|
||||
+ data: ELFDATA2LSB,
|
||||
+#else
|
||||
data: ELFDATA2MSB,
|
||||
+#endif
|
||||
machine: EM_PPC64,
|
||||
page_offset: PAGE_OFFSET,
|
||||
lowmem_limit: MAXMEM,
|
@ -1,45 +0,0 @@
|
||||
From: Laurent Dufour <ldufour@linux.vnet.ibm.com>
|
||||
Subject: ppc64/purgatory: Device tree values should be read/stored in Big Endian
|
||||
References: bnc#875485
|
||||
Git-commit: pending
|
||||
Signed-off-by: Tony Jones <tonyj@suse.de>
|
||||
|
||||
The purgatory code reads the device tree's version and stores if needed the
|
||||
currently running CPU number. These 2 values are stored in Big Endian
|
||||
format in the device tree and should be byte swapped when running in Little
|
||||
Endian mode.
|
||||
|
||||
Without this fix, when running in SMP environment, kexec or kdump kernel may
|
||||
fail booting with the following message :
|
||||
Failed to identify boot CPU
|
||||
|
||||
Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
|
||||
---
|
||||
purgatory/arch/ppc64/v2wrap.S | 10 ++++++++++
|
||||
1 file changed, 10 insertions(+)
|
||||
|
||||
diff --git a/purgatory/arch/ppc64/v2wrap.S b/purgatory/arch/ppc64/v2wrap.S
|
||||
index 6fc62e3..dc5034f 100644
|
||||
--- a/purgatory/arch/ppc64/v2wrap.S
|
||||
+++ b/purgatory/arch/ppc64/v2wrap.S
|
||||
@@ -90,10 +90,20 @@ master:
|
||||
LOADADDR(16, dt_offset)
|
||||
ld 3,0(16) # load device-tree address
|
||||
mr 16,3 # save dt address in reg16
|
||||
+#ifdef __BIG_ENDIAN__
|
||||
lwz 6,20(3) # fetch version number
|
||||
+#else
|
||||
+ li 4,20
|
||||
+ lwbrx 6,3,4 # fetch BE version number
|
||||
+#endif
|
||||
cmpwi 0,6,2 # v2 ?
|
||||
blt 80f
|
||||
+#ifdef __BIG_ENDIAN__
|
||||
stw 17,28(3) # save my cpu number as boot_cpu_phys
|
||||
+#else
|
||||
+ li 4,28
|
||||
+ stwbrx 17,3,4 # Store my cpu as BE value
|
||||
+#endif
|
||||
80:
|
||||
LOADADDR(6,opal_base) # For OPAL early debug
|
||||
ld 8,0(6) # load the OPAL base address in r8
|
@ -1,34 +0,0 @@
|
||||
From: Laurent Dufour <ldufour@linux.vnet.ibm.com>
|
||||
Date: Tue, 25 Mar 2014 10:55:53 +0100
|
||||
Subject: [PATCH] ppc64/purgatory: Disabling GCC's stack protection
|
||||
Git-commit: 7d33c8933ebf8e1788ffff0132b6e08a2388748c
|
||||
References: bnc#869161
|
||||
Signed-off-by: Tony Jones <tonyj@suse.de>
|
||||
|
||||
Some Linux distributions, like Suse, are turning on the GCC's stack
|
||||
protection mechanism by default (-fstack-protector). When building the
|
||||
purgatory with this option, this leads to link issues that are revealed at
|
||||
runtime when the purgatory is loaded because symbols like __stack_chk_fail
|
||||
are unresolved.
|
||||
|
||||
This patch forces this stack protection mechanism to be turned off when
|
||||
building the purgatory on ppc64 BE and LE.
|
||||
|
||||
Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
|
||||
---
|
||||
purgatory/arch/ppc64/Makefile | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/purgatory/arch/ppc64/Makefile b/purgatory/arch/ppc64/Makefile
|
||||
index 31076e9..712e2b1 100644
|
||||
--- a/purgatory/arch/ppc64/Makefile
|
||||
+++ b/purgatory/arch/ppc64/Makefile
|
||||
@@ -9,7 +9,7 @@ ppc64_PURGATORY_SRCS += purgatory/arch/ppc64/console-ppc64.c
|
||||
ppc64_PURGATORY_SRCS += purgatory/arch/ppc64/crashdump_backup.c
|
||||
ppc64_PURGATORY_SRCS += purgatory/arch/ppc64/misc.S
|
||||
|
||||
-ppc64_PURGATORY_EXTRA_CFLAGS += -m64 -msoft-float
|
||||
+ppc64_PURGATORY_EXTRA_CFLAGS += -m64 -msoft-float -fno-stack-protector
|
||||
ppc64_PURGATORY_EXTRA_ASFLAGS += -m64
|
||||
ifeq ($(SUBARCH),BE)
|
||||
ppc64_PURGATORY_EXTRA_LDFLAGS += -melf64ppc
|
@ -179,15 +179,15 @@ Disable ballooning before doing kexec.
|
||||
unsigned long machine = elf_info->machine;
|
||||
--- a/kexec/kexec.c
|
||||
+++ b/kexec/kexec.c
|
||||
@@ -1071,6 +1071,7 @@ int main(int argc, char *argv[])
|
||||
@@ -1173,6 +1173,7 @@ int main(int argc, char *argv[])
|
||||
int do_shutdown = 1;
|
||||
int do_sync = 1;
|
||||
int do_ifdown = 0;
|
||||
+ int do_balloon = 0;
|
||||
int do_unload = 0;
|
||||
int do_reuse_initrd = 0;
|
||||
void *entry = 0;
|
||||
@@ -1105,6 +1106,7 @@ int main(int argc, char *argv[])
|
||||
int do_kexec_file_syscall = 0;
|
||||
@@ -1227,6 +1228,7 @@ int main(int argc, char *argv[])
|
||||
do_shutdown = 0;
|
||||
do_sync = 1;
|
||||
do_ifdown = 1;
|
||||
@ -195,7 +195,7 @@ Disable ballooning before doing kexec.
|
||||
do_exec = 1;
|
||||
break;
|
||||
case OPT_LOAD:
|
||||
@@ -1123,6 +1125,7 @@ int main(int argc, char *argv[])
|
||||
@@ -1247,6 +1249,7 @@ int main(int argc, char *argv[])
|
||||
do_shutdown = 0;
|
||||
do_sync = 1;
|
||||
do_ifdown = 1;
|
||||
@ -203,7 +203,7 @@ Disable ballooning before doing kexec.
|
||||
do_exec = 1;
|
||||
break;
|
||||
case OPT_LOAD_JUMP_BACK_HELPER:
|
||||
@@ -1246,6 +1249,9 @@ int main(int argc, char *argv[])
|
||||
@@ -1384,6 +1387,9 @@ int main(int argc, char *argv[])
|
||||
if ((result == 0) && do_ifdown) {
|
||||
ifdown();
|
||||
}
|
||||
@ -215,7 +215,7 @@ Disable ballooning before doing kexec.
|
||||
}
|
||||
--- a/kexec/kexec.h
|
||||
+++ b/kexec/kexec.h
|
||||
@@ -293,5 +293,6 @@ int xen_present(void);
|
||||
@@ -305,5 +305,6 @@ int xen_present(void);
|
||||
int xen_kexec_load(struct kexec_info *info);
|
||||
int xen_kexec_unload(uint64_t kexec_flags);
|
||||
void xen_kexec_exec(void);
|
||||
|
@ -1,32 +0,0 @@
|
||||
From: Tony Jones <tonyj@suse.de>
|
||||
Subject: fix redefinition error for e820
|
||||
Upstream: yes
|
||||
Git-commit: 941fa1f6e31bc7cb1b014277de36b80425da7010
|
||||
|
||||
At least on our systems, xenctrl.h defines (unguarded) struct e820entry
|
||||
Move the (guarded) definition in include/x86/x86-linux.h to below.
|
||||
|
||||
Signed-off-by: Tony Jones <tonyj@suse.de>
|
||||
Signed-off-by: Simon Horman <horms@verge.net.au>
|
||||
|
||||
---
|
||||
kexec/arch/i386/crashdump-x86.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/kexec/arch/i386/crashdump-x86.c
|
||||
+++ b/kexec/arch/i386/crashdump-x86.c
|
||||
@@ -41,12 +41,13 @@
|
||||
#include "../../crashdump.h"
|
||||
#include "kexec-x86.h"
|
||||
#include "crashdump-x86.h"
|
||||
-#include "x86-linux-setup.h"
|
||||
|
||||
#ifdef HAVE_LIBXENCTRL
|
||||
#include <xenctrl.h>
|
||||
#endif /* HAVE_LIBXENCTRL */
|
||||
|
||||
+#include "x86-linux-setup.h"
|
||||
+
|
||||
#include <x86/x86-linux.h>
|
||||
|
||||
extern struct arch_options_t arch_options;
|
@ -1,55 +0,0 @@
|
||||
From: Tony Jones <tonyj@suse.de>
|
||||
Subject: Disable erroneous efi memory descriptor version message
|
||||
References: bnc#867785c5
|
||||
Git-commit: 3e5443fffb2c311a61fe157be25b80de53329604
|
||||
Signed-off-by: Tony Jones <tonyj@suse.de>
|
||||
|
||||
On non-EFI systems, efi_info section of boot_params is zero filled resulting
|
||||
in an erroneous message from kexec regarding "efi memory descriptor" version.
|
||||
|
||||
Caused by commit: e1ffc9e9a0769e1f54185003102e9bec428b84e8 "Passing efi related
|
||||
data via setup_data"
|
||||
|
||||
# od -j 448 -N 32 -v -x /sys/kernel/boot_params/data
|
||||
0000700 0000 0000 0000 0000 0000 0000 0000 0000
|
||||
0000720 0000 0000 0000 0000 0000 0000 0000 0000
|
||||
0000740
|
||||
|
||||
# kexec -l --reuse-cmdline --initrd=/boot/initrd-`uname -r` /boot/vmlinuz-`uname -r`
|
||||
efi memory descriptor version 0 is not supported!
|
||||
|
||||
---
|
||||
kexec/arch/i386/x86-linux-setup.c | 14 +++++++++++---
|
||||
1 file changed, 11 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/kexec/arch/i386/x86-linux-setup.c
|
||||
+++ b/kexec/arch/i386/x86-linux-setup.c
|
||||
@@ -687,17 +687,25 @@ static void setup_efi_info(struct kexec_
|
||||
ret = get_bootparam(&real_mode->efi_info, offset, 32);
|
||||
if (ret)
|
||||
return;
|
||||
+ if (((struct efi_info *)real_mode->efi_info)->efi_memmap_size == 0)
|
||||
+ /* zero filled efi_info */
|
||||
+ goto out;
|
||||
desc_version = get_efi_mem_desc_version(real_mode);
|
||||
if (desc_version != 1) {
|
||||
fprintf(stderr,
|
||||
"efi memory descriptor version %d is not supported!\n",
|
||||
desc_version);
|
||||
- memset(&real_mode->efi_info, 0, 32);
|
||||
- return;
|
||||
+ goto out;
|
||||
}
|
||||
ret = setup_efi_data(info, real_mode);
|
||||
if (ret)
|
||||
- memset(&real_mode->efi_info, 0, 32);
|
||||
+ goto out;
|
||||
+
|
||||
+ return;
|
||||
+
|
||||
+out:
|
||||
+ memset(&real_mode->efi_info, 0, 32);
|
||||
+ return;
|
||||
}
|
||||
|
||||
void setup_linux_system_parameters(struct kexec_info *info,
|
@ -1,3 +1,16 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Oct 9 16:38:05 UTC 2014 - ptesarik@suse.cz
|
||||
|
||||
- Upgrade to kexec-2.0.8
|
||||
- Dropped patches (now upstream):
|
||||
o kexec-tools-xen-e820-redefinition.patch
|
||||
o kexec-tools-i386-bzimage_efi.patch
|
||||
o kexec-tools-ppc64-purgatory-disabling-gcc-stack-protection.patch
|
||||
o kexec-tools-zero-efi-info.patch
|
||||
o kexec-tools-fs2dt-fix-endianess-issue-with-initrd-base-and-size.patch
|
||||
o kexec-tools-ppc64-purgatory-device-tree-values-should-be-read-stored-in-big-endian.patch
|
||||
o kexec-tools-kdump-fix-elf-header-endianess.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 19 21:06:29 UTC 2014 - tonyj@suse.com
|
||||
|
||||
|
@ -26,7 +26,7 @@ PreReq: %fillup_prereq
|
||||
Summary: Tools for fast kernel loading
|
||||
License: GPL-2.0+
|
||||
Group: System/Kernel
|
||||
Version: 2.0.5
|
||||
Version: 2.0.8
|
||||
Release: 0
|
||||
Source: ftp://kernel.org/pub/linux/utils/kernel/kexec/%{name}-%{version}.tar.xz
|
||||
Source1: kexec-bootloader
|
||||
@ -37,14 +37,7 @@ Patch1: %{name}-xen-static.patch
|
||||
Patch2: %{name}-xen-balloon-up.patch
|
||||
Patch3: %{name}-disable-test.patch
|
||||
Patch4: %{name}-enable-aarch64.patch
|
||||
Patch5: %{name}-xen-e820-redefinition.patch
|
||||
Patch6: %{name}-enable-aarch64-fixup.patch
|
||||
Patch7: %{name}-i386-bzimage_efi.patch
|
||||
Patch8: %{name}-ppc64-purgatory-disabling-gcc-stack-protection.patch
|
||||
Patch9: %{name}-zero-efi-info.patch
|
||||
Patch10: %{name}-fs2dt-fix-endianess-issue-with-initrd-base-and-size.patch
|
||||
Patch11: %{name}-ppc64-purgatory-device-tree-values-should-be-read-stored-in-big-endian.patch
|
||||
Patch12: %{name}-kdump-fix-elf-header-endianess.patch
|
||||
|
||||
Url: ftp://kernel.org/pub/linux/utils/kernel/kexec/%{name}-%{version}.tar.bz2
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
@ -70,14 +63,7 @@ the loaded kernel after it panics.
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
%patch6 -p1
|
||||
%patch7 -p1
|
||||
%patch8 -p1
|
||||
%patch9 -p1
|
||||
%patch10 -p1
|
||||
%patch11 -p1
|
||||
%patch12 -p1
|
||||
|
||||
%build
|
||||
# disable as-needed
|
||||
|
Loading…
Reference in New Issue
Block a user