1
0
Fork 0
alistair23-linux/arch
Andrey Konovalov f9409d58e9 kasan, arm64: don't instrument functions that enable kasan
This patch prepares Software Tag-Based KASAN for stack tagging support.

With stack tagging enabled, KASAN tags stack variable in each function in
its prologue.  In start_kernel() stack variables get tagged before KASAN
is enabled via setup_arch()->kasan_init().  As the result the tags for
start_kernel()'s stack variables end up in the temporary shadow memory.
Later when KASAN gets enabled, switched to normal shadow, and starts
checking tags, this leads to false-positive reports, as proper tags are
missing in normal shadow.

Disable KASAN instrumentation for start_kernel().  Also disable it for
arm64's setup_arch() as a precaution (it doesn't have any stack variables
right now).

[andreyknvl@google.com: reorder attributes for start_kernel()]
  Link: http://lkml.kernel.org/r/26fb6165a17abcf61222eda5184c030fb6b133d1.1596544734.git.andreyknvl@google.com

Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>	[arm64]
Cc: Alexander Potapenko <glider@google.com>
Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Elena Petrova <lenaptr@google.com>
Cc: Marco Elver <elver@google.com>
Cc: Vincenzo Frascino <vincenzo.frascino@arm.com>
Cc: Walter Wu <walter-zh.wu@mediatek.com>
Cc: Ard Biesheuvel <ardb@kernel.org>
Link: http://lkml.kernel.org/r/55d432671a92e931ab8234b03dc36b14d4c21bfb.1596199677.git.andreyknvl@google.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-08-07 11:33:28 -07:00
..
alpha asm-generic: pgalloc: provide generic pgd_free() 2020-08-07 11:33:26 -07:00
arc mm: remove unneeded includes of <asm/pgalloc.h> 2020-08-07 11:33:26 -07:00
arm mm/sparse: cleanup the code surrounding memory_present() 2020-08-07 11:33:27 -07:00
arm64 kasan, arm64: don't instrument functions that enable kasan 2020-08-07 11:33:28 -07:00
c6x Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next 2020-08-05 20:13:21 -07:00
csky asm-generic: pgalloc: provide generic pgd_free() 2020-08-07 11:33:26 -07:00
h8300 fork-v5.9 2020-08-04 14:47:45 -07:00
hexagon asm-generic: pgalloc: provide generic pgd_free() 2020-08-07 11:33:26 -07:00
ia64 mm/sparse: cleanup the code surrounding memory_present() 2020-08-07 11:33:27 -07:00
m68k asm-generic: pgalloc: provide generic pgd_free() 2020-08-07 11:33:26 -07:00
microblaze mm/sparse: cleanup the code surrounding memory_present() 2020-08-07 11:33:27 -07:00
mips mm/sparse: cleanup the code surrounding memory_present() 2020-08-07 11:33:27 -07:00
nds32 asm-generic: pgalloc: provide generic pgd_free() 2020-08-07 11:33:26 -07:00
nios2 asm-generic: pgalloc: provide generic pgd_free() 2020-08-07 11:33:26 -07:00
openrisc opeinrisc: switch to generic version of pte allocation 2020-08-07 11:33:26 -07:00
parisc mm/sparse: cleanup the code surrounding memory_present() 2020-08-07 11:33:27 -07:00
powerpc mm/sparse: cleanup the code surrounding memory_present() 2020-08-07 11:33:27 -07:00
riscv mm/sparse: cleanup the code surrounding memory_present() 2020-08-07 11:33:27 -07:00
s390 mm/sparse: cleanup the code surrounding memory_present() 2020-08-07 11:33:27 -07:00
sh mm/sparse: cleanup the code surrounding memory_present() 2020-08-07 11:33:27 -07:00
sparc mm/sparse: cleanup the code surrounding memory_present() 2020-08-07 11:33:27 -07:00
um asm-generic: pgalloc: provide generic pgd_free() 2020-08-07 11:33:26 -07:00
x86 mm/sparse: cleanup the code surrounding memory_present() 2020-08-07 11:33:27 -07:00
xtensa asm-generic: pgalloc: provide generic pgd_free() 2020-08-07 11:33:26 -07:00
.gitignore
Kconfig It's been a busy cycle for documentation - hopefully the busiest for a 2020-08-04 22:47:54 -07:00