Only print debug message when failed to serach for kernel symbol from /proc/kallsyms
Subsystems (2)
PATCH v3 1/1 Only print debug message when failed to serach for kernel symbol from /proc/kallsyms
Kernel symbol page_offset_base could be unavailable when mm KASLR code is not compiled in kernel. It's unappropriate to print out error message when failed to search for page_offset_base from /proc/kallsyms. Seems now there is not a way to find out if mm KASLR is compiled in or not. An alternative approach is only printing out debug message in get_kernel_sym if failed to search a expected kernel symbol.
Do it in this patch, a simple fix.
--- kexec/arch/i386/crashdump-x86.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kexec/arch/i386/crashdump-x86.c +1 -1
@@ -127,7 +127,7 @@ static unsigned long long get_kernel_sym(const char *symbol) } } -fprintf (stderr,"Cannot get kernel %s symbol address\n" , symbol); +dbgprintf ("Cannot get kernel %s symbol address\n" , symbol);return 0 ; }
Signature · 7 lines
2.5.5 _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec
Quoted 10 lines · Baoquan He
Kernel symbol
page_offset_basecould be unavailable when mm KASLR code is not compiled in kernel. It's unappropriate to print out error message when failed to search forpage_offset_basefrom/proc/kallsyms. Seems now there is not a way to find out if mm KASLR is compiled in or not. An alternative approach is only printing out debug message inget_kernel_symif failed to search a expected kernel symbol.Do it in this patch, a simple fix.
Signed-off-by Baoquan He <[email protected]>
Yes, a particular symbol can be kernel version dependent and may not be available in all the kernel version.
Quoted 10 lines
--- kexec/arch/i386/crashdump-x86.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)kexec/arch/i386/crashdump-x86.c +0
-0
kexec/arch/i386/crashdump-x86.c static unsigned long long get_kernel_sym(const char *symbol) · line 133
Quoted 8 lines
kexec/arch/i386/crashdump-x86.c +1
-1@@ -127,7 +127,7 @@ static unsigned long long get_kernel_sym(const char *symbol) } } -fprintf (stderr,"Cannot get kernel %s symbol address\n" , symbol); +dbgprintf ("Cannot get kernel %s symbol address\n" , symbol);return 0 ; }
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Quoted 30 lines · Baoquan He
Kernel symbol
page_offset_basecould be unavailable when mm KASLR code is not compiled in kernel. It's unappropriate to print out error message when failed to search forpage_offset_basefrom/proc/kallsyms. Seems now there is not a way to find out if mm KASLR is compiled in or not. An alternative approach is only printing out debug message inget_kernel_symif failed to search a expected kernel symbol.Do it in this patch, a simple fix.
Signed-off-by Baoquan He <[email protected]>--- kexec/arch/i386/crashdump-x86.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)kexec/arch/i386/crashdump-x86.c +1
-1@@ -127,7 +127,7 @@ static unsigned long long get_kernel_sym(const char *symbol) } } -fprintf (stderr,"Cannot get kernel %s symbol address\n" , symbol); +dbgprintf ("Cannot get kernel %s symbol address\n" , symbol);return 0 ; }Signature · 1 line
2.5.5
It looks reasonable to me:
Thanks
Dave
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Inline…
Quoted 5 lines · Dave Young
Quoted 2 lines · Baoquan He
Kernel symbol
page_offset_basecould be unavailable when mm KASLR code is not compiled in kernel. It's unappropriate to print out error message
I subscribed to the list the day after this patch went out… Anyway, change to “inappropriate”.
-Philip
Quoted 31 lines
Quoted 28 lines
when failed to search for
page_offset_basefrom/proc/kallsyms. Seems now there is not a way to find out if mm KASLR is compiled in or not. An alternative approach is only printing out debug message inget_kernel_symif failed to search a expected kernel symbol.Do it in this patch, a simple fix.
Signed-off-by Baoquan He <[email protected]>---
kexec/arch/i386/crashdump-x86.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)kexec/arch/i386/crashdump-x86.c +1
-1@@ -127,7 +127,7 @@ static unsigned long long get_kernel_sym(const char *symbol) } } -fprintf (stderr,"Cannot get kernel %s symbol address\n" , symbol); +dbgprintf ("Cannot get kernel %s symbol address\n" , symbol);return 0 ; }Signature · 1 line
2.5.5It looks reasonable to me:
Quoted 4 lines
Acked-by Dave Young <[email protected]>Thanks
Dave
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Quoted 10 lines · Philip Prindeville
Inline…
Quoted 5 lines · Dave Young
Quoted 2 lines · Baoquan He
Kernel symbol
page_offset_basecould be unavailable when mm KASLR code is not compiled in kernel. It's unappropriate to print out error messageI subscribed to the list the day after this patch went out… Anyway, change to “inappropriate”.
Indeed, not sure if Simon want a repost.
Thanks, nice catch!
Quoted 40 lines
-Philip
Quoted 35 lines
Quoted 28 lines
when failed to search for
page_offset_basefrom/proc/kallsyms. Seems now there is not a way to find out if mm KASLR is compiled in or not. An alternative approach is only printing out debug message inget_kernel_symif failed to search a expected kernel symbol.Do it in this patch, a simple fix.
Signed-off-by Baoquan He <[email protected]>---
kexec/arch/i386/crashdump-x86.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)kexec/arch/i386/crashdump-x86.c +1
-1@@ -127,7 +127,7 @@ static unsigned long long get_kernel_sym(const char *symbol) } } -fprintf (stderr,"Cannot get kernel %s symbol address\n" , symbol); +dbgprintf ("Cannot get kernel %s symbol address\n" , symbol);return 0 ; }Signature · 1 line
2.5.5It looks reasonable to me:
Acked-by Dave Young <[email protected]>Thanks
Dave
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Quoted 6 lines · Baoquan He
Quoted 5 lines · Philip Prindeville
Inline…
Quoted 2 lines · Dave Young
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines · Baoquan He
Quoted 2 lines
Kernel symbol
page_offset_basecould be unavailable when mm KASLR code is not compiled in kernel. It's unappropriate to print out error messageI subscribed to the list the day after this patch went out… Anyway, change to “inappropriate”.
Indeed, not sure if Simon want a repost.
No need, I have fixed up the change log and applied the patch.
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Quoted 8 lines · Simon Horman
Quoted 7 lines · Baoquan He
Quoted 6 lines · Philip Prindeville
Inline…
Quoted 3 lines · Dave Young
On 03/03/17 at 11:52am, Baoquan He wrote:
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
Quoted 2 lines
Kernel symbol
page_offset_basecould be unavailable when mm KASLR code is not compiled in kernel. It's unappropriate to print out error messageI subscribed to the list the day after this patch went out… Anyway, change to “inappropriate”.
Indeed, not sure if Simon want a repost.
No need, I have fixed up the change log and applied the patch.
Thanks, Simon!
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec