Debugging Linux Kernel using KGDB Part7 - nokaslr

KASLR - Kernel Address Space Layout Randomization is a technique implemented by operating system to prevent the attacker from finding out the addresses of the functions.

In our previous posts, the backtrace commands was showing all ??.


Also, when KASLR is enabled, you cannot set breakpoints properly. 


The solution to this problem is disabling KASLR. In order to disable KASLR, add "nokaslr" to the kernel command line parameters.

After updating your bootloader, and restarting the debugger, you can put breakpoints and will not have the above issue.

Comments

Popular posts from this blog

bb.utils.contains yocto

make config vs oldconfig vs defconfig vs menuconfig vs savedefconfig

PR, PN and PV Variable in Yocto