riscv: make runtime const not usable by modules
PATCH 1/1 riscv: make runtime const not usable by modules
Similar as commit 284922f4c563 ("x86: uaccess: don't use runtime-const rewriting in modules") does, make riscv's runtime const not usable by modules too, to "make sure this doesn't get forgotten the next time somebody wants to do runtime constant optimizations". The reason is well explained in the above commit: "The runtime-const infrastructure was never designed to handle the modular case, because the constant fixup is only done at boot time for core kernel code."
--- arch/riscv/include/asm/runtime-const.h | 4 ++++ 1 file changed, 4 insertions(+)
arch/riscv/include/asm/runtime-const.h +4 -0
@@ -2,6 +2,10 @@#ifndef _ASM_RISCV_RUNTIME_CONST_H#define _ASM_RISCV_RUNTIME_CONST_H +#ifdef MODULE +#error "Cannot use runtime-const infrastructure from modules" +#endif +#include <asm/asm.h> #include <asm/alternative.h> #include <asm/cacheflush.h>
Signature · 1 line
2.51.0
Paul Walmsley
maintainerQuoted 9 lines · Jisheng Zhang
Similar as commit
284922f4c563("x86: uaccess: don't use runtime-const rewriting in modules") does, make riscv's runtime const not usable by modules too, to "make sure this doesn't get forgotten the next time somebody wants to do runtime constant optimizations". The reason is well explained in the above commit: "The runtime-const infrastructure was never designed to handle the modular case, because the constant fixup is only done at boot time for core kernel code."Signed-off-by Jisheng Zhang <[email protected]>
Thanks, queued for v7.0-rc.
- Paul