mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-15 08:14:15 +08:00
cfecea6ead
The core functions of string.c are those that may be implemented by per-architecture functions, or overloaded by FORTIFY_SOURCE. As a result, it needs to be built with __NO_FORTIFY. Without this, macros will collide with function declarations. This was accidentally working due to -ffreestanding (on some architectures). Make this deterministic by explicitly setting __NO_FORTIFY and move all the helper functions into string_helpers.c so that they gain the fortification coverage they had been missing. Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Nick Desaulniers <ndesaulniers@google.com> Cc: Andy Lavr <andy.lavr@gmail.com> Cc: Nathan Chancellor <nathan@kernel.org> Cc: Alexey Dobriyan <adobriyan@gmail.com> Cc: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com> Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Kees Cook <keescook@chromium.org> |
||
---|---|---|
.. | ||
.gitignore | ||
acpi.c | ||
cmdline.c | ||
cpuflags.c | ||
early_serial_console.c | ||
efi_thunk_64.S | ||
error.c | ||
error.h | ||
head_32.S | ||
head_64.S | ||
ident_map_64.c | ||
idt_64.c | ||
idt_handlers_64.S | ||
kaslr.c | ||
kernel_info.S | ||
Makefile | ||
mem_encrypt.S | ||
misc.c | ||
misc.h | ||
mkpiggy.c | ||
pgtable_64.c | ||
pgtable.h | ||
sev.c | ||
string.c | ||
vmlinux.lds.S |