Bug 1791341
| Summary: | impossible to compile kernel 3.10.0-957.el7.x86_64 with clearcase 9.0.1.9 | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | jerome.galliere |
| Component: | gcc | Assignee: | Marek Polacek <mpolacek> |
| Status: | CLOSED NOTABUG | QA Contact: | Alexandra Petlanová Hájková <ahajkova> |
| Severity: | high | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 7.6 | CC: | fweimer, jakub, law, ohudlick, sipoyare |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2020-01-24 09:23:19 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
jerome.galliere
2020-01-15 15:30:23 UTC
arch/x86/Makefile has:
# 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),)
KBUILD_CFLAGS += $(RETPOLINE_CFLAGS) -DRETPOLINE
else
$(error CONFIG_RETPOLINE=y, but not supported by the compiler. Compiler update recommended.)
endif
endif
so it test if gcc groks -mindirect-branch=thunk-extern -mindirect-branch-register. But gcc-4.8.5-36.el7.x86_64 has that support.
Is that test really using the system gcc? What does compiling a trivial program with -mindirect-branch=thunk-extern -mindirect-branch-register show?
Both of the error messages are indications that you're not using the right compiler. THe output of "gcc -v" would be helpful here. I suspect it's going to report some version of gcc without spectre/meltdown mitigations and presumably a version with problems with stack-protector-strong. Jeff here is the gcc version [root@ssc3pas3ccvol2 ~]# gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/lto-wrapper Target: x86_64-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux Thread model: posix gcc version 4.8.5 20150623 (Red Hat 4.8.5-36) (GCC) [root@ssc3pas3ccvol2 ~]# I have successfully built a minimal kernel module using the kernel makefiles and these package versions: kernel-3.10.0-957.el7.x86_64 kernel-headers-3.10.0-957.el7.x86_64 kernel-devel-3.10.0-957.el7.x86_64 gcc-4.8.5-36.el7.x86_64 The module was built with -mindirect-branch=thunk-extern -mindirect-branch-register -DRETPOLINE, as expected. I'm sorry, but this must be something specific to your environment. If you need further assistance, please open a support case at: <https://access.redhat.com/support/cases/new> Thank you for your understanding. |