]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
scs: add CONFIG_MMU dependency for vfree_atomic()
authorSamuel Holland <samuel.holland@sifive.com>
Mon, 22 Jan 2024 17:52:01 +0000 (09:52 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Feb 2024 07:55:02 +0000 (08:55 +0100)
commit 6f9dc684cae638dda0570154509884ee78d0f75c upstream.

The shadow call stack implementation fails to build without CONFIG_MMU:

  ld.lld: error: undefined symbol: vfree_atomic
  >>> referenced by scs.c
  >>>               kernel/scs.o:(scs_free) in archive vmlinux.a

Link: https://lkml.kernel.org/r/20240122175204.2371009-1-samuel.holland@sifive.com
Fixes: a2abe7cbd8fe ("scs: switch to vmapped shadow stacks")
Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
Reviewed-by: Sami Tolvanen <samitolvanen@google.com>
Cc: Will Deacon <will@kernel.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/Kconfig

index b45c699c2bac30834c3b5795a1290ba675b7ffa0..2e2dc0975ab450264324992ac512dcc9c13f64f1 100644 (file)
@@ -605,6 +605,7 @@ config SHADOW_CALL_STACK
        bool "Clang Shadow Call Stack"
        depends on CC_IS_CLANG && ARCH_SUPPORTS_SHADOW_CALL_STACK
        depends on DYNAMIC_FTRACE_WITH_REGS || !FUNCTION_GRAPH_TRACER
+       depends on MMU
        help
          This option enables Clang's Shadow Call Stack, which uses a
          shadow stack to protect function return addresses from being