Disable the feature: KASLR Before debugging the kernel with qemu+gdb

qemu+gdb debugging kernel (version>4.8)

When debugging the linux kernel (version > 4.8) with qemu and gdb, something wrong occurs:

  • picture as follows:
  • Disable the feature: KASLR Before debugging the kernel with qemu+gdb_第1张图片

Why?

The kernel (version >4.8) feature KASLR has been included. What is KASLR ?
Please see the acticle:
(1) https://lwn.net/Articles/569635/
(2)https://www.phoronix.com/scan.php?page=news_item&px=Linux-4.8-ASLR-Kernel-Mem-Sects

How?

Make sure you have disabled KASLR!!!

Reference

https://askubuntu.com/questions/964540/gdb-qemu-cant-put-break-point-on-kernel-function-kernel-4-10-0-35/1012094

你可能感兴趣的:(内核编译,qemu,linux,kernel)