kbuild: remove cc-option test of -fno-stack-protector
Some Makefiles already pass -fno-stack-protector unconditionally. For example, arch/arm64/kernel/vdso/Makefile, arch/x86/xen/Makefile. No problem report so far about hard-coding this option. So, we can assume all supported compilers know -fno-stack-protector. GCC 4.8 and Clang support this option (https://godbolt.org/z/_HDGzN ) Get rid of cc-option from -fno-stack-protector. Remove CONFIG_CC_HAS_STACKPROTECTOR_NONE, which is always 'y'. Note: arch/mips/vdso/Makefile adds -fno-stack-protector twice, first unconditionally, and second conditionally. I removed the second one. Signed-off-by:Masahiro Yamada <masahiroy@kernel.org> Reviewed-by:
Kees Cook <keescook@chromium.org> Acked-by:
Ard Biesheuvel <ardb@kernel.org> Reviewed-by:
Nick Desaulniers <ndesaulniers@google.com>
Showing
- Documentation/kbuild/kconfig-language.rst 2 additions, 2 deletionsDocumentation/kbuild/kconfig-language.rst
- Makefile 1 addition, 1 deletionMakefile
- arch/Kconfig 0 additions, 3 deletionsarch/Kconfig
- arch/arm/boot/compressed/Makefile 1 addition, 2 deletionsarch/arm/boot/compressed/Makefile
- arch/mips/vdso/Makefile 1 addition, 2 deletionsarch/mips/vdso/Makefile
- arch/powerpc/kernel/Makefile 1 addition, 1 deletionarch/powerpc/kernel/Makefile
- arch/powerpc/platforms/powermac/Makefile 1 addition, 1 deletionarch/powerpc/platforms/powermac/Makefile
- arch/sparc/vdso/Makefile 2 additions, 2 deletionsarch/sparc/vdso/Makefile
- arch/um/Makefile 1 addition, 2 deletionsarch/um/Makefile
- arch/x86/Makefile 1 addition, 1 deletionarch/x86/Makefile
- arch/x86/boot/compressed/Makefile 1 addition, 1 deletionarch/x86/boot/compressed/Makefile
- arch/x86/entry/vdso/Makefile 2 additions, 2 deletionsarch/x86/entry/vdso/Makefile
- arch/x86/kernel/cpu/Makefile 1 addition, 2 deletionsarch/x86/kernel/cpu/Makefile
- arch/x86/lib/Makefile 1 addition, 1 deletionarch/x86/lib/Makefile
- arch/x86/mm/Makefile 3 additions, 4 deletionsarch/x86/mm/Makefile
- arch/x86/power/Makefile 1 addition, 2 deletionsarch/x86/power/Makefile
- arch/x86/purgatory/Makefile 1 addition, 1 deletionarch/x86/purgatory/Makefile
- arch/x86/um/vdso/Makefile 1 addition, 1 deletionarch/x86/um/vdso/Makefile
- arch/x86/xen/Makefile 2 additions, 3 deletionsarch/x86/xen/Makefile
- drivers/firmware/efi/libstub/Makefile 1 addition, 1 deletiondrivers/firmware/efi/libstub/Makefile
Loading
Please register or sign in to comment