After applying CVE 3639 getting CONFIG_RETPOLINE=y but not supported by the compiler.

Latest response

RHEL 7.4 getting error below when compiling
CONFIG_RETPOLINE=y, but not supported by the compiler. Compiler update recommended..

[root@xxxxxx build]# cat make.log
DKMS make.log for nvidia-375.26 for kernel 3.10.0-862.3.3.el7.x86_64 (x86_64)
Sat Jun 23 00:36:48 CDT 2018
make "CC=cc" KBUILD_OUTPUT=/lib/modules/3.10.0-862.3.3.el7.x86_64/build KBUILD_VERBOSE= -C /lib/modules/3.10.0-862.3.3.el7.x86_64/source M=/var/lib/dkms/nvidia/375.26/build ARCH=x86_64 NV_KERNEL_SOURCES=/lib/modules/3.10.0-862.3.3.el7.x86_64/source NV_KERNEL_OUTPUT=/lib/modules/3.10.0-862.3.3.el7.x86_64/build NV_KERNEL_MODULES="nvidia nvidia-uvm nvidia-modeset nvidia-drm" INSTALL_MOD_DIR=kernel/drivers/video modules
make[1]: Entering directory /usr/src/kernels/3.10.0-862.3.3.el7.x86_64'
make -C /lib/modules/3.10.0-862.3.3.el7.x86_64/build \
KBUILD_SRC=/usr/src/kernels/3.10.0-862.3.3.el7.x86_64 \
KBUILD_EXTMOD="/var/lib/dkms/nvidia/375.26/build" -f /usr/src/kernels/3.10.0-862.3.3.el7.x86_64/Makefile \
modules
/usr/src/kernels/3.10.0-862.3.3.el7.x86_64/arch/x86/Makefile:166: *** CONFIG_RETPOLINE=y, but not supported by the compiler. Compiler update recommended.. Stop.
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory
/usr/src/kernels/3.10.0-862.3.3.el7.x86_64'
make: *** [modules] Error 2

Responses

Getting this on an old AMD FX-8350 Black. RHEL 7.5 gcc-4.8.5-28.el7_5.1.x86_64

What is the version of the kernel-devel package installed on the system?

rpm -q kernel-devel

When RHEL 5 upgrade kernel to 2.6.18-437.el5PAE, the kernel module is also compiled with this error "error CONFIG_RETPOLINE=y, but not supported by the compiler. Compiler update recommended.". The default version of gcc in RHEL 5 is gcc4.1, I had searched and found RHEL 5 must upgrade gcc version to gcc 7.3 or higher.

/usr/src/kernels/2.6.18-437.el5PAE-i686/arch/x86_64/Makefile +++

Avoid indirect branches in kernel to deal with Spectre

ifdef CONFIG_RETPOLINE RETPOLINE_CFLAGS += $(call cc-option,-mindirect-branch=thunk-extern -mindirect-branch-register) ifneq ($(RETPOLINE_CFLAGS),) CFLAGS += $(RETPOLINE_CFLAGS) -DRETPOLINE else $(error CONFIG_RETPOLINE=y, but not supported by the compiler. Compiler update recommended.) endif endif ++++ +++ [root@KASRedhat5x32-213 module]# uname -a Linux KASRedhat5x32-213 2.6.18-437.el5PAE #1 SMP Wed Feb 27 09:16:52 EST 2019 i686 i686 i386 GNU/Linux [root@KASRedhat5x32-213 module]# cat /etc/redhat-release Red Hat Enterprise Linux Server release 5.5 (Tikanga) [root@KASRedhat5x32-213 module]# cat /boot/config-2.6.18-437.el5PAE |grep CONFIG_RETPOLINE CONFIG_RETPOLINE=y

[root@KASRedhat5x32-213 module]# rpm -qa|grep kernel kernel-PAE-devel-2.6.18-437.el5 kernel-PAE-2.6.18-437.el5 kernel-devel-2.6.18-92.el5 kernel-2.6.18-308.20.1.el5 kernel-devel-2.6.18-194.el5 kernel-devel-2.6.18-419.el5 kernel-2.6.18-92.el5 kernel-headers-2.6.18-194.el5 kernel-2.6.18-419.el5 kernel-2.6.18-194.el5 kernel-devel-2.6.18-308.20.1.el5 +++