Merge tag 'mm-hotfixes-stable-2023-03-04-13-12' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Pull misc fixes from Andrew Morton: "17 hotfixes. Eight are for MM and seven are for other parts of the kernel. Seven are cc:stable and eight address post-6.3 issues or were judged unsuitable for -stable backporting" * tag 'mm-hotfixes-stable-2023-03-04-13-12' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: mailmap: map Dikshita Agarwal's old address to his current one mailmap: map Vikash Garodia's old address to his current one fs/cramfs/inode.c: initialize file_ra_state fs: hfsplus: fix UAF issue in hfsplus_put_super panic: fix the panic_print NMI backtrace setting lib: parser: update documentation for match_NUMBER functions kasan, x86: don't rename memintrinsics in uninstrumented files kasan: test: fix test for new meminstrinsic instrumentation kasan: treat meminstrinsic as builtins in uninstrumented files kasan: emit different calls for instrumentable memintrinsics ocfs2: fix non-auto defrag path not working issue ocfs2: fix defrag path triggering jbd2 ASSERT mailmap: map Georgi Djakov's old Linaro address to his current one mm/hwpoison: convert TTU_IGNORE_HWPOISON to TTU_HWPOISON lib/zlib: DFLTCC deflate does not write all available bits for Z_NO_FLUSH mm/damon/paddr: fix missing folio_put() mm/mremap: fix dup_anon_vma() in vma_merge() case 4
This commit is contained in:
@@ -1,5 +1,14 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
ifdef CONFIG_CC_HAS_KASAN_MEMINTRINSIC_PREFIX
|
||||
# Safe for compiler to generate meminstrinsic calls in uninstrumented files.
|
||||
CFLAGS_KASAN_NOSANITIZE :=
|
||||
else
|
||||
# Don't let compiler generate memintrinsic calls in uninstrumented files
|
||||
# because they are instrumented.
|
||||
CFLAGS_KASAN_NOSANITIZE := -fno-builtin
|
||||
endif
|
||||
|
||||
KASAN_SHADOW_OFFSET ?= $(CONFIG_KASAN_SHADOW_OFFSET)
|
||||
|
||||
cc-param = $(call cc-option, -mllvm -$(1), $(call cc-option, --param $(1)))
|
||||
@@ -38,6 +47,11 @@ endif
|
||||
|
||||
CFLAGS_KASAN += $(call cc-param,asan-stack=$(stack_enable))
|
||||
|
||||
# Instrument memcpy/memset/memmove calls by using instrumented __asan_mem*()
|
||||
# instead. With compilers that don't support this option, compiler-inserted
|
||||
# memintrinsics won't be checked by KASAN on GENERIC_ENTRY architectures.
|
||||
CFLAGS_KASAN += $(call cc-param,asan-kernel-mem-intrinsic-prefix=1)
|
||||
|
||||
endif # CONFIG_KASAN_GENERIC
|
||||
|
||||
ifdef CONFIG_KASAN_SW_TAGS
|
||||
@@ -54,6 +68,9 @@ CFLAGS_KASAN := -fsanitize=kernel-hwaddress \
|
||||
$(call cc-param,hwasan-inline-all-checks=0) \
|
||||
$(instrumentation_flags)
|
||||
|
||||
# Instrument memcpy/memset/memmove calls by using instrumented __hwasan_mem*().
|
||||
CFLAGS_KASAN += $(call cc-param,hwasan-kernel-mem-intrinsic-prefix=1)
|
||||
|
||||
endif # CONFIG_KASAN_SW_TAGS
|
||||
|
||||
export CFLAGS_KASAN CFLAGS_KASAN_NOSANITIZE
|
||||
|
||||
Reference in New Issue
Block a user