提交 62776e43 编写于 作者: J John Thomson 提交者: Thomas Bogendoerfer

mips: boot/compressed: use __NO_FORTIFY

In the mips CONFIG_SYS_SUPPORTS_ZBOOT kernel, fix the compile error
when using CONFIG_FORTIFY_SOURCE=y

LD      vmlinuz
mipsel-openwrt-linux-musl-ld: arch/mips/boot/compressed/decompress.o: in
function `decompress_kernel':
./include/linux/decompress/mm.h:(.text.decompress_kernel+0x177c):
undefined reference to `warn_slowpath_fmt'

kernel test robot helped identify this as related to fortify. The error
appeared with commit 54d9469b ("fortify: Add run-time WARN for
cross-field memcpy()")
Link: https://lore.kernel.org/r/202209161144.x9xSqNQZ-lkp@intel.com/

Resolve this in the same style as commit cfecea6e ("lib/string:
Move helper functions out of string.c")
Reported-by: Nkernel test robot <lkp@intel.com>
Fixes: 54d9469b ("fortify: Add run-time WARN for cross-field memcpy()")
Reviewed-by: NKees Cook <keescook@chromium.org>
Signed-off-by: NJohn Thomson <git@johnthomson.fastmail.com.au>
Signed-off-by: NThomas Bogendoerfer <tsbogend@alpha.franken.de>
上级 f0c4d9fc
......@@ -9,6 +9,7 @@
#define DISABLE_BRANCH_PROFILING
#define __NO_FORTIFY
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/string.h>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册