我正在用内核版本3.14.17编写一个简单的LSM代码。
代码片段:
#include <linux/module.h> // included for all kernel modules
#include <linux/kernel.h> // included for KERN_INFO
#include <linux/init.h> // included for __init and __exit macros
#include <linux/security.h>
#include <linux/trace
我试图通过AM3517评估板上的JTAG加载和引导linux内核。我的调试器是BDI3000。我不使用openocd,因为根据调试器的文档,它不是必需的。到目前为止,我认为我能够将vmlinux映像加载到内存中,但是一旦完成,"cont“gdb命令就不会引导linux。我在串行控制台上没有收到任何消息。
我正在遵循这个链接中给出的指示
试图获取链接中提到的log_buffer地址将给出以下输出
(gdb) p (char*) &__log_buf[log_start]
$1 = 0xc04cd460 <Address 0xc04cd460 out of bounds>
我正在阅读Linux内核代码。我对Linux中的GDT(全局描述符表)有一些疑问。
我的问题是:
Where Linux Kernel Setup Large GDT?
I know that in pm.c [http://lxr.free-electrons.com/source/arch/x86/boot/pm.c#L123]
kernel call function setup_gdt() and it set up a small GDT with only three entries.
Then jumps to protected mode code.
Then where
在Linux内核编译的"make“步骤中,我得到了很多这样的错误:
Building modules, stage 2.
MODPOST 2283 modules
WARNING: modpost: Found 1 section mismatch(es).
To see full details build your kernel with:
'make CONFIG_DEBUG_SECTION_MISMATCH=y'
我知道我可以只做一个make CONFIG_DEBUG_SECTION_MISMATCH=y,然后继续,但我想知道是否有更好的方法来处理这个问题。也许
根据Documentation/x86/x86_64/mm.txt,在64位linux中内核空间的布局应该是这样的:
6 0000000000000000 - 00007fffffffffff (=47 bits) user space, different per mm
7 hole caused by [48:63] sign extension
8 ffff800000000000 - ffff80ffffffffff (=40 bits) guard hole
9 ffff880000000000 - ffffc7ffffffffff (=64 TB) direct m