This commit is contained in:
parent
f9fefedce7
commit
f076a8f52c
@ -28,8 +28,6 @@ Signed-off-by: Bernhard Walle <bwalle@suse.de>
|
|||||||
kexec/arch/x86_64/kexec-elf-x86_64.c | 11 ++++++----
|
kexec/arch/x86_64/kexec-elf-x86_64.c | 11 ++++++----
|
||||||
9 files changed, 95 insertions(+), 25 deletions(-)
|
9 files changed, 95 insertions(+), 25 deletions(-)
|
||||||
|
|
||||||
Index: b/include/x86/x86-linux.h
|
|
||||||
===================================================================
|
|
||||||
--- a/include/x86/x86-linux.h
|
--- a/include/x86/x86-linux.h
|
||||||
+++ b/include/x86/x86-linux.h
|
+++ b/include/x86/x86-linux.h
|
||||||
@@ -148,14 +148,12 @@ struct x86_linux_param_header {
|
@@ -148,14 +148,12 @@ struct x86_linux_param_header {
|
||||||
@ -50,8 +48,6 @@ Index: b/include/x86/x86-linux.h
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct x86_linux_header {
|
struct x86_linux_header {
|
||||||
Index: b/kexec/arch/i386/crashdump-x86.c
|
|
||||||
===================================================================
|
|
||||||
--- a/kexec/arch/i386/crashdump-x86.c
|
--- a/kexec/arch/i386/crashdump-x86.c
|
||||||
+++ b/kexec/arch/i386/crashdump-x86.c
|
+++ b/kexec/arch/i386/crashdump-x86.c
|
||||||
@@ -46,6 +46,36 @@ static struct memory_range crash_memory_
|
@@ -46,6 +46,36 @@ static struct memory_range crash_memory_
|
||||||
@ -118,8 +114,6 @@ Index: b/kexec/arch/i386/crashdump-x86.c
|
|||||||
die("Command line overflow\n");
|
die("Command line overflow\n");
|
||||||
strcat(cmdline, str);
|
strcat(cmdline, str);
|
||||||
#if 0
|
#if 0
|
||||||
Index: b/kexec/arch/i386/crashdump-x86.h
|
|
||||||
===================================================================
|
|
||||||
--- a/kexec/arch/i386/crashdump-x86.h
|
--- a/kexec/arch/i386/crashdump-x86.h
|
||||||
+++ b/kexec/arch/i386/crashdump-x86.h
|
+++ b/kexec/arch/i386/crashdump-x86.h
|
||||||
@@ -2,8 +2,11 @@
|
@@ -2,8 +2,11 @@
|
||||||
@ -141,8 +135,66 @@ Index: b/kexec/arch/i386/crashdump-x86.h
|
|||||||
+extern int real_command_line_size;
|
+extern int real_command_line_size;
|
||||||
+
|
+
|
||||||
#endif /* CRASHDUMP_X86_H */
|
#endif /* CRASHDUMP_X86_H */
|
||||||
Index: b/kexec/arch/x86_64/crashdump-x86_64.c
|
--- a/kexec/arch/i386/kexec-bzImage.c
|
||||||
===================================================================
|
+++ b/kexec/arch/i386/kexec-bzImage.c
|
||||||
|
@@ -156,12 +156,12 @@ int do_bzImage_load(struct kexec_info *i
|
||||||
|
* taking crash dumps.
|
||||||
|
*/
|
||||||
|
if (info->kexec_flags & KEXEC_ON_CRASH) {
|
||||||
|
- modified_cmdline = xmalloc(COMMAND_LINE_SIZE);
|
||||||
|
- memset((void *)modified_cmdline, 0, COMMAND_LINE_SIZE);
|
||||||
|
+ modified_cmdline = xmalloc(real_command_line_size);
|
||||||
|
+ memset((void *)modified_cmdline, 0, real_command_line_size);
|
||||||
|
if (command_line) {
|
||||||
|
strncpy(modified_cmdline, command_line,
|
||||||
|
- COMMAND_LINE_SIZE);
|
||||||
|
- modified_cmdline[COMMAND_LINE_SIZE - 1] = '\0';
|
||||||
|
+ real_command_line_size);
|
||||||
|
+ modified_cmdline[real_command_line_size - 1] = '\0';
|
||||||
|
}
|
||||||
|
|
||||||
|
/* If panic kernel is being loaded, additional segments need
|
||||||
|
--- a/kexec/arch/i386/kexec-elf-x86.c
|
||||||
|
+++ b/kexec/arch/i386/kexec-elf-x86.c
|
||||||
|
@@ -166,12 +166,12 @@ int elf_x86_load(int argc, char **argv,
|
||||||
|
* taking crash dumps.
|
||||||
|
*/
|
||||||
|
if (info->kexec_flags & KEXEC_ON_CRASH) {
|
||||||
|
- modified_cmdline = xmalloc(COMMAND_LINE_SIZE);
|
||||||
|
- memset((void *)modified_cmdline, 0, COMMAND_LINE_SIZE);
|
||||||
|
+ modified_cmdline = xmalloc(real_command_line_size);
|
||||||
|
+ memset((void *)modified_cmdline, 0, real_command_line_size);
|
||||||
|
if (command_line) {
|
||||||
|
strncpy(modified_cmdline, command_line,
|
||||||
|
- COMMAND_LINE_SIZE);
|
||||||
|
- modified_cmdline[COMMAND_LINE_SIZE - 1] = '\0';
|
||||||
|
+ real_command_line_size);
|
||||||
|
+ modified_cmdline[real_command_line_size - 1] = '\0';
|
||||||
|
}
|
||||||
|
modified_cmdline_len = strlen(modified_cmdline);
|
||||||
|
}
|
||||||
|
--- a/kexec/arch/i386/x86-linux-setup.c
|
||||||
|
+++ b/kexec/arch/i386/x86-linux-setup.c
|
||||||
|
@@ -32,6 +32,8 @@
|
||||||
|
#include "kexec-x86.h"
|
||||||
|
#include "x86-linux-setup.h"
|
||||||
|
|
||||||
|
+extern int real_command_line_size;
|
||||||
|
+
|
||||||
|
void init_linux_parameters(struct x86_linux_param_header *real_mode)
|
||||||
|
{
|
||||||
|
/* Fill in the values that are usually provided by the kernel. */
|
||||||
|
@@ -91,8 +93,8 @@ void setup_linux_bootloader_parameters(
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Fill in the command line */
|
||||||
|
- if (cmdline_len > COMMAND_LINE_SIZE) {
|
||||||
|
- cmdline_len = COMMAND_LINE_SIZE;
|
||||||
|
+ if (cmdline_len > real_command_line_size) {
|
||||||
|
+ cmdline_len = real_command_line_size;
|
||||||
|
}
|
||||||
|
cmdline_ptr = ((char *)real_mode) + cmdline_offset;
|
||||||
|
memcpy(cmdline_ptr, cmdline, cmdline_len);
|
||||||
--- a/kexec/arch/x86_64/crashdump-x86_64.c
|
--- a/kexec/arch/x86_64/crashdump-x86_64.c
|
||||||
+++ b/kexec/arch/x86_64/crashdump-x86_64.c
|
+++ b/kexec/arch/x86_64/crashdump-x86_64.c
|
||||||
@@ -50,6 +50,35 @@ static struct crash_elf_info elf_info =
|
@@ -50,6 +50,35 @@ static struct crash_elf_info elf_info =
|
||||||
@ -208,8 +260,6 @@ Index: b/kexec/arch/x86_64/crashdump-x86_64.c
|
|||||||
die("Command line overflow\n");
|
die("Command line overflow\n");
|
||||||
strcat(cmdline, str_mmap);
|
strcat(cmdline, str_mmap);
|
||||||
|
|
||||||
Index: b/kexec/arch/x86_64/crashdump-x86_64.h
|
|
||||||
===================================================================
|
|
||||||
--- a/kexec/arch/x86_64/crashdump-x86_64.h
|
--- a/kexec/arch/x86_64/crashdump-x86_64.h
|
||||||
+++ b/kexec/arch/x86_64/crashdump-x86_64.h
|
+++ b/kexec/arch/x86_64/crashdump-x86_64.h
|
||||||
@@ -3,6 +3,7 @@
|
@@ -3,6 +3,7 @@
|
||||||
@ -227,8 +277,6 @@ Index: b/kexec/arch/x86_64/crashdump-x86_64.h
|
|||||||
+extern int real_command_line_size;
|
+extern int real_command_line_size;
|
||||||
+
|
+
|
||||||
#endif /* CRASHDUMP_X86_64_H */
|
#endif /* CRASHDUMP_X86_64_H */
|
||||||
Index: b/kexec/arch/x86_64/kexec-elf-x86_64.c
|
|
||||||
===================================================================
|
|
||||||
--- a/kexec/arch/x86_64/kexec-elf-x86_64.c
|
--- a/kexec/arch/x86_64/kexec-elf-x86_64.c
|
||||||
+++ b/kexec/arch/x86_64/kexec-elf-x86_64.c
|
+++ b/kexec/arch/x86_64/kexec-elf-x86_64.c
|
||||||
@@ -166,12 +166,12 @@ int elf_x86_64_load(int argc, char **arg
|
@@ -166,12 +166,12 @@ int elf_x86_64_load(int argc, char **arg
|
||||||
@ -258,69 +306,3 @@ Index: b/kexec/arch/x86_64/kexec-elf-x86_64.c
|
|||||||
/* Do we want arguments? */
|
/* Do we want arguments? */
|
||||||
if (arg_style != ARG_STYLE_NONE) {
|
if (arg_style != ARG_STYLE_NONE) {
|
||||||
/* Load the setup code */
|
/* Load the setup code */
|
||||||
Index: b/kexec/arch/i386/kexec-bzImage.c
|
|
||||||
===================================================================
|
|
||||||
--- a/kexec/arch/i386/kexec-bzImage.c
|
|
||||||
+++ b/kexec/arch/i386/kexec-bzImage.c
|
|
||||||
@@ -156,12 +156,12 @@ int do_bzImage_load(struct kexec_info *i
|
|
||||||
* taking crash dumps.
|
|
||||||
*/
|
|
||||||
if (info->kexec_flags & KEXEC_ON_CRASH) {
|
|
||||||
- modified_cmdline = xmalloc(COMMAND_LINE_SIZE);
|
|
||||||
- memset((void *)modified_cmdline, 0, COMMAND_LINE_SIZE);
|
|
||||||
+ modified_cmdline = xmalloc(real_command_line_size);
|
|
||||||
+ memset((void *)modified_cmdline, 0, real_command_line_size);
|
|
||||||
if (command_line) {
|
|
||||||
strncpy(modified_cmdline, command_line,
|
|
||||||
- COMMAND_LINE_SIZE);
|
|
||||||
- modified_cmdline[COMMAND_LINE_SIZE - 1] = '\0';
|
|
||||||
+ real_command_line_size);
|
|
||||||
+ modified_cmdline[real_command_line_size - 1] = '\0';
|
|
||||||
}
|
|
||||||
|
|
||||||
/* If panic kernel is being loaded, additional segments need
|
|
||||||
Index: b/kexec/arch/i386/kexec-elf-x86.c
|
|
||||||
===================================================================
|
|
||||||
--- a/kexec/arch/i386/kexec-elf-x86.c
|
|
||||||
+++ b/kexec/arch/i386/kexec-elf-x86.c
|
|
||||||
@@ -166,12 +166,12 @@ int elf_x86_load(int argc, char **argv,
|
|
||||||
* taking crash dumps.
|
|
||||||
*/
|
|
||||||
if (info->kexec_flags & KEXEC_ON_CRASH) {
|
|
||||||
- modified_cmdline = xmalloc(COMMAND_LINE_SIZE);
|
|
||||||
- memset((void *)modified_cmdline, 0, COMMAND_LINE_SIZE);
|
|
||||||
+ modified_cmdline = xmalloc(real_command_line_size);
|
|
||||||
+ memset((void *)modified_cmdline, 0, real_command_line_size);
|
|
||||||
if (command_line) {
|
|
||||||
strncpy(modified_cmdline, command_line,
|
|
||||||
- COMMAND_LINE_SIZE);
|
|
||||||
- modified_cmdline[COMMAND_LINE_SIZE - 1] = '\0';
|
|
||||||
+ real_command_line_size);
|
|
||||||
+ modified_cmdline[real_command_line_size - 1] = '\0';
|
|
||||||
}
|
|
||||||
modified_cmdline_len = strlen(modified_cmdline);
|
|
||||||
}
|
|
||||||
Index: b/kexec/arch/i386/x86-linux-setup.c
|
|
||||||
===================================================================
|
|
||||||
--- a/kexec/arch/i386/x86-linux-setup.c
|
|
||||||
+++ b/kexec/arch/i386/x86-linux-setup.c
|
|
||||||
@@ -32,6 +32,8 @@
|
|
||||||
#include "kexec-x86.h"
|
|
||||||
#include "x86-linux-setup.h"
|
|
||||||
|
|
||||||
+extern int real_command_line_size;
|
|
||||||
+
|
|
||||||
void init_linux_parameters(struct x86_linux_param_header *real_mode)
|
|
||||||
{
|
|
||||||
/* Fill in the values that are usually provided by the kernel. */
|
|
||||||
@@ -91,8 +93,8 @@ void setup_linux_bootloader_parameters(
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Fill in the command line */
|
|
||||||
- if (cmdline_len > COMMAND_LINE_SIZE) {
|
|
||||||
- cmdline_len = COMMAND_LINE_SIZE;
|
|
||||||
+ if (cmdline_len > real_command_line_size) {
|
|
||||||
+ cmdline_len = real_command_line_size;
|
|
||||||
}
|
|
||||||
cmdline_ptr = ((char *)real_mode) + cmdline_offset;
|
|
||||||
memcpy(cmdline_ptr, cmdline, cmdline_len);
|
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Jul 17 07:25:19 CEST 2007 - olh@suse.de
|
||||||
|
|
||||||
|
- workaround gcc code analyzing bug
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Jul 16 15:33:22 CEST 2007 - olh@suse.de
|
Mon Jul 16 15:33:22 CEST 2007 - olh@suse.de
|
||||||
|
|
||||||
|
27
kexec-tools.gcc-bug.patch
Normal file
27
kexec-tools.gcc-bug.patch
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
---
|
||||||
|
kexec/arch/i386/crashdump-x86.c | 2 ++
|
||||||
|
kexec/arch/x86_64/crashdump-x86_64.c | 2 ++
|
||||||
|
2 files changed, 4 insertions(+)
|
||||||
|
|
||||||
|
--- a/kexec/arch/i386/crashdump-x86.c
|
||||||
|
+++ b/kexec/arch/i386/crashdump-x86.c
|
||||||
|
@@ -286,6 +286,8 @@ static int delete_memmap(struct memory_r
|
||||||
|
unsigned long long mstart, mend;
|
||||||
|
struct memory_range temp_region;
|
||||||
|
|
||||||
|
+ /* kexec/arch/i386/crashdump-x86.c:343: warning: 'temp_region.type' is used uninitialized in this function */
|
||||||
|
+ memset(&temp_region, 0, sizeof(temp_region));
|
||||||
|
/* Do alignment check. */
|
||||||
|
if ((addr%align) || (size%align))
|
||||||
|
return -1;
|
||||||
|
--- a/kexec/arch/x86_64/crashdump-x86_64.c
|
||||||
|
+++ b/kexec/arch/x86_64/crashdump-x86_64.c
|
||||||
|
@@ -391,6 +391,8 @@ static int delete_memmap(struct memory_r
|
||||||
|
unsigned long long mstart, mend;
|
||||||
|
struct memory_range temp_region;
|
||||||
|
|
||||||
|
+ /* kexec/arch/x86_64/crashdump-x86_64.c:448: warning: 'temp_region.type' is used uninitialized in this function */
|
||||||
|
+ memset(&temp_region, 0, sizeof(temp_region));
|
||||||
|
/* Do alignment check. */
|
||||||
|
if ((addr%align) || (size%align))
|
||||||
|
return -1;
|
@ -6,8 +6,8 @@
|
|||||||
kexec/arch/ppc64/kexec-ppc64.h | 2 +-
|
kexec/arch/ppc64/kexec-ppc64.h | 2 +-
|
||||||
kexec/kexec-sha256.h | 4 ++--
|
kexec/kexec-sha256.h | 4 ++--
|
||||||
purgatory/arch/ppc64/Makefile | 2 ++
|
purgatory/arch/ppc64/Makefile | 2 ++
|
||||||
purgatory/purgatory.c | 2 ++
|
purgatory/purgatory.c | 4 +++-
|
||||||
8 files changed, 34 insertions(+), 30 deletions(-)
|
8 files changed, 35 insertions(+), 31 deletions(-)
|
||||||
|
|
||||||
--- a/kexec/arch/ppc64/crashdump-ppc64.h
|
--- a/kexec/arch/ppc64/crashdump-ppc64.h
|
||||||
+++ b/kexec/arch/ppc64/crashdump-ppc64.h
|
+++ b/kexec/arch/ppc64/crashdump-ppc64.h
|
||||||
@ -238,6 +238,15 @@
|
|||||||
+PCFLAGS += -m64 -mcall-aixdesc
|
+PCFLAGS += -m64 -mcall-aixdesc
|
||||||
--- a/purgatory/purgatory.c
|
--- a/purgatory/purgatory.c
|
||||||
+++ b/purgatory/purgatory.c
|
+++ b/purgatory/purgatory.c
|
||||||
|
@@ -18,7 +18,7 @@ void verify_sha256_digest(void)
|
||||||
|
sha256_starts(&ctx);
|
||||||
|
end = &sha256_regions[sizeof(sha256_regions)/sizeof(sha256_regions[0])];
|
||||||
|
for(ptr = sha256_regions; ptr < end; ptr++) {
|
||||||
|
- sha256_update(&ctx, ptr->start, ptr->len);
|
||||||
|
+ sha256_update(&ctx, (char *)ptr->start, ptr->len);
|
||||||
|
}
|
||||||
|
sha256_finish(&ctx, digest);
|
||||||
|
if (memcmp(digest, sha256_digest, sizeof(digest)) != 0) {
|
||||||
@@ -46,3 +46,5 @@ void purgatory(void)
|
@@ -46,3 +46,5 @@ void purgatory(void)
|
||||||
verify_sha256_digest();
|
verify_sha256_digest();
|
||||||
post_verification_setup_arch();
|
post_verification_setup_arch();
|
||||||
|
@ -22,7 +22,7 @@ Requires: %insserv_prereq %fillup_prereq
|
|||||||
Autoreqprov: on
|
Autoreqprov: on
|
||||||
Summary: Tools for fast kernel loading
|
Summary: Tools for fast kernel loading
|
||||||
Version: 1.101
|
Version: 1.101
|
||||||
Release: 118
|
Release: 119
|
||||||
Source: %{name}-%{package_version}.tar.bz2
|
Source: %{name}-%{package_version}.tar.bz2
|
||||||
Source1: kdump
|
Source1: kdump
|
||||||
Source2: sysconfig.kdump
|
Source2: sysconfig.kdump
|
||||||
@ -37,6 +37,7 @@ Patch1: kexec-longer-cmdline.diff
|
|||||||
Patch2: kexec-tools.check_reuse_initrd-close.patch
|
Patch2: kexec-tools.check_reuse_initrd-close.patch
|
||||||
Patch20: kexec-tools.ppc64-32bit-build.patch
|
Patch20: kexec-tools.ppc64-32bit-build.patch
|
||||||
Patch21: kexec-tools.ppc32-64bit-purgatory.patch
|
Patch21: kexec-tools.ppc32-64bit-purgatory.patch
|
||||||
|
Patch22: kexec-tools.gcc-bug.patch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Kexec is a user space utility for loading another kernel and asking the
|
Kexec is a user space utility for loading another kernel and asking the
|
||||||
@ -62,6 +63,7 @@ Authors:
|
|||||||
#
|
#
|
||||||
%patch20 -p1
|
%patch20 -p1
|
||||||
%patch21 -p1
|
%patch21 -p1
|
||||||
|
%patch22 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%{?suse_update_config -f}
|
%{?suse_update_config -f}
|
||||||
@ -140,6 +142,8 @@ true # ignore errors
|
|||||||
/var/adm/fillup-templates/sysconfig.kdump
|
/var/adm/fillup-templates/sysconfig.kdump
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Jul 17 2007 - olh@suse.de
|
||||||
|
- workaround gcc code analyzing bug
|
||||||
* Mon Jul 16 2007 - olh@suse.de
|
* Mon Jul 16 2007 - olh@suse.de
|
||||||
- update to kexec-tools-testing b84b87747a16f0afbef6f6802bb794a94f4961d9
|
- update to kexec-tools-testing b84b87747a16f0afbef6f6802bb794a94f4961d9
|
||||||
build 32bit powerpc kexec binary for 64bit kernels
|
build 32bit powerpc kexec binary for 64bit kernels
|
||||||
|
Loading…
Reference in New Issue
Block a user