使用非 retpoline 编译器构建内核

使用非 retpoline 编译器构建内核

我正在尝试在 Ubuntu 上构建 rtl wifi 驱动程序,当我使用make命令时,它会给我这个消息

make[1]: Entering directory '/usr/src/linux-headers-4.15.0-50-generic'
arch/x86/Makefile:156: CONFIG_X86_X32 enabled but no binutils support
arch/x86/Makefile:245: *** You are building kernel with non-retpoline compiler, please update your compiler..  Stop.
make[1]: Leaving directory '/usr/src/linux-headers-4.15.0-50-generic'
Makefile:58: recipe for target 'all' failed
make: *** [all] Error 2

答案1

改变配置_RETPOLINE到 n.

运行make menuconfig。导航到Processor type and features,然后取消选中Avoid speculative indirect branches in kernel

请注意,您的内核可能会遭受内核到用户的数据泄露。

答案2

你试过了吗

sudo make 

代替make

make给了我那个 retpoline 错误。没有出现指令sudo make

相关内容