使用非 retpoline 编译器构建内核

Nan*_*yan 3 compiling kernel make drivers

我正在尝试在 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
Run Code Online (Sandbox Code Playgroud)

Yos*_*biv 5

CONFIG_RETPOLINE更改为 n。

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

请注意,您的内核可能会面临内核到用户的数据泄漏。