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
Showing the changes to scripts (1 of 19 files). Show all
Unified · Split
| @@ -1,5 +1,14 @@ | |||
| 1 | # SPDX-License-Identifier: GPL-2.0 | 1 | # SPDX-License-Identifier: GPL-2.0 |
| 2 | |||
| 3 | ifdef CONFIG_CC_HAS_KASAN_MEMINTRINSIC_PREFIX | ||
| 4 | # Safe for compiler to generate meminstrinsic calls in uninstrumented files. | ||
| 5 | CFLAGS_KASAN_NOSANITIZE := | ||
| 6 | else | ||
| 7 | # Don't let compiler generate memintrinsic calls in uninstrumented files | ||
| 8 | # because they are instrumented. | ||
| 2 | CFLAGS_KASAN_NOSANITIZE := -fno-builtin | 9 | CFLAGS_KASAN_NOSANITIZE := -fno-builtin |
| 10 | endif | ||
| 11 | |||
| 3 | KASAN_SHADOW_OFFSET ?= $(CONFIG_KASAN_SHADOW_OFFSET) | 12 | KASAN_SHADOW_OFFSET ?= $(CONFIG_KASAN_SHADOW_OFFSET) |
| 4 | 13 | ||
| 5 | cc-param = $(call cc-option, -mllvm -$(1), $(call cc-option, --param $(1))) | 14 | cc-param = $(call cc-option, -mllvm -$(1), $(call cc-option, --param $(1))) |
| @@ -38,6 +47,11 @@ endif · 32 unmodified lines | |||
| 38 | 47 | ||
| 39 | CFLAGS_KASAN += $(call cc-param,asan-stack=$(stack_enable)) | 48 | CFLAGS_KASAN += $(call cc-param,asan-stack=$(stack_enable)) |
| 40 | 49 | ||
| 50 | # Instrument memcpy/memset/memmove calls by using instrumented __asan_mem*() | ||
| 51 | # instead. With compilers that don't support this option, compiler-inserted | ||
| 52 | # memintrinsics won't be checked by KASAN on GENERIC_ENTRY architectures. | ||
| 53 | CFLAGS_KASAN += $(call cc-param,asan-kernel-mem-intrinsic-prefix=1) | ||
| 54 | |||
| 41 | endif # CONFIG_KASAN_GENERIC | 55 | endif # CONFIG_KASAN_GENERIC |
| 42 | 56 | ||
| 43 | ifdef CONFIG_KASAN_SW_TAGS | 57 | ifdef CONFIG_KASAN_SW_TAGS |
| @@ -54,6 +68,9 @@ CFLAGS_KASAN := -fsanitize=kernel-hwaddress \ · 10 unmodified lines | |||
| 54 | $(call cc-param,hwasan-inline-all-checks=0) \ | 68 | $(call cc-param,hwasan-inline-all-checks=0) \ |
| 55 | $(instrumentation_flags) | 69 | $(instrumentation_flags) |
| 56 | 70 | ||
| 71 | # Instrument memcpy/memset/memmove calls by using instrumented __hwasan_mem*(). | ||
| 72 | CFLAGS_KASAN += $(call cc-param,hwasan-kernel-mem-intrinsic-prefix=1) | ||
| 73 | |||
| 57 | endif # CONFIG_KASAN_SW_TAGS | 74 | endif # CONFIG_KASAN_SW_TAGS |
| 58 | 75 | ||
| 59 | export CFLAGS_KASAN CFLAGS_KASAN_NOSANITIZE | 76 | export CFLAGS_KASAN CFLAGS_KASAN_NOSANITIZE |