kexec/x86: fix crashkernel reserved mem detection
Subsystems (2)
PATCH 1/1 kexec/x86: fix crashkernel reserved mem detection
Function crashkernel_mem_callback had wrong parameters type So crash_reserved_mem got completely insane values
As a result kexec was unable to allocate segments for crashkernel For instance, I got this message:
"Could not find a free area of memory of 0x9f000 bytes..."
--- kexec/arch/i386/crashdump-x86.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
kexec/arch/i386/crashdump-x86.c +2 -2
@@ -1041,8 +1041,8 @@ int get_max_crash_kernel_limit(uint64_t *start, uint64_t *end)static int crashkernel_mem_callback (void *UNUSED (data ),int nr,char *UNUSED (str ), -unsigned long base, -unsigned long length) +unsigned long long base, +unsigned long long length) {if (nr >=CRASH_RESERVED_MEM_NR )return 1 ;
Signature · 7 lines
2.2.1 _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec
Quoted 7 lines · Yuri Volchkov
Function
crashkernel_mem_callbackhad wrong parameters type Socrash_reserved_memgot completely insane values
As a result kexec was unable to allocate segments for crashkernel For instance, I got this message:"Could not find a free area of memory of 0x9f000 bytes..."Signed-off-by Yuri Volchkov <[email protected]>
See the patch attached to https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=771671
which also fixes kexec/arch/sh/crashdump-sh.c and kexec/arch/sh/kexec-sh.c
Definitely a problem. Without the x86 fix we seem same failure on i586
tony
Quoted 10 lines
--- kexec/arch/i386/crashdump-x86.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)kexec/arch/i386/crashdump-x86.c +0
-0
kexec/arch/i386/crashdump-x86.c int get_max_crash_kernel_limit(uint64_t *start, uint64_t *end) · line 1048
Quoted 10 lines
kexec/arch/i386/crashdump-x86.c +2
-2@@ -1041,8 +1041,8 @@ int get_max_crash_kernel_limit(uint64_t *start, uint64_t *end)static int crashkernel_mem_callback (void *UNUSED (data ),int nr,char *UNUSED (str ), -unsigned long base, -unsigned long length) +unsigned long long base, +unsigned long long length) {if (nr >=CRASH_RESERVED_MEM_NR )return 1 ;
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Quoted 7 lines · Tony Jones
Quoted 6 lines · Yuri Volchkov
Function
crashkernel_mem_callbackhad wrong parameters type Socrash_reserved_memgot completely insane values
As a result kexec was unable to allocate segments for crashkernel For instance, I got this message:"Could not find a free area of memory of 0x9f000 bytes..."
Quoted 6 lines
Quoted 1 line
Signed-off-by Yuri Volchkov <[email protected]>See the patch attached to https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=771671
which also fixeskexec/arch/sh/crashdump-sh.candkexec/arch/sh/kexec-sh.cDefinitely a problem. Without the x86 fix we seem same failure on i586
Hi Tony,
commit 4362bfa make that change, but skip the crashkernel_mem_callback. It need be fixed.
I am wondering how the insane values happened on i386, and it didn't happen on x86_64.
Thanks
Baoquan
Quoted 13 lines
tony
Quoted 10 lines
--- kexec/arch/i386/crashdump-x86.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)kexec/arch/i386/crashdump-x86.c +0
-0@@ -1041,8 +1041,8 @@ int get_max_crash_kernel_limit(uint64_t *start, uint64_t *end)
Quoted 16 lines
kexec/arch/i386/crashdump-x86.c int get_max_crash_kernel_limit(uint64_t *start, uint64_t *end) · line 1048
Quoted 10 lines
kexec/arch/i386/crashdump-x86.c +2
-2static int crashkernel_mem_callback (void *UNUSED (data ),int nr,char *UNUSED (str ), -unsigned long base, -unsigned long length) +unsigned long long base, +unsigned long long length) {if (nr >=CRASH_RESERVED_MEM_NR )return 1 ;_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Quoted 15 lines · Baoquan He
Quoted 7 lines · Tony Jones
Quoted 6 lines · Yuri Volchkov
Function
crashkernel_mem_callbackhad wrong parameters type Socrash_reserved_memgot completely insane values
As a result kexec was unable to allocate segments for crashkernel For instance, I got this message:"Could not find a free area of memory of 0x9f000 bytes..."Quoted 6 lines
Quoted 1 line
Signed-off-by Yuri Volchkov <[email protected]>See the patch attached to https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=771671
which also fixeskexec/arch/sh/crashdump-sh.candkexec/arch/sh/kexec-sh.cDefinitely a problem. Without the x86 fix we seem same failure on i586
Quoted 7 lines
Hi Tony,
commit 4362bfa make that change, but skip the
crashkernel_mem_callback. It need be fixed.I am wondering how the insane values happened on i386, and it didn't happen on
x86_64.
Never mind, have got it.
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Quoted 16 lines · Yuri Volchkov
Function
crashkernel_mem_callbackhad wrong parameters type Socrash_reserved_memgot completely insane values
As a result kexec was unable to allocate segments for crashkernel For instance, I got this message:"Could not find a free area of memory of 0x9f000 bytes..."Signed-off-by Yuri Volchkov <[email protected]>--- kexec/arch/i386/crashdump-x86.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)kexec/arch/i386/crashdump-x86.c +0
-0
kexec/arch/i386/crashdump-x86.c int get_max_crash_kernel_limit(uint64_t *start, uint64_t *end) · line 1041
Quoted 1 line
kexec/arch/i386/crashdump-x86.c +0
-0@@ -1041,8 +1041,8 @@ int get_max_crash_kernel_limit(uint64_t *start, uint64_t *end)
crash_sh_memory_range_callback in kexec/arch/sh/crashdump-sh.c also has this problem, please consider it.
Quoted 17 lines
kexec/arch/i386/crashdump-x86.c +2
-2static int crashkernel_mem_callback (void *UNUSED (data ),int nr,char *UNUSED (str ), -unsigned long base, -unsigned long length) +unsigned long long base, +unsigned long long length) {if (nr >=CRASH_RESERVED_MEM_NR )return 1 ;Signature · 7 lines
2.2.1 _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec