rpms/kernel/F-9 linux-2.6-x86-fix-memmap-exactmap-boot-argument.patch, NONE, 1.1 kernel.spec, 1.762, 1.763
Chuck Ebbert
cebbert at fedoraproject.org
Sun Sep 14 01:01:54 UTC 2008
- Previous message (by thread): rpms/python-virtualenv/EL-5 import.log, NONE, 1.1 python-virtualenv.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Next message (by thread): rpms/kernel/F-9 linux-2.6-sched-clock-fix-nohz-interaction.patch, NONE, 1.1 linux-2.6-sched-fix-process-time-monotonicity.patch, NONE, 1.1 kernel.spec, 1.763, 1.764
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: cebbert
Update of /cvs/pkgs/rpms/kernel/F-9
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv29644
Modified Files:
kernel.spec
Added Files:
linux-2.6-x86-fix-memmap-exactmap-boot-argument.patch
Log Message:
x86: fix memmap=exactmap argument, fixing kdump in some cases (#459103)
linux-2.6-x86-fix-memmap-exactmap-boot-argument.patch:
--- NEW FILE linux-2.6-x86-fix-memmap-exactmap-boot-argument.patch ---
From: Prarit Bhargava <prarit at redhat.com>
Date: Tue, 9 Sep 2008 13:56:08 +0000 (-0400)
Subject: x86: fix memmap=exactmap boot argument
X-Git-Tag: v2.6.27-rc6~4^2
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=d6be118a97ce51ca84035270f91c2bccecbfac5f
x86: fix memmap=exactmap boot argument
When using kdump modifying the e820 map is yielding strange results.
For example starting with
BIOS-provided physical RAM map:
BIOS-e820: 0000000000000100 - 0000000000093400 (usable)
BIOS-e820: 0000000000093400 - 00000000000a0000 (reserved)
BIOS-e820: 0000000000100000 - 000000003fee0000 (usable)
BIOS-e820: 000000003fee0000 - 000000003fef3000 (ACPI data)
BIOS-e820: 000000003fef3000 - 000000003ff80000 (ACPI NVS)
BIOS-e820: 000000003ff80000 - 0000000040000000 (reserved)
BIOS-e820: 00000000e0000000 - 00000000f0000000 (reserved)
BIOS-e820: 00000000fec00000 - 00000000fec10000 (reserved)
BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved)
BIOS-e820: 00000000ff000000 - 0000000100000000 (reserved)
and booting with args
memmap=exactmap memmap=640K at 0K memmap=5228K at 16384K memmap=125188K at 22252K memmap=76K#1047424K memmap=564K#1047500K
resulted in:
user-defined physical RAM map:
user: 0000000000000000 - 0000000000093400 (usable)
user: 0000000000093400 - 00000000000a0000 (reserved)
user: 0000000000100000 - 000000003fee0000 (usable)
user: 000000003fee0000 - 000000003fef3000 (ACPI data)
user: 000000003fef3000 - 000000003ff80000 (ACPI NVS)
user: 000000003ff80000 - 0000000040000000 (reserved)
user: 00000000e0000000 - 00000000f0000000 (reserved)
user: 00000000fec00000 - 00000000fec10000 (reserved)
user: 00000000fee00000 - 00000000fee01000 (reserved)
user: 00000000ff000000 - 0000000100000000 (reserved)
But should have resulted in:
user-defined physical RAM map:
user: 0000000000000000 - 00000000000a0000 (usable)
user: 0000000001000000 - 000000000151b000 (usable)
user: 00000000015bb000 - 0000000008ffc000 (usable)
user: 000000003fee0000 - 000000003ff80000 (ACPI data)
This is happening because of an improper usage of strcmp() in the
e820 parsing code. The strcmp() always returns !0 and never resets the
value for e820.nr_map and returns an incorrect user-defined map.
This patch fixes the problem.
Signed-off-by: Prarit Bhargava <prarit at redhat.com>
Signed-off-by: Ingo Molnar <mingo at elte.hu>
Backport: Chuck Ebbert <cebbert at redhat.com>
---
Index: linux-2.6.26.noarch/arch/x86/kernel/e820_32.c
===================================================================
--- linux-2.6.26.noarch.orig/arch/x86/kernel/e820_32.c
+++ linux-2.6.26.noarch/arch/x86/kernel/e820_32.c
@@ -697,7 +697,7 @@ static int __init parse_memmap(char *arg
if (!arg)
return -EINVAL;
- if (strcmp(arg, "exactmap") == 0) {
+ if (strncmp(arg, "exactmap", 8) == 0) {
#ifdef CONFIG_CRASH_DUMP
/* If we are doing a crash dump, we
* still need to know the real mem
Index: linux-2.6.26.noarch/arch/x86/kernel/e820_64.c
===================================================================
--- linux-2.6.26.noarch.orig/arch/x86/kernel/e820_64.c
+++ linux-2.6.26.noarch/arch/x86/kernel/e820_64.c
@@ -776,7 +776,7 @@ static int __init parse_memmap_opt(char
char *oldp;
unsigned long long start_at, mem_size;
- if (!strcmp(p, "exactmap")) {
+ if (!strncmp(p, "exactmap", 8)) {
#ifdef CONFIG_CRASH_DUMP
/*
* If we are doing a crash dump, we still need to know
Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-9/kernel.spec,v
retrieving revision 1.762
retrieving revision 1.763
diff -u -r1.762 -r1.763
--- kernel.spec 13 Sep 2008 07:22:02 -0000 1.762
+++ kernel.spec 14 Sep 2008 01:01:23 -0000 1.763
@@ -589,7 +589,7 @@
Patch95: linux-2.6-x86-hpet-02-read-back-compare-register.patch
Patch96: linux-2.6-x86-hpet-03-make-minimum-reprogramming-delta-useful.patch
Patch97: linux-2.6-x86-hpet-04-workaround-sb700-bios.patch
-
+Patch98: linux-2.6-x86-fix-memmap-exactmap-boot-argument.patch
# ppc
Patch140: linux-2.6-ps3-ehci-iso.patch
@@ -1052,6 +1052,8 @@
ApplyPatch linux-2.6-x86-hpet-02-read-back-compare-register.patch
ApplyPatch linux-2.6-x86-hpet-03-make-minimum-reprogramming-delta-useful.patch
ApplyPatch linux-2.6-x86-hpet-04-workaround-sb700-bios.patch
+# fix memmap=exactmap, so kdump kernels work
+ApplyPatch linux-2.6-x86-fix-memmap-exactmap-boot-argument.patch
#
# PowerPC
@@ -1841,6 +1843,9 @@
%kernel_variant_files -a /%{image_install_path}/xen*-%{KVERREL}.xen -e /etc/ld.so.conf.d/kernelcap-%{KVERREL}.xen.conf %{with_xen} xen
%changelog
+* Sat Sep 13 2008 Chuck Ebbert <cebbert at redhat.com> 2.6.26.5-36
+- x86: fix memmap=exactmap argument, fixing kdump in some cases (#459103)
+
* Sat Sep 13 2008 Chuck Ebbert <cebbert at redhat.com> 2.6.26.5-35
- Fix problems with AMT on e1000e (#453023)
- Previous message (by thread): rpms/python-virtualenv/EL-5 import.log, NONE, 1.1 python-virtualenv.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Next message (by thread): rpms/kernel/F-9 linux-2.6-sched-clock-fix-nohz-interaction.patch, NONE, 1.1 linux-2.6-sched-fix-process-time-monotonicity.patch, NONE, 1.1 kernel.spec, 1.763, 1.764
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list