drm/edid/firmware: Add built-in edid/1280x720.bin firmware
[platform/kernel/linux-starfive.git] / security / Kconfig.hardening
index 995bc42..0f29596 100644 (file)
@@ -112,6 +112,7 @@ choice
        config INIT_STACK_ALL_PATTERN
                bool "pattern-init everything (strongest)"
                depends on CC_HAS_AUTO_VAR_INIT_PATTERN
+               depends on !KMSAN
                help
                  Initializes everything on the stack (including padding)
                  with a specific debug value. This is intended to eliminate
@@ -130,6 +131,7 @@ choice
        config INIT_STACK_ALL_ZERO
                bool "zero-init everything (strongest and safest)"
                depends on CC_HAS_AUTO_VAR_INIT_ZERO
+               depends on !KMSAN
                help
                  Initializes everything on the stack (including padding)
                  with a zero value. This is intended to eliminate all
@@ -224,6 +226,7 @@ config STACKLEAK_RUNTIME_DISABLE
 
 config INIT_ON_ALLOC_DEFAULT_ON
        bool "Enable heap memory zeroing on allocation by default"
+       depends on !KMSAN
        help
          This has the effect of setting "init_on_alloc=1" on the kernel
          command line. This can be disabled with "init_on_alloc=0".
@@ -236,6 +239,7 @@ config INIT_ON_ALLOC_DEFAULT_ON
 
 config INIT_ON_FREE_DEFAULT_ON
        bool "Enable heap memory zeroing on free by default"
+       depends on !KMSAN
        help
          This has the effect of setting "init_on_free=1" on the kernel
          command line. This can be disabled with "init_on_free=0".
@@ -253,6 +257,9 @@ config INIT_ON_FREE_DEFAULT_ON
 
 config CC_HAS_ZERO_CALL_USED_REGS
        def_bool $(cc-option,-fzero-call-used-regs=used-gpr)
+       # https://github.com/ClangBuiltLinux/linux/issues/1766
+       # https://github.com/llvm/llvm-project/issues/59242
+       depends on !CC_IS_CLANG || CLANG_VERSION > 150006
 
 config ZERO_CALL_USED_REGS
        bool "Enable register zeroing on function exit"
@@ -274,6 +281,9 @@ endmenu
 
 config CC_HAS_RANDSTRUCT
        def_bool $(cc-option,-frandomize-layout-seed-file=/dev/null)
+       # Randstruct was first added in Clang 15, but it isn't safe to use until
+       # Clang 16 due to https://github.com/llvm/llvm-project/issues/60349
+       depends on !CC_IS_CLANG || CLANG_VERSION >= 160000
 
 choice
        prompt "Randomize layout of sensitive kernel structures"