Skip to content

Commit b5d903c

Browse files
committed
Merge branch 'akpm' (patches from Andrew)
Merge more updates from Andrew Morton: - MM remainders - various misc things - kcov updates * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (27 commits) lib/test_printf.c: call wait_for_random_bytes() before plain %p tests hexagon: drop the unused variable zero_page_mask hexagon: fix printk format warning in setup.c mm: fix oom_kill event handling treewide: use PHYS_ADDR_MAX to avoid type casting ULLONG_MAX mm: use octal not symbolic permissions ipc: use new return type vm_fault_t sysvipc/sem: mitigate semnum index against spectre v1 fault-injection: reorder config entries arm: port KCOV to arm sched/core / kcov: avoid kcov_area during task switch kcov: prefault the kcov_area kcov: ensure irq code sees a valid area kernel/relay.c: change return type to vm_fault_t exofs: avoid VLA in structures coredump: fix spam with zero VMA process fat: use fat_fs_error() instead of BUG_ON() in __fat_get_block() proc: skip branch in /proc/*/* lookup mremap: remove LATENCY_LIMIT from mremap to reduce the number of TLB shootdowns mm/memblock: add missing include <linux/bootmem.h> ...
2 parents 7a93251 + ee410f1 commit b5d903c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+397
-212
lines changed

arch/arm/Kconfig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ config ARM
88
select ARCH_HAS_DEVMEM_IS_ALLOWED
99
select ARCH_HAS_ELF_RANDOMIZE
1010
select ARCH_HAS_FORTIFY_SOURCE
11+
select ARCH_HAS_KCOV
1112
select ARCH_HAS_PTE_SPECIAL if ARM_LPAE
12-
select ARCH_HAS_SET_MEMORY
1313
select ARCH_HAS_PHYS_TO_DMA
14+
select ARCH_HAS_SET_MEMORY
1415
select ARCH_HAS_STRICT_KERNEL_RWX if MMU && !XIP_KERNEL
1516
select ARCH_HAS_STRICT_MODULE_RWX if MMU
1617
select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST

arch/arm/boot/compressed/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ endif
2525

2626
GCOV_PROFILE := n
2727

28+
# Prevents link failures: __sanitizer_cov_trace_pc() is not linked in.
29+
KCOV_INSTRUMENT := n
30+
2831
#
2932
# Architecture dependencies
3033
#

arch/arm/kvm/hyp/Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,11 @@ obj-$(CONFIG_KVM_ARM_HOST) += hyp-entry.o
2323
obj-$(CONFIG_KVM_ARM_HOST) += switch.o
2424
CFLAGS_switch.o += $(CFLAGS_ARMV7VE)
2525
obj-$(CONFIG_KVM_ARM_HOST) += s2-setup.o
26+
27+
# KVM code is run at a different exception code with a different map, so
28+
# compiler instrumentation that inserts callbacks or checks into the code may
29+
# cause crashes. Just disable it.
30+
GCOV_PROFILE := n
31+
KASAN_SANITIZE := n
32+
UBSAN_SANITIZE := n
33+
KCOV_INSTRUMENT := n

arch/arm/vdso/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ CFLAGS_vgettimeofday.o = -O2
3030
# Disable gcov profiling for VDSO code
3131
GCOV_PROFILE := n
3232

33+
# Prevents link failures: __sanitizer_cov_trace_pc() is not linked in.
34+
KCOV_INSTRUMENT := n
35+
3336
# Force dependency
3437
$(obj)/vdso.o : $(obj)/vdso.so
3538

arch/arm64/mm/init.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ static void __init arm64_memory_present(void)
310310
}
311311
#endif
312312

313-
static phys_addr_t memory_limit = (phys_addr_t)ULLONG_MAX;
313+
static phys_addr_t memory_limit = PHYS_ADDR_MAX;
314314

315315
/*
316316
* Limit the memory size that was specified via FDT.
@@ -401,7 +401,7 @@ void __init arm64_memblock_init(void)
401401
* high up in memory, add back the kernel region that must be accessible
402402
* via the linear mapping.
403403
*/
404-
if (memory_limit != (phys_addr_t)ULLONG_MAX) {
404+
if (memory_limit != PHYS_ADDR_MAX) {
405405
memblock_mem_limit_remove_map(memory_limit);
406406
memblock_add(__pa_symbol(_text), (u64)(_end - _text));
407407
}
@@ -666,7 +666,7 @@ __setup("keepinitrd", keepinitrd_setup);
666666
*/
667667
static int dump_mem_limit(struct notifier_block *self, unsigned long v, void *p)
668668
{
669-
if (memory_limit != (phys_addr_t)ULLONG_MAX) {
669+
if (memory_limit != PHYS_ADDR_MAX) {
670670
pr_emerg("Memory Limit: %llu MB\n", memory_limit >> 20);
671671
} else {
672672
pr_emerg("Memory Limit: none\n");

arch/hexagon/include/asm/pgtable.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030

3131
/* A handy thing to have if one has the RAM. Declared in head.S */
3232
extern unsigned long empty_zero_page;
33-
extern unsigned long zero_page_mask;
3433

3534
/*
3635
* The PTE model described here is that of the Hexagon Virtual Machine,

arch/hexagon/kernel/setup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ void __init setup_arch(char **cmdline_p)
6666
*/
6767
__vmsetvec(_K_VM_event_vector);
6868

69-
printk(KERN_INFO "PHYS_OFFSET=0x%08x\n", PHYS_OFFSET);
69+
printk(KERN_INFO "PHYS_OFFSET=0x%08lx\n", PHYS_OFFSET);
7070

7171
/*
7272
* Simulator has a few differences from the hardware.

arch/hexagon/mm/init.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,6 @@ unsigned long __phys_offset; /* physical kernel offset >> 12 */
3939
/* Set as variable to limit PMD copies */
4040
int max_kernel_seg = 0x303;
4141

42-
/* think this should be (page_size-1) the way it's used...*/
43-
unsigned long zero_page_mask;
44-
4542
/* indicate pfn's of high memory */
4643
unsigned long highstart_pfn, highend_pfn;
4744

arch/mips/kernel/setup.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ void __init add_memory_region(phys_addr_t start, phys_addr_t size, long type)
9393
* If the region reaches the top of the physical address space, adjust
9494
* the size slightly so that (start + size) doesn't overflow
9595
*/
96-
if (start + size - 1 == (phys_addr_t)ULLONG_MAX)
96+
if (start + size - 1 == PHYS_ADDR_MAX)
9797
--size;
9898

9999
/* Sanity check */
@@ -376,7 +376,7 @@ static void __init bootmem_init(void)
376376
unsigned long reserved_end;
377377
unsigned long mapstart = ~0UL;
378378
unsigned long bootmap_size;
379-
phys_addr_t ramstart = (phys_addr_t)ULLONG_MAX;
379+
phys_addr_t ramstart = PHYS_ADDR_MAX;
380380
bool bootmap_valid = false;
381381
int i;
382382

arch/powerpc/mm/mem.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ void __init mem_topology_setup(void)
215215
/* Place all memblock_regions in the same node and merge contiguous
216216
* memblock_regions
217217
*/
218-
memblock_set_node(0, (phys_addr_t)ULLONG_MAX, &memblock.memory, 0);
218+
memblock_set_node(0, PHYS_ADDR_MAX, &memblock.memory, 0);
219219
}
220220

221221
void __init initmem_init(void)

0 commit comments

Comments
 (0)