Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'akpm' (patches from Andrew)

Merge misc fixes from Andrew Morton:
"16 patches

Subsystems affected by this patch series: mm (selftests, hugetlb,
pagecache, mremap, kasan, and slub), kbuild, checkpatch, misc, and
lib"

* emailed patches from Andrew Morton <akpm@linux-foundation.org>:
mm: slub: call account_slab_page() after slab page initialization
zlib: move EXPORT_SYMBOL() and MODULE_LICENSE() out of dfltcc_syms.c
lib/zlib: fix inflating zlib streams on s390
lib/genalloc: fix the overflow when size is too big
kdev_t: always inline major/minor helper functions
sizes.h: add SZ_8G/SZ_16G/SZ_32G macros
local64.h: make <asm/local64.h> mandatory
kasan: fix null pointer dereference in kasan_record_aux_stack
mm: generalise COW SMC TLB flushing race comment
mm/mremap.c: fix extent calculation
mm: memmap defer init doesn't work as expected
mm: add prototype for __add_to_page_cache_locked()
checkpatch: prefer strscpy to strlcpy
Revert "kbuild: avoid static_assert for genksyms"
mm/hugetlb: fix deadlock in hugetlb_cow error path
selftests/vm: fix building protection keys test

+101 -91
-1
arch/alpha/include/asm/local64.h
··· 1 - #include <asm-generic/local64.h>
-1
arch/arc/include/asm/Kbuild
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 2 generic-y += extable.h 3 3 generic-y += kvm_para.h 4 - generic-y += local64.h 5 4 generic-y += mcs_spinlock.h 6 5 generic-y += parport.h 7 6 generic-y += user.h
-1
arch/arm/include/asm/Kbuild
··· 2 2 generic-y += early_ioremap.h 3 3 generic-y += extable.h 4 4 generic-y += flat.h 5 - generic-y += local64.h 6 5 generic-y += parport.h 7 6 8 7 generated-y += mach-types.h
-1
arch/arm64/include/asm/Kbuild
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 2 generic-y += early_ioremap.h 3 - generic-y += local64.h 4 3 generic-y += mcs_spinlock.h 5 4 generic-y += qrwlock.h 6 5 generic-y += qspinlock.h
-1
arch/csky/include/asm/Kbuild
··· 2 2 generic-y += asm-offsets.h 3 3 generic-y += gpio.h 4 4 generic-y += kvm_para.h 5 - generic-y += local64.h 6 5 generic-y += qrwlock.h 7 6 generic-y += user.h 8 7 generic-y += vmlinux.lds.h
-1
arch/h8300/include/asm/Kbuild
··· 2 2 generic-y += asm-offsets.h 3 3 generic-y += extable.h 4 4 generic-y += kvm_para.h 5 - generic-y += local64.h 6 5 generic-y += mcs_spinlock.h 7 6 generic-y += parport.h 8 7 generic-y += spinlock.h
-1
arch/hexagon/include/asm/Kbuild
··· 2 2 generic-y += extable.h 3 3 generic-y += iomap.h 4 4 generic-y += kvm_para.h 5 - generic-y += local64.h 6 5 generic-y += mcs_spinlock.h
-1
arch/ia64/include/asm/local64.h
··· 1 - #include <asm-generic/local64.h>
+2 -2
arch/ia64/mm/init.c
··· 536 536 537 537 if (map_start < map_end) 538 538 memmap_init_zone((unsigned long)(map_end - map_start), 539 - args->nid, args->zone, page_to_pfn(map_start), 539 + args->nid, args->zone, page_to_pfn(map_start), page_to_pfn(map_end), 540 540 MEMINIT_EARLY, NULL, MIGRATE_MOVABLE); 541 541 return 0; 542 542 } ··· 546 546 unsigned long start_pfn) 547 547 { 548 548 if (!vmem_map) { 549 - memmap_init_zone(size, nid, zone, start_pfn, 549 + memmap_init_zone(size, nid, zone, start_pfn, start_pfn + size, 550 550 MEMINIT_EARLY, NULL, MIGRATE_MOVABLE); 551 551 } else { 552 552 struct page *start;
-1
arch/m68k/include/asm/Kbuild
··· 2 2 generated-y += syscall_table.h 3 3 generic-y += extable.h 4 4 generic-y += kvm_para.h 5 - generic-y += local64.h 6 5 generic-y += mcs_spinlock.h 7 6 generic-y += spinlock.h
-1
arch/microblaze/include/asm/Kbuild
··· 2 2 generated-y += syscall_table.h 3 3 generic-y += extable.h 4 4 generic-y += kvm_para.h 5 - generic-y += local64.h 6 5 generic-y += mcs_spinlock.h 7 6 generic-y += parport.h 8 7 generic-y += syscalls.h
-1
arch/mips/include/asm/Kbuild
··· 6 6 generated-y += syscall_table_64_o32.h 7 7 generic-y += export.h 8 8 generic-y += kvm_para.h 9 - generic-y += local64.h 10 9 generic-y += mcs_spinlock.h 11 10 generic-y += parport.h 12 11 generic-y += qrwlock.h
-1
arch/nds32/include/asm/Kbuild
··· 4 4 generic-y += export.h 5 5 generic-y += gpio.h 6 6 generic-y += kvm_para.h 7 - generic-y += local64.h 8 7 generic-y += parport.h 9 8 generic-y += user.h
-1
arch/openrisc/include/asm/Kbuild
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 2 generic-y += extable.h 3 3 generic-y += kvm_para.h 4 - generic-y += local64.h 5 4 generic-y += mcs_spinlock.h 6 5 generic-y += qspinlock_types.h 7 6 generic-y += qspinlock.h
-1
arch/parisc/include/asm/Kbuild
··· 3 3 generated-y += syscall_table_64.h 4 4 generated-y += syscall_table_c32.h 5 5 generic-y += kvm_para.h 6 - generic-y += local64.h 7 6 generic-y += mcs_spinlock.h 8 7 generic-y += user.h
-1
arch/powerpc/include/asm/Kbuild
··· 5 5 generated-y += syscall_table_spu.h 6 6 generic-y += export.h 7 7 generic-y += kvm_types.h 8 - generic-y += local64.h 9 8 generic-y += mcs_spinlock.h 10 9 generic-y += qrwlock.h 11 10 generic-y += vtime.h
-1
arch/riscv/include/asm/Kbuild
··· 3 3 generic-y += extable.h 4 4 generic-y += flat.h 5 5 generic-y += kvm_para.h 6 - generic-y += local64.h 7 6 generic-y += user.h 8 7 generic-y += vmlinux.lds.h
-1
arch/s390/include/asm/Kbuild
··· 7 7 generic-y += asm-offsets.h 8 8 generic-y += export.h 9 9 generic-y += kvm_types.h 10 - generic-y += local64.h 11 10 generic-y += mcs_spinlock.h
-1
arch/sh/include/asm/Kbuild
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 2 generated-y += syscall_table.h 3 3 generic-y += kvm_para.h 4 - generic-y += local64.h 5 4 generic-y += mcs_spinlock.h 6 5 generic-y += parport.h
-1
arch/sparc/include/asm/Kbuild
··· 6 6 generated-y += syscall_table_c32.h 7 7 generic-y += export.h 8 8 generic-y += kvm_para.h 9 - generic-y += local64.h 10 9 generic-y += mcs_spinlock.h
-1
arch/x86/include/asm/local64.h
··· 1 - #include <asm-generic/local64.h>
-1
arch/xtensa/include/asm/Kbuild
··· 2 2 generated-y += syscall_table.h 3 3 generic-y += extable.h 4 4 generic-y += kvm_para.h 5 - generic-y += local64.h 6 5 generic-y += mcs_spinlock.h 7 6 generic-y += param.h 8 7 generic-y += qrwlock.h
+1
include/asm-generic/Kbuild
··· 34 34 mandatory-y += kprobes.h 35 35 mandatory-y += linkage.h 36 36 mandatory-y += local.h 37 + mandatory-y += local64.h 37 38 mandatory-y += mm-arch-hooks.h 38 39 mandatory-y += mmiowb.h 39 40 mandatory-y += mmu.h
-5
include/linux/build_bug.h
··· 77 77 #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr) 78 78 #define __static_assert(expr, msg, ...) _Static_assert(expr, msg) 79 79 80 - #ifdef __GENKSYMS__ 81 - /* genksyms gets confused by _Static_assert */ 82 - #define _Static_assert(expr, ...) 83 - #endif 84 - 85 80 #endif /* _LINUX_BUILD_BUG_H */
+11 -11
include/linux/kdev_t.h
··· 21 21 }) 22 22 23 23 /* acceptable for old filesystems */ 24 - static inline bool old_valid_dev(dev_t dev) 24 + static __always_inline bool old_valid_dev(dev_t dev) 25 25 { 26 26 return MAJOR(dev) < 256 && MINOR(dev) < 256; 27 27 } 28 28 29 - static inline u16 old_encode_dev(dev_t dev) 29 + static __always_inline u16 old_encode_dev(dev_t dev) 30 30 { 31 31 return (MAJOR(dev) << 8) | MINOR(dev); 32 32 } 33 33 34 - static inline dev_t old_decode_dev(u16 val) 34 + static __always_inline dev_t old_decode_dev(u16 val) 35 35 { 36 36 return MKDEV((val >> 8) & 255, val & 255); 37 37 } 38 38 39 - static inline u32 new_encode_dev(dev_t dev) 39 + static __always_inline u32 new_encode_dev(dev_t dev) 40 40 { 41 41 unsigned major = MAJOR(dev); 42 42 unsigned minor = MINOR(dev); 43 43 return (minor & 0xff) | (major << 8) | ((minor & ~0xff) << 12); 44 44 } 45 45 46 - static inline dev_t new_decode_dev(u32 dev) 46 + static __always_inline dev_t new_decode_dev(u32 dev) 47 47 { 48 48 unsigned major = (dev & 0xfff00) >> 8; 49 49 unsigned minor = (dev & 0xff) | ((dev >> 12) & 0xfff00); 50 50 return MKDEV(major, minor); 51 51 } 52 52 53 - static inline u64 huge_encode_dev(dev_t dev) 53 + static __always_inline u64 huge_encode_dev(dev_t dev) 54 54 { 55 55 return new_encode_dev(dev); 56 56 } 57 57 58 - static inline dev_t huge_decode_dev(u64 dev) 58 + static __always_inline dev_t huge_decode_dev(u64 dev) 59 59 { 60 60 return new_decode_dev(dev); 61 61 } 62 62 63 - static inline int sysv_valid_dev(dev_t dev) 63 + static __always_inline int sysv_valid_dev(dev_t dev) 64 64 { 65 65 return MAJOR(dev) < (1<<14) && MINOR(dev) < (1<<18); 66 66 } 67 67 68 - static inline u32 sysv_encode_dev(dev_t dev) 68 + static __always_inline u32 sysv_encode_dev(dev_t dev) 69 69 { 70 70 return MINOR(dev) | (MAJOR(dev) << 18); 71 71 } 72 72 73 - static inline unsigned sysv_major(u32 dev) 73 + static __always_inline unsigned sysv_major(u32 dev) 74 74 { 75 75 return (dev >> 18) & 0x3fff; 76 76 } 77 77 78 - static inline unsigned sysv_minor(u32 dev) 78 + static __always_inline unsigned sysv_minor(u32 dev) 79 79 { 80 80 return dev & 0x3ffff; 81 81 }
+10 -2
include/linux/mm.h
··· 216 216 loff_t *); 217 217 int overcommit_policy_handler(struct ctl_table *, int, void *, size_t *, 218 218 loff_t *); 219 + /* 220 + * Any attempt to mark this function as static leads to build failure 221 + * when CONFIG_DEBUG_INFO_BTF is enabled because __add_to_page_cache_locked() 222 + * is referred to by BPF code. This must be visible for error injection. 223 + */ 224 + int __add_to_page_cache_locked(struct page *page, struct address_space *mapping, 225 + pgoff_t index, gfp_t gfp, void **shadowp); 219 226 220 227 #define nth_page(page,n) pfn_to_page(page_to_pfn((page)) + (n)) 221 228 ··· 2439 2432 #endif 2440 2433 2441 2434 extern void set_dma_reserve(unsigned long new_dma_reserve); 2442 - extern void memmap_init_zone(unsigned long, int, unsigned long, unsigned long, 2443 - enum meminit_context, struct vmem_altmap *, int migratetype); 2435 + extern void memmap_init_zone(unsigned long, int, unsigned long, 2436 + unsigned long, unsigned long, enum meminit_context, 2437 + struct vmem_altmap *, int migratetype); 2444 2438 extern void setup_per_zone_wmarks(void); 2445 2439 extern int __meminit init_per_zone_wmark_min(void); 2446 2440 extern void mem_init(void);
+3
include/linux/sizes.h
··· 44 44 #define SZ_2G 0x80000000 45 45 46 46 #define SZ_4G _AC(0x100000000, ULL) 47 + #define SZ_8G _AC(0x200000000, ULL) 48 + #define SZ_16G _AC(0x400000000, ULL) 49 + #define SZ_32G _AC(0x800000000, ULL) 47 50 #define SZ_64T _AC(0x400000000000, ULL) 48 51 49 52 #endif /* __LINUX_SIZES_H__ */
+13 -12
lib/genalloc.c
··· 81 81 * users set the same bit, one user will return remain bits, otherwise 82 82 * return 0. 83 83 */ 84 - static int bitmap_set_ll(unsigned long *map, int start, int nr) 84 + static int bitmap_set_ll(unsigned long *map, unsigned long start, unsigned long nr) 85 85 { 86 86 unsigned long *p = map + BIT_WORD(start); 87 - const int size = start + nr; 87 + const unsigned long size = start + nr; 88 88 int bits_to_set = BITS_PER_LONG - (start % BITS_PER_LONG); 89 89 unsigned long mask_to_set = BITMAP_FIRST_WORD_MASK(start); 90 90 91 - while (nr - bits_to_set >= 0) { 91 + while (nr >= bits_to_set) { 92 92 if (set_bits_ll(p, mask_to_set)) 93 93 return nr; 94 94 nr -= bits_to_set; ··· 116 116 * users clear the same bit, one user will return remain bits, 117 117 * otherwise return 0. 118 118 */ 119 - static int bitmap_clear_ll(unsigned long *map, int start, int nr) 119 + static unsigned long 120 + bitmap_clear_ll(unsigned long *map, unsigned long start, unsigned long nr) 120 121 { 121 122 unsigned long *p = map + BIT_WORD(start); 122 - const int size = start + nr; 123 + const unsigned long size = start + nr; 123 124 int bits_to_clear = BITS_PER_LONG - (start % BITS_PER_LONG); 124 125 unsigned long mask_to_clear = BITMAP_FIRST_WORD_MASK(start); 125 126 126 - while (nr - bits_to_clear >= 0) { 127 + while (nr >= bits_to_clear) { 127 128 if (clear_bits_ll(p, mask_to_clear)) 128 129 return nr; 129 130 nr -= bits_to_clear; ··· 184 183 size_t size, int nid, void *owner) 185 184 { 186 185 struct gen_pool_chunk *chunk; 187 - int nbits = size >> pool->min_alloc_order; 188 - int nbytes = sizeof(struct gen_pool_chunk) + 186 + unsigned long nbits = size >> pool->min_alloc_order; 187 + unsigned long nbytes = sizeof(struct gen_pool_chunk) + 189 188 BITS_TO_LONGS(nbits) * sizeof(long); 190 189 191 190 chunk = vzalloc_node(nbytes, nid); ··· 243 242 struct list_head *_chunk, *_next_chunk; 244 243 struct gen_pool_chunk *chunk; 245 244 int order = pool->min_alloc_order; 246 - int bit, end_bit; 245 + unsigned long bit, end_bit; 247 246 248 247 list_for_each_safe(_chunk, _next_chunk, &pool->chunks) { 249 248 chunk = list_entry(_chunk, struct gen_pool_chunk, next_chunk); ··· 279 278 struct gen_pool_chunk *chunk; 280 279 unsigned long addr = 0; 281 280 int order = pool->min_alloc_order; 282 - int nbits, start_bit, end_bit, remain; 281 + unsigned long nbits, start_bit, end_bit, remain; 283 282 284 283 #ifndef CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG 285 284 BUG_ON(in_nmi()); ··· 488 487 { 489 488 struct gen_pool_chunk *chunk; 490 489 int order = pool->min_alloc_order; 491 - int start_bit, nbits, remain; 490 + unsigned long start_bit, nbits, remain; 492 491 493 492 #ifndef CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG 494 493 BUG_ON(in_nmi()); ··· 756 755 index = bitmap_find_next_zero_area(map, size, start, nr, 0); 757 756 758 757 while (index < size) { 759 - int next_bit = find_next_bit(map, size, index + nr); 758 + unsigned long next_bit = find_next_bit(map, size, index + nr); 760 759 if ((next_bit - index) < len) { 761 760 len = next_bit - index; 762 761 start_bit = index;
+1 -1
lib/zlib_dfltcc/Makefile
··· 8 8 9 9 obj-$(CONFIG_ZLIB_DFLTCC) += zlib_dfltcc.o 10 10 11 - zlib_dfltcc-objs := dfltcc.o dfltcc_deflate.o dfltcc_inflate.o dfltcc_syms.o 11 + zlib_dfltcc-objs := dfltcc.o dfltcc_deflate.o dfltcc_inflate.o
+5 -1
lib/zlib_dfltcc/dfltcc.c
··· 1 1 // SPDX-License-Identifier: Zlib 2 2 /* dfltcc.c - SystemZ DEFLATE CONVERSION CALL support. */ 3 3 4 - #include <linux/zutil.h> 4 + #include <linux/export.h> 5 + #include <linux/module.h> 5 6 #include "dfltcc_util.h" 6 7 #include "dfltcc.h" 7 8 ··· 54 53 dfltcc_state->dht_threshold = DFLTCC_DHT_MIN_SAMPLE_SIZE; 55 54 dfltcc_state->param.ribm = DFLTCC_RIBM; 56 55 } 56 + EXPORT_SYMBOL(dfltcc_reset); 57 + 58 + MODULE_LICENSE("GPL");
+3
lib/zlib_dfltcc/dfltcc_deflate.c
··· 4 4 #include "dfltcc_util.h" 5 5 #include "dfltcc.h" 6 6 #include <asm/setup.h> 7 + #include <linux/export.h> 7 8 #include <linux/zutil.h> 8 9 9 10 /* ··· 35 34 36 35 return 1; 37 36 } 37 + EXPORT_SYMBOL(dfltcc_can_deflate); 38 38 39 39 static void dfltcc_gdht( 40 40 z_streamp strm ··· 279 277 goto again; /* deflate() must use all input or all output */ 280 278 return 1; 281 279 } 280 + EXPORT_SYMBOL(dfltcc_deflate);
+2 -2
lib/zlib_dfltcc/dfltcc_inflate.c
··· 125 125 param->ho = (state->write - state->whave) & ((1 << HB_BITS) - 1); 126 126 if (param->hl) 127 127 param->nt = 0; /* Honor history for the first block */ 128 - param->cv = state->flags ? REVERSE(state->check) : state->check; 128 + param->cv = state->check; 129 129 130 130 /* Inflate */ 131 131 do { ··· 138 138 state->bits = param->sbb; 139 139 state->whave = param->hl; 140 140 state->write = (param->ho + param->hl) & ((1 << HB_BITS) - 1); 141 - state->check = state->flags ? REVERSE(param->cv) : param->cv; 141 + state->check = param->cv; 142 142 if (cc == DFLTCC_CC_OP2_CORRUPT && param->oesc != 0) { 143 143 /* Report an error if stream is corrupted */ 144 144 state->mode = BAD;
-17
lib/zlib_dfltcc/dfltcc_syms.c
··· 1 - // SPDX-License-Identifier: GPL-2.0-only 2 - /* 3 - * linux/lib/zlib_dfltcc/dfltcc_syms.c 4 - * 5 - * Exported symbols for the s390 zlib dfltcc support. 6 - * 7 - */ 8 - 9 - #include <linux/init.h> 10 - #include <linux/module.h> 11 - #include <linux/zlib.h> 12 - #include "dfltcc.h" 13 - 14 - EXPORT_SYMBOL(dfltcc_can_deflate); 15 - EXPORT_SYMBOL(dfltcc_deflate); 16 - EXPORT_SYMBOL(dfltcc_reset); 17 - MODULE_LICENSE("GPL");
+21 -1
mm/hugetlb.c
··· 4105 4105 * may get SIGKILLed if it later faults. 4106 4106 */ 4107 4107 if (outside_reserve) { 4108 + struct address_space *mapping = vma->vm_file->f_mapping; 4109 + pgoff_t idx; 4110 + u32 hash; 4111 + 4108 4112 put_page(old_page); 4109 4113 BUG_ON(huge_pte_none(pte)); 4114 + /* 4115 + * Drop hugetlb_fault_mutex and i_mmap_rwsem before 4116 + * unmapping. unmapping needs to hold i_mmap_rwsem 4117 + * in write mode. Dropping i_mmap_rwsem in read mode 4118 + * here is OK as COW mappings do not interact with 4119 + * PMD sharing. 4120 + * 4121 + * Reacquire both after unmap operation. 4122 + */ 4123 + idx = vma_hugecache_offset(h, vma, haddr); 4124 + hash = hugetlb_fault_mutex_hash(mapping, idx); 4125 + mutex_unlock(&hugetlb_fault_mutex_table[hash]); 4126 + i_mmap_unlock_read(mapping); 4127 + 4110 4128 unmap_ref_private(mm, vma, old_page, haddr); 4111 - BUG_ON(huge_pte_none(pte)); 4129 + 4130 + i_mmap_lock_read(mapping); 4131 + mutex_lock(&hugetlb_fault_mutex_table[hash]); 4112 4132 spin_lock(ptl); 4113 4133 ptep = huge_pte_offset(mm, haddr, huge_page_size(h)); 4114 4134 if (likely(ptep &&
+2
mm/kasan/generic.c
··· 337 337 cache = page->slab_cache; 338 338 object = nearest_obj(cache, page, addr); 339 339 alloc_meta = kasan_get_alloc_meta(cache, object); 340 + if (!alloc_meta) 341 + return; 340 342 341 343 alloc_meta->aux_stack[1] = alloc_meta->aux_stack[0]; 342 344 alloc_meta->aux_stack[0] = kasan_save_stack(GFP_NOWAIT);
+5 -3
mm/memory.c
··· 2892 2892 entry = mk_pte(new_page, vma->vm_page_prot); 2893 2893 entry = pte_sw_mkyoung(entry); 2894 2894 entry = maybe_mkwrite(pte_mkdirty(entry), vma); 2895 + 2895 2896 /* 2896 2897 * Clear the pte entry and flush it first, before updating the 2897 - * pte with the new entry. This will avoid a race condition 2898 - * seen in the presence of one thread doing SMC and another 2899 - * thread doing COW. 2898 + * pte with the new entry, to keep TLBs on different CPUs in 2899 + * sync. This code used to set the new PTE then flush TLBs, but 2900 + * that left a window where the new PTE could be loaded into 2901 + * some TLBs while the old PTE remains in others. 2900 2902 */ 2901 2903 ptep_clear_flush_notify(vma, vmf->address, vmf->pte); 2902 2904 page_add_new_anon_rmap(new_page, vma, vmf->address, false);
+1 -1
mm/memory_hotplug.c
··· 713 713 * expects the zone spans the pfn range. All the pages in the range 714 714 * are reserved so nobody should be touching them so we should be safe 715 715 */ 716 - memmap_init_zone(nr_pages, nid, zone_idx(zone), start_pfn, 716 + memmap_init_zone(nr_pages, nid, zone_idx(zone), start_pfn, 0, 717 717 MEMINIT_HOTPLUG, altmap, migratetype); 718 718 719 719 set_zone_contiguous(zone);
+3 -1
mm/mremap.c
··· 358 358 359 359 next = (old_addr + size) & mask; 360 360 /* even if next overflowed, extent below will be ok */ 361 - extent = (next > old_end) ? old_end - old_addr : next - old_addr; 361 + extent = next - old_addr; 362 + if (extent > old_end - old_addr) 363 + extent = old_end - old_addr; 362 364 next = (new_addr + size) & mask; 363 365 if (extent > next - new_addr) 364 366 extent = next - new_addr;
+5 -3
mm/page_alloc.c
··· 423 423 if (end_pfn < pgdat_end_pfn(NODE_DATA(nid))) 424 424 return false; 425 425 426 + if (NODE_DATA(nid)->first_deferred_pfn != ULONG_MAX) 427 + return true; 426 428 /* 427 429 * We start only with one section of pages, more pages are added as 428 430 * needed until the rest of deferred pages are initialized. ··· 6118 6116 * zone stats (e.g., nr_isolate_pageblock) are touched. 6119 6117 */ 6120 6118 void __meminit memmap_init_zone(unsigned long size, int nid, unsigned long zone, 6121 - unsigned long start_pfn, 6119 + unsigned long start_pfn, unsigned long zone_end_pfn, 6122 6120 enum meminit_context context, 6123 6121 struct vmem_altmap *altmap, int migratetype) 6124 6122 { ··· 6154 6152 if (context == MEMINIT_EARLY) { 6155 6153 if (overlap_memmap_init(zone, &pfn)) 6156 6154 continue; 6157 - if (defer_init(nid, pfn, end_pfn)) 6155 + if (defer_init(nid, pfn, zone_end_pfn)) 6158 6156 break; 6159 6157 } 6160 6158 ··· 6268 6266 6269 6267 if (end_pfn > start_pfn) { 6270 6268 size = end_pfn - start_pfn; 6271 - memmap_init_zone(size, nid, zone, start_pfn, 6269 + memmap_init_zone(size, nid, zone, start_pfn, range_end_pfn, 6272 6270 MEMINIT_EARLY, NULL, MIGRATE_MOVABLE); 6273 6271 } 6274 6272 }
+2 -3
mm/slub.c
··· 1619 1619 else 1620 1620 page = __alloc_pages_node(node, flags, order); 1621 1621 1622 - if (page) 1623 - account_slab_page(page, order, s); 1624 - 1625 1622 return page; 1626 1623 } 1627 1624 ··· 1770 1773 } 1771 1774 1772 1775 page->objects = oo_objects(oo); 1776 + 1777 + account_slab_page(page, oo_order(oo), s); 1773 1778 1774 1779 page->slab_cache = s; 1775 1780 __SetPageSlab(page);
+6
scripts/checkpatch.pl
··· 6646 6646 # } 6647 6647 # } 6648 6648 6649 + # strlcpy uses that should likely be strscpy 6650 + if ($line =~ /\bstrlcpy\s*\(/) { 6651 + WARN("STRLCPY", 6652 + "Prefer strscpy over strlcpy - see: https://lore.kernel.org/r/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL=V6A6G1oUZcprmknw\@mail.gmail.com/\n" . $herecurr); 6653 + } 6654 + 6649 6655 # typecasts on min/max could be min_t/max_t 6650 6656 if ($perl_version_ok && 6651 6657 defined $stat &&
+5 -5
tools/testing/selftests/vm/Makefile
··· 4 4 include local_config.mk 5 5 6 6 uname_M := $(shell uname -m 2>/dev/null || echo not) 7 - MACHINE ?= $(shell echo $(uname_M) | sed -e 's/aarch64.*/arm64/') 7 + MACHINE ?= $(shell echo $(uname_M) | sed -e 's/aarch64.*/arm64/' -e 's/ppc64.*/ppc64/') 8 8 9 9 # Without this, failed build products remain, with up-to-date timestamps, 10 10 # thus tricking Make (and you!) into believing that All Is Well, in subsequent ··· 43 43 TEST_GEN_FILES += transhuge-stress 44 44 TEST_GEN_FILES += userfaultfd 45 45 46 - ifeq ($(ARCH),x86_64) 46 + ifeq ($(MACHINE),x86_64) 47 47 CAN_BUILD_I386 := $(shell ./../x86/check_cc.sh $(CC) ../x86/trivial_32bit_program.c -m32) 48 48 CAN_BUILD_X86_64 := $(shell ./../x86/check_cc.sh $(CC) ../x86/trivial_64bit_program.c) 49 49 CAN_BUILD_WITH_NOPIE := $(shell ./../x86/check_cc.sh $(CC) ../x86/trivial_program.c -no-pie) ··· 65 65 endif 66 66 else 67 67 68 - ifneq (,$(findstring $(ARCH),powerpc)) 68 + ifneq (,$(findstring $(MACHINE),ppc64)) 69 69 TEST_GEN_FILES += protection_keys 70 70 endif 71 71 72 72 endif 73 73 74 - ifneq (,$(filter $(MACHINE),arm64 ia64 mips64 parisc64 ppc64 ppc64le riscv64 s390x sh64 sparc64 x86_64)) 74 + ifneq (,$(filter $(MACHINE),arm64 ia64 mips64 parisc64 ppc64 riscv64 s390x sh64 sparc64 x86_64)) 75 75 TEST_GEN_FILES += va_128TBswitch 76 76 TEST_GEN_FILES += virtual_address_range 77 77 TEST_GEN_FILES += write_to_hugetlbfs ··· 84 84 KSFT_KHDR_INSTALL := 1 85 85 include ../lib.mk 86 86 87 - ifeq ($(ARCH),x86_64) 87 + ifeq ($(MACHINE),x86_64) 88 88 BINARIES_32 := $(patsubst %,$(OUTPUT)/%,$(BINARIES_32)) 89 89 BINARIES_64 := $(patsubst %,$(OUTPUT)/%,$(BINARIES_64)) 90 90