Accepting request 227786 from home:jones_tony:branches:Kernel:kdump
OBS-URL: https://build.opensuse.org/request/show/227786 OBS-URL: https://build.opensuse.org/package/show/Kernel:kdump/kexec-tools?expand=0&rev=41
This commit is contained in:
parent
cd3d9e04cf
commit
5056176e52
@ -0,0 +1,31 @@
|
|||||||
|
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
|
||||||
|
|
||||||
|
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
|
54
kexec-tools-zero-efi-info.patch
Normal file
54
kexec-tools-zero-efi-info.patch
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
From: Tony Jones <tonyj@suse.de>
|
||||||
|
Subject: Disable erroneous efi memory descriptor version message
|
||||||
|
References: bnc#867785c5
|
||||||
|
Upstream: not yet
|
||||||
|
|
||||||
|
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,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Mar 18 16:45:14 UTC 2014 - tonyj@suse.com
|
||||||
|
|
||||||
|
- Disable stack protector for ppc64le (bnc#869161)
|
||||||
|
- Disable erroneous (efi memory descriptor version" message (bnc#867785c5)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Feb 6 01:14:24 UTC 2014 - tonyj@suse.com
|
Thu Feb 6 01:14:24 UTC 2014 - tonyj@suse.com
|
||||||
|
|
||||||
|
@ -40,6 +40,8 @@ Patch4: %{name}-enable-aarch64.patch
|
|||||||
Patch5: %{name}-xen-e820-redefinition.patch
|
Patch5: %{name}-xen-e820-redefinition.patch
|
||||||
Patch6: %{name}-enable-aarch64-fixup.patch
|
Patch6: %{name}-enable-aarch64-fixup.patch
|
||||||
Patch7: %{name}-i386-bzimage_efi.patch
|
Patch7: %{name}-i386-bzimage_efi.patch
|
||||||
|
Patch8: %{name}-ppc64-purgatory-disabling-gcc-stack-protection.patch
|
||||||
|
Patch9: %{name}-zero-efi-info.patch
|
||||||
Url: ftp://kernel.org/pub/linux/utils/kernel/kexec/%{name}-%{version}.tar.bz2
|
Url: ftp://kernel.org/pub/linux/utils/kernel/kexec/%{name}-%{version}.tar.bz2
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
#!BuildIgnore: fop
|
#!BuildIgnore: fop
|
||||||
@ -67,12 +69,14 @@ the loaded kernel after it panics.
|
|||||||
%patch5 -p1
|
%patch5 -p1
|
||||||
%patch6 -p1
|
%patch6 -p1
|
||||||
%patch7 -p1
|
%patch7 -p1
|
||||||
|
%patch8 -p1
|
||||||
|
%patch9 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# disable as-needed
|
# disable as-needed
|
||||||
export SUSE_ASNEEDED=0
|
export SUSE_ASNEEDED=0
|
||||||
%{?suse_update_config -f}
|
%{?suse_update_config -f}
|
||||||
%ifarch ia64
|
%ifarch ia64 ppc64le
|
||||||
RPM_OPT_FLAGS=$(echo $RPM_OPT_FLAGS | sed -e 's/-fstack-protector//')
|
RPM_OPT_FLAGS=$(echo $RPM_OPT_FLAGS | sed -e 's/-fstack-protector//')
|
||||||
%endif
|
%endif
|
||||||
autoreconf -f
|
autoreconf -f
|
||||||
|
Loading…
Reference in New Issue
Block a user