Skip to content

Commit 995177a

Browse files
committed
Merge tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm
Pull ARM updates from Russell King: "Not much this time around, the 5.20-rc1 development updates for arm are: - add KASAN support for vmalloc space on arm - some sparse fixes from Ben Dooks - rework amba device handling (so device addition isn't deferred)" * tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm: ARM: 9220/1: amba: Remove deferred device addition ARM: 9219/1: fix undeclared soft_restart ARM: 9218/1: dma-mapping: fix pointer/integer warning ARM: 9217/1: add definition of arch_irq_work_raise() ARM: 9203/1: kconfig: fix MODULE_PLTS for KASAN with KASAN_VMALLOC ARM: 9202/1: kasan: support CONFIG_KASAN_VMALLOC
2 parents 7df9075 + f2d3b9a commit 995177a

File tree

6 files changed

+156
-170
lines changed

6 files changed

+156
-170
lines changed

arch/arm/Kconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ config ARM
7575
select HAVE_ARCH_KFENCE if MMU && !XIP_KERNEL
7676
select HAVE_ARCH_KGDB if !CPU_ENDIAN_BE32 && MMU
7777
select HAVE_ARCH_KASAN if MMU && !XIP_KERNEL
78+
select HAVE_ARCH_KASAN_VMALLOC if HAVE_ARCH_KASAN
7879
select HAVE_ARCH_MMAP_RND_BITS if MMU
7980
select HAVE_ARCH_PFN_VALID
8081
select HAVE_ARCH_SECCOMP
@@ -1419,6 +1420,7 @@ config HW_PERF_EVENTS
14191420
config ARM_MODULE_PLTS
14201421
bool "Use PLTs to allow module memory to spill over into vmalloc area"
14211422
depends on MODULES
1423+
select KASAN_VMALLOC if KASAN
14221424
default y
14231425
help
14241426
Allocate PLTs when loading modules so that jumps and calls whose

arch/arm/include/asm/irq_work.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,6 @@ static inline bool arch_irq_work_has_interrupt(void)
99
return is_smp();
1010
}
1111

12+
extern void arch_irq_work_raise(void);
13+
1214
#endif /* _ASM_ARM_IRQ_WORK_H */

arch/arm/kernel/reboot.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include <asm/cacheflush.h>
1111
#include <asm/idmap.h>
1212
#include <asm/virt.h>
13+
#include <asm/system_misc.h>
1314

1415
#include "reboot.h"
1516

arch/arm/mm/dma-mapping.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,7 @@ static void *__dma_alloc(struct device *dev, size_t size, dma_addr_t *handle,
709709

710710
*handle = DMA_MAPPING_ERROR;
711711
allowblock = gfpflags_allow_blocking(gfp);
712-
cma = allowblock ? dev_get_cma_area(dev) : false;
712+
cma = allowblock ? dev_get_cma_area(dev) : NULL;
713713

714714
if (cma)
715715
buf->allocator = &cma_allocator;

arch/arm/mm/kasan_init.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,11 @@ void __init kasan_init(void)
236236

237237
clear_pgds(KASAN_SHADOW_START, KASAN_SHADOW_END);
238238

239-
kasan_populate_early_shadow(kasan_mem_to_shadow((void *)VMALLOC_START),
239+
if (!IS_ENABLED(CONFIG_KASAN_VMALLOC))
240+
kasan_populate_early_shadow(kasan_mem_to_shadow((void *)VMALLOC_START),
241+
kasan_mem_to_shadow((void *)VMALLOC_END));
242+
243+
kasan_populate_early_shadow(kasan_mem_to_shadow((void *)VMALLOC_END),
240244
kasan_mem_to_shadow((void *)-1UL) + 1);
241245

242246
for_each_mem_range(i, &pa_start, &pa_end) {

0 commit comments

Comments
 (0)