linux-stable/arch
Alex Sverdlin 7ab9620ee8 ARM: 9242/1: kasan: Only map modules if CONFIG_KASAN_VMALLOC=n
[ Upstream commit 823f606ab6 ]

In case CONFIG_KASAN_VMALLOC=y kasan_populate_vmalloc() allocates the
shadow pages dynamically. But even worse is that kasan_release_vmalloc()
releases them, which is not compatible with create_mapping() of
MODULES_VADDR..MODULES_END range:

BUG: Bad page state in process kworker/9:1  pfn:2068b
page:e5e06160 refcount:0 mapcount:0 mapping:00000000 index:0x0
flags: 0x1000(reserved)
raw: 00001000 e5e06164 e5e06164 00000000 00000000 00000000 ffffffff 00000000
page dumped because: PAGE_FLAGS_CHECK_AT_FREE flag(s) set
bad because of flags: 0x1000(reserved)
Modules linked in: ip_tables
CPU: 9 PID: 154 Comm: kworker/9:1 Not tainted 5.4.188-... #1
Hardware name: LSI Axxia AXM55XX
Workqueue: events do_free_init
unwind_backtrace
show_stack
dump_stack
bad_page
free_pcp_prepare
free_unref_page
kasan_depopulate_vmalloc_pte
__apply_to_page_range
apply_to_existing_page_range
kasan_release_vmalloc
__purge_vmap_area_lazy
_vm_unmap_aliases.part.0
__vunmap
do_free_init
process_one_work
worker_thread
kthread

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Alexander Sverdlin <alexander.sverdlin@nokia.com>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-10-21 12:39:20 +02:00
..
alpha provide arch_test_bit_acquire for architectures that define test_bit 2022-08-27 09:49:54 -07:00
arc
arm ARM: 9242/1: kasan: Only map modules if CONFIG_KASAN_VMALLOC=n 2022-10-21 12:39:20 +02:00
arm64 arm64: dts: imx8mq-librem5: Add bq25895 as max17055's power supply 2022-10-21 12:39:19 +02:00
csky Merge 'irq/loongarch', 'pci/ctrl/loongson' and 'pci/header-cleanup-immutable' 2022-08-11 21:06:14 +08:00
hexagon provide arch_test_bit_acquire for architectures that define test_bit 2022-08-27 09:49:54 -07:00
ia64 ia64: export memory_add_physaddr_to_nid to fix cxl build error 2022-10-21 12:38:34 +02:00
loongarch LoongArch: Clean up loongson3_smp_ops declaration 2022-09-29 10:15:00 +08:00
m68k m68k: Process bootinfo records before saving them 2022-10-21 12:38:01 +02:00
microblaze
mips MIPS: BCM47XX: Cast memcmp() of function to (void *) 2022-10-21 12:39:04 +02:00
nios2 nios2: add force_successful_syscall_return() 2022-08-15 11:25:32 -05:00
openrisc
parisc parisc: Fix userspace graphics card breakage due to pgtable special bit 2022-10-21 12:37:39 +02:00
powerpc powerpc/pseries/vas: Pass hw_cpu_id to node associativity HCALL 2022-10-21 12:38:57 +02:00
riscv riscv: Pass -mno-relax only on lld < 15.0.0 2022-10-21 12:37:40 +02:00
s390 KVM: s390: pci: register pci hooks without interpretation 2022-09-21 16:18:38 +02:00
sh sh: machvec: Use char[] for section boundaries 2022-10-21 12:37:59 +02:00
sparc sparc: Unbreak the build 2022-10-12 09:39:04 +02:00
um UM: cpuinfo: Fix a warning for CONFIG_CPUMASK_OFFSTACK 2022-10-21 12:37:40 +02:00
x86 bpf: use bpf_prog_pack for bpf_dispatcher 2022-10-21 12:39:11 +02:00
xtensa Merge 'irq/loongarch', 'pci/ctrl/loongson' and 'pci/header-cleanup-immutable' 2022-08-11 21:06:14 +08:00
.gitignore
Kconfig asm-generic: Conditionally enable do_softirq_own_stack() via Kconfig. 2022-09-05 17:20:55 +02:00