kdumpctl fails to load a crash kernel if KASLR is enabled.
The incorrect configuration of the kptr_restrict parameter causes that the kdumpctl fails to load a crash kernel. The problem occurs when the Kernel Address Space Layout Randomization (KASLR) mechanism is enabled. The value of kptr_restrict decides how to expose the content of /proc files. Inappropriate setting will cause that the /proc/kcore file is being printed as all zeros. This configuration will break the kdump loading process since it needs access to the conntent of /proc/kcore if KASLR is enabled.
Set kptr_restrict to 1 to avoid the problem described above.
Signed-off-by: Baoquan He bhe@redhat.com --- kexec-kdump-howto.txt | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/kexec-kdump-howto.txt b/kexec-kdump-howto.txt index 011a19f..193b4a9 100644 --- a/kexec-kdump-howto.txt +++ b/kexec-kdump-howto.txt @@ -91,6 +91,11 @@ This line tells kexec to reserve 64M of ram if the system contains between 512M and 2G of physical memory. If the system contains 2G or more of physical memory, 128M should be reserved.
+Besides, since kdump needs to access /proc/kcore during a kernel loading +if KASLR is enabled, check /proc/sys/kernel/kptr_restrict to make sure +that the content of /proc/kcore is exposed correctly. We recommend to +set the value of kptr_restrict to '1'. + After making said changes, reboot your system, so that the X MB of memory is left untouched by the normal system, reserved for the capture kernel. Take note that the output of 'free -m' will show X MB less memory than without this
On 03/25/19 at 10:16am, Baoquan He wrote:
kdumpctl fails to load a crash kernel if KASLR is enabled.
The incorrect configuration of the kptr_restrict parameter causes that the kdumpctl fails to load a crash kernel. The problem occurs when the Kernel Address Space Layout Randomization (KASLR) mechanism is enabled. The value of kptr_restrict decides how to expose the content of /proc files. Inappropriate setting will cause that the /proc/kcore file is being printed as all zeros. This configuration will break the kdump loading process since it needs access to the conntent of /proc/kcore if KASLR is enabled.
Set kptr_restrict to 1 to avoid the problem described above.
Signed-off-by: Baoquan He bhe@redhat.com
kexec-kdump-howto.txt | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/kexec-kdump-howto.txt b/kexec-kdump-howto.txt index 011a19f..193b4a9 100644 --- a/kexec-kdump-howto.txt +++ b/kexec-kdump-howto.txt @@ -91,6 +91,11 @@ This line tells kexec to reserve 64M of ram if the system contains between 512M and 2G of physical memory. If the system contains 2G or more of physical memory, 128M should be reserved.
+Besides, since kdump needs to access /proc/kcore during a kernel loading +if KASLR is enabled, check /proc/sys/kernel/kptr_restrict to make sure +that the content of /proc/kcore is exposed correctly. We recommend to +set the value of kptr_restrict to '1'.
Needs an update for s/kcore/kallsyms, and also some other descritions.
After making said changes, reboot your system, so that the X MB of memory is left untouched by the normal system, reserved for the capture kernel. Take note that the output of 'free -m' will show X MB less memory than without this
Thanks Dave
On 04/19/19 at 10:16am, Dave Young wrote:
Needs an update for s/kcore/kallsyms, and also some other descritions.
There was a v2 posted later: [PATCH v2] kexec-kdump-howto: Add note on setting correct value of kptr_restrict
It could have been buried in patches.
After making said changes, reboot your system, so that the X MB of memory is left untouched by the normal system, reserved for the capture kernel. Take note that the output of 'free -m' will show X MB less memory than without this
Thanks Dave _______________________________________________ kexec mailing list -- kexec@lists.fedoraproject.org To unsubscribe send an email to kexec-leave@lists.fedoraproject.org Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kexec@lists.fedoraproject.org