incoming
Subsystems (20)
Andrew Morton
maintainer12 patches, based on 06c2aac4014c38247256fe49c61b7f55890271e7.
Subsystems affected by this patch series:
mm/documentation
mm/kasan
csky
ia64
mm/pagemap
gcov
lib
Subsystem: mm/documentation
Randy Dunlap <[email protected]>:
mm: eliminate "expecting prototype" kernel-doc warnings
Subsystem: mm/kasan
Arnd Bergmann <[email protected]>:
kasan: fix hwasan build for gcc
Walter Wu <[email protected]>:
kasan: remove redundant config option
Subsystem: csky
Randy Dunlap <[email protected]>:
csky: change a Kconfig symbol name to fix e1000 build error
Subsystem: ia64
Randy Dunlap <[email protected]>:
ia64: remove duplicate entries in generic_defconfig
ia64: fix discontig.c section mismatches
John Paul Adrian Glaubitz <glaubitz () physik ! fu-berlin ! de>:
ia64: tools: remove inclusion of ia64-specific version of errno.h header
John Paul Adrian Glaubitz <[email protected]>:
ia64: tools: remove duplicate definition of ia64_mf() on ia64
Subsystem: mm/pagemap
Zack Rusin <[email protected]>:
mm/mapping_dirty_helpers: guard hugepage pud's usage
Christophe Leroy <[email protected]>:
mm: ptdump: fix build failure
Subsystem: gcov
Johannes Berg <[email protected]>:
gcov: clang: fix clang-11+ build
Subsystem: lib
Randy Dunlap <[email protected]>:
lib: remove "expecting prototype" kernel-doc warnings
arch/arm64/kernel/sleep.S | 2 +- arch/csky/Kconfig | 2 +- arch/csky/include/asm/page.h | 2 +- arch/ia64/configs/generic_defconfig | 2 -- arch/ia64/mm/discontig.c | 6 +++--- arch/x86/kernel/acpi/wakeup_64.S | 2 +- include/linux/kasan.h | 2 +- kernel/gcov/clang.c | 2 +- lib/Kconfig.kasan | 9 ++------- lib/earlycpio.c | 4 ++-- lib/lru_cache.c | 3 ++- lib/parman.c | 4 ++-- lib/radix-tree.c | 11 ++++++----- mm/kasan/common.c | 2 +- mm/kasan/kasan.h | 2 +- mm/kasan/report_generic.c | 2 +- mm/mapping_dirty_helpers.c | 2 ++ mm/mmu_gather.c | 29 +++++++++++++++++++---------- mm/oom_kill.c | 2 +- mm/ptdump.c | 2 +- mm/shuffle.c | 4 ++-- scripts/Makefile.kasan | 22 ++++++++++++++-------- security/Kconfig.hardening | 4 ++-- tools/arch/ia64/include/asm/barrier.h | 3 --- tools/include/uapi/asm/errno.h | 2 -- 25 files changed, 67 insertions(+), 60 deletions(-)
Andrew Morton
maintainerPATCH 1/12 mm: eliminate "expecting prototype" kernel-doc warnings
From: Randy Dunlap <[email protected]>
Subject: mm: eliminate "expecting prototype" kernel-doc warnings
Fix stray kernel-doc warnings in mm/ due to mis-typed or missing function names.
Quietens these kernel-doc warnings:
../mm/mmu_gather.c:264: warning: expecting prototype for tlb_gather_mmu(). Prototype was for __tlb_gather_mmu() instead ../mm/oom_kill.c:180: warning: expecting prototype for Check whether unreclaimable slab amount is greater than(). Prototype was for should_dump_unreclaim_slab() instead ../mm/shuffle.c:155: warning: expecting prototype for shuffle_free_memory(). Prototype was for __shuffle_free_memory() instead
---
mm/mmu_gather.c | 29 +++++++++++++++++++---------- mm/oom_kill.c | 2 +- mm/shuffle.c | 4 ++-- 3 files changed, 22 insertions(+), 13 deletions(-)
mm/mmu_gather.c renamed from mm/mmu_gather.c~mm-eliminate-expecting-prototype-kernel-doc-warnings +19 -10
@@ -249,16 +249,6 @@ void tlb_flush_mmu(struct mmu_gather *tltlb_flush_mmu_free (tlb); } -/** -* tlb_gather_mmu - initialize an mmu_gather structure for page-table tear-down -* @tlb: the mmu_gather structure to initialize -* @mm: the mm_struct of the target address space -* @fullmm: @mm is without users and we're going to destroy the full address -* space (exit/execve) -* -* Called to initialize an (on-stack) mmu_gather structure for page-table -* tear-down from @mm. -*/ static void __tlb_gather_mmu (struct mmu_gather *tlb,struct mm_struct *mm,bool fullmm) {
@@ -283,11 +273,30 @@ static void __tlb_gather_mmu(struct mmu_inc_tlb_flush_pending (tlb->mm); } +/** +* tlb_gather_mmu - initialize an mmu_gather structure for page-table tear-down +* @tlb: the mmu_gather structure to initialize +* @mm: the mm_struct of the target address space +* +* Called to initialize an (on-stack) mmu_gather structure for page-table +* tear-down from @mm. +*/ void tlb_gather_mmu (struct mmu_gather *tlb,struct mm_struct *mm) {__tlb_gather_mmu (tlb, mm, false); } +/** +* tlb_gather_mmu_fullmm - initialize an mmu_gather structure for page-table tear-down +* @tlb: the mmu_gather structure to initialize +* @mm: the mm_struct of the target address space +* +* In this case, @mm is without users and we're going to destroy the +* full address space (exit/execve). +* +* Called to initialize an (on-stack) mmu_gather structure for page-table +* tear-down from @mm. +*/ void tlb_gather_mmu_fullmm (struct mmu_gather *tlb,struct mm_struct *mm) {__tlb_gather_mmu (tlb, mm, true);
mm/oom_kill.c renamed from mm/oom_kill.c~mm-eliminate-expecting-prototype-kernel-doc-warnings +1 -1
@@ -170,7 +170,7 @@ static bool oom_unkillable_task(struct treturn false; } -/** +/* * Check whether unreclaimable slab amount is greater than * all user memory(LRU pages). * dump_unreclaimable_slab() could help in the case that
mm/shuffle.c renamed from mm/shuffle.c~mm-eliminate-expecting-prototype-kernel-doc-warnings +2 -2
@@ -147,8 +147,8 @@ void __meminit __shuffle_zone(struct zonspin_unlock_irqrestore (&z->lock, flags); } -/** -* shuffle_free_memory - reduce the predictability of the page allocator +/* +* __shuffle_free_memory - reduce the predictability of the page allocator * @pgdat: node page data */ void __meminit __shuffle_free_memory (pg_data_t *pgdat)
_
Andrew Morton
maintainerPATCH 2/12 kasan: fix hwasan build for gcc
In reply to Andrew MortonFrom: Arnd Bergmann <[email protected]>
Subject: kasan: fix hwasan build for gcc
gcc-11 adds support for -fsanitize=kernel-hwaddress, so it becomes possible to enable CONFIG_KASAN_SW_TAGS.
Unfortunately this fails to build at the moment, because the corresponding command line arguments use llvm specific syntax.
Change it to use the cc-param macro instead, which works on both clang and gcc.
---
scripts/Makefile.kasan | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
scripts/Makefile.kasan renamed from scripts/Makefile.kasan~kasan-fix-hwasan-build-for-gcc +6 -6
@@ -2,6 +2,8 @@ CFLAGS_KASAN_NOSANITIZE := -fno-builtin KASAN_SHADOW_OFFSET ?= $(CONFIG_KASAN_SHADOW_OFFSET) +cc-param = $(call cc-option, -mllvm -$(1), $(call cc-option, --param $(1))) + ifdef CONFIG_KASAN_GENERIC ifdef CONFIG_KASAN_INLINE
@@ -12,8 +14,6 @@ endif CFLAGS_KASAN_MINIMAL := -fsanitize=kernel-address -cc-param = $(call cc-option, -mllvm -$(1), $(call cc-option, --param $(1))) - # -fasan-shadow-offset fails without -fsanitize CFLAGS_KASAN_SHADOW := $(call cc-option, -fsanitize=kernel-address \ -fasan-shadow-offset=$(KASAN_SHADOW_OFFSET), \
@@ -36,14 +36,14 @@ endif # CONFIG_KASAN_GENERIC ifdef CONFIG_KASAN_SW_TAGS ifdef CONFIG_KASAN_INLINE - instrumentation_flags := -mllvm -hwasan-mapping-offset=$(KASAN_SHADOW_OFFSET) + instrumentation_flags := $(call cc-param,hwasan-mapping-offset=$(KASAN_SHADOW_OFFSET)) else - instrumentation_flags := -mllvm -hwasan-instrument-with-calls=1 + instrumentation_flags := $(call cc-param,hwasan-instrument-with-calls=1) endif CFLAGS_KASAN := -fsanitize=kernel-hwaddress \ - -mllvm -hwasan-instrument-stack=$(CONFIG_KASAN_STACK) \ - -mllvm -hwasan-use-short-granules=0 \ + $(call cc-param,hwasan-instrument-stack=$(CONFIG_KASAN_STACK)) \ + $(call cc-param,hwasan-use-short-granules=0) \ $(instrumentation_flags) endif # CONFIG_KASAN_SW_TAGS
_
Andrew Morton
maintainerPATCH 3/12 kasan: remove redundant config option
In reply to Andrew MortonFrom: Walter Wu <[email protected]>
Subject: kasan: remove redundant config option
CONFIG_KASAN_STACK and CONFIG_KASAN_STACK_ENABLE both enable KASAN stack instrumentation, but we should only need one config, so that we remove CONFIG_KASAN_STACK_ENABLE and make CONFIG_KASAN_STACK workable. see [1].
When enable KASAN stack instrumentation, then for gcc we could do no prompt and default value y, and for clang prompt and default value n.
This patch fixes the following compilation warning:
include/linux/kasan.h:333:30: warning: 'CONFIG_KASAN_STACK' is not defined, evaluates to 0 [-Wundef]
[1]: https://bugzilla.kernel.org/show_bug.cgi?id=210221
---
arch/arm64/kernel/sleep.S | 2 +- arch/x86/kernel/acpi/wakeup_64.S | 2 +- include/linux/kasan.h | 2 +- lib/Kconfig.kasan | 9 ++------- mm/kasan/common.c | 2 +- mm/kasan/kasan.h | 2 +- mm/kasan/report_generic.c | 2 +- scripts/Makefile.kasan | 10 ++++++++-- security/Kconfig.hardening | 4 ++-- 9 files changed, 18 insertions(+), 17 deletions(-)
arch/arm64/kernel/sleep.S renamed from arch/arm64/kernel/sleep.S~kasan-remove-redundant-config-option +1 -1
@@ -134,7 +134,7 @@ SYM_FUNC_START(_cpu_resume) */ bl cpu_do_resume -#if defined(CONFIG_KASAN) && CONFIG_KASAN_STACK +#if defined(CONFIG_KASAN) && defined(CONFIG_KASAN_STACK) mov x0, sp bl kasan_unpoison_task_stack_below #endif
arch/x86/kernel/acpi/wakeup_64.S renamed from arch/x86/kernel/acpi/wakeup_64.S~kasan-remove-redundant-config-option +1 -1
@@ -115,7 +115,7 @@ SYM_FUNC_START(do_suspend_lowlevel) movq pt_regs_r14(%rax), %r14 movq pt_regs_r15(%rax), %r15 -#if defined(CONFIG_KASAN) && CONFIG_KASAN_STACK +#if defined(CONFIG_KASAN) && defined(CONFIG_KASAN_STACK) /* * The suspend path may have poisoned some areas deeper in the stack, * which we now need to unpoison.
include/linux/kasan.h renamed from include/linux/kasan.h~kasan-remove-redundant-config-option +1 -1
@@ -330,7 +330,7 @@ static inline bool kasan_check_byte(cons#endif /* CONFIG_KASAN */ -#if defined(CONFIG_KASAN ) &&CONFIG_KASAN_STACK +#if defined(CONFIG_KASAN ) && defined(CONFIG_KASAN_STACK )void kasan_unpoison_task_stack (struct task_struct *task);#else static inline void kasan_unpoison_task_stack (struct task_struct *task) {}
lib/Kconfig.kasan renamed from lib/Kconfig.kasan~kasan-remove-redundant-config-option +2 -7
@@ -138,9 +138,10 @@ config KASAN_INLINE endchoice -config KASAN_STACK_ENABLE +config KASAN_STACK bool "Enable stack instrumentation (unsafe)" if CC_IS_CLANG && !COMPILE_TEST depends on KASAN_GENERIC || KASAN_SW_TAGS + default y if CC_IS_GCC help The LLVM stack address sanitizer has a know problem that causes excessive stack usage in a lot of functions, see
@@ -154,12 +155,6 @@ config KASAN_STACK_ENABLE CONFIG_COMPILE_TEST. On gcc it is assumed to always be safe to use and enabled by default. -config KASAN_STACK - int - depends on KASAN_GENERIC || KASAN_SW_TAGS - default 1 if KASAN_STACK_ENABLE || CC_IS_GCC - default 0 - config KASAN_SW_TAGS_IDENTIFY bool "Enable memory corruption identification" depends on KASAN_SW_TAGS
mm/kasan/common.c renamed from mm/kasan/common.c~kasan-remove-redundant-config-option +1 -1
@@ -63,7 +63,7 @@ void __kasan_unpoison_range(const void *kasan_unpoison (address, size); } -#if CONFIG_KASAN_STACK +#ifdef CONFIG_KASAN_STACK /* Unpoison the entire stack for a task. */ void kasan_unpoison_task_stack (struct task_struct *task) {
mm/kasan/kasan.h renamed from mm/kasan/kasan.h~kasan-remove-redundant-config-option +1 -1
@@ -231,7 +231,7 @@ void *kasan_find_first_bad_addr(void *adconst char *kasan_get_bug_type (struct kasan_access_info *info);void kasan_metadata_fetch_row (char *buffer,void *row); -#if defined(CONFIG_KASAN_GENERIC ) &&CONFIG_KASAN_STACK +#if defined(CONFIG_KASAN_GENERIC ) && defined(CONFIG_KASAN_STACK )void kasan_print_address_stack_frame (const void *addr);#else static inline void kasan_print_address_stack_frame (const void *addr) { }
mm/kasan/report_generic.c renamed from mm/kasan/report_generic.c~kasan-remove-redundant-config-option +1 -1
@@ -128,7 +128,7 @@ void kasan_metadata_fetch_row(char *buffmemcpy (buffer,kasan_mem_to_shadow (row),META_BYTES_PER_ROW ); } -#if CONFIG_KASAN_STACK +#ifdef CONFIG_KASAN_STACK static bool __must_check tokenize_frame_descr (const char **frame_descr,char *token,size_t max_tok_len,unsigned long *value)
scripts/Makefile.kasan renamed from scripts/Makefile.kasan~kasan-remove-redundant-config-option +8 -2
@@ -4,6 +4,12 @@ KASAN_SHADOW_OFFSET ?= $(CONFIG_KASAN_SH cc-param = $(call cc-option, -mllvm -$(1), $(call cc-option, --param $(1))) +ifdef CONFIG_KASAN_STACK + stack_enable := 1 +else + stack_enable := 0 +endif + ifdef CONFIG_KASAN_GENERIC ifdef CONFIG_KASAN_INLINE
@@ -27,7 +33,7 @@ else CFLAGS_KASAN := $(CFLAGS_KASAN_SHADOW) \ $(call cc-param,asan-globals=1) \ $(call cc-param,asan-instrumentation-with-call-threshold=$(call_threshold)) \ - $(call cc-param,asan-stack=$(CONFIG_KASAN_STACK)) \ + $(call cc-param,asan-stack=$(stack_enable)) \ $(call cc-param,asan-instrument-allocas=1) endif
@@ -42,7 +48,7 @@ else endif CFLAGS_KASAN := -fsanitize=kernel-hwaddress \ - $(call cc-param,hwasan-instrument-stack=$(CONFIG_KASAN_STACK)) \ + $(call cc-param,hwasan-instrument-stack=$(stack_enable)) \ $(call cc-param,hwasan-use-short-granules=0) \ $(instrumentation_flags)
security/Kconfig.hardening renamed from security/Kconfig.hardening~kasan-remove-redundant-config-option +2 -2
@@ -64,7 +64,7 @@ choice config GCC_PLUGIN_STRUCTLEAK_BYREF bool "zero-init structs passed by reference (strong)" depends on GCC_PLUGINS - depends on !(KASAN && KASAN_STACK=1) + depends on !(KASAN && KASAN_STACK) select GCC_PLUGIN_STRUCTLEAK help Zero-initialize any structures on the stack that may
@@ -82,7 +82,7 @@ choice config GCC_PLUGIN_STRUCTLEAK_BYREF_ALL bool "zero-init anything passed by reference (very strong)" depends on GCC_PLUGINS - depends on !(KASAN && KASAN_STACK=1) + depends on !(KASAN && KASAN_STACK) select GCC_PLUGIN_STRUCTLEAK help Zero-initialize any stack variables that may be passed
_
Andrew Morton
maintainerPATCH 4/12 csky: change a Kconfig symbol name to fix e1000 build error
In reply to Andrew MortonFrom: Randy Dunlap <[email protected]>
Subject: csky: change a Kconfig symbol name to fix e1000 build error
e1000's #define of CONFIG_RAM_BASE conflicts with a Kconfig symbol in arch/csky/Kconfig.
The symbol in e1000 has been around longer, so change arch/csky/ to use DRAM_BASE instead of RAM_BASE to remove the conflict. (although e1000 is also a 2-line change)
---
arch/csky/Kconfig | 2 +- arch/csky/include/asm/page.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/csky/include/asm/page.h renamed from arch/csky/include/asm/page.h~csky-change-a-kconfig-symbol-name-to-fix-e1000-build-error +1 -1
@@ -28,7 +28,7 @@#define SSEG_SIZE 0x20000000#define LOWMEM_LIMIT (SSEG_SIZE * 2) -#define PHYS_OFFSET_OFFSET (CONFIG_RAM_BASE & (SSEG_SIZE - 1)) +#define PHYS_OFFSET_OFFSET (CONFIG_DRAM_BASE & (SSEG_SIZE - 1))#ifndef __ASSEMBLY__
arch/csky/Kconfig renamed from arch/csky/Kconfig~csky-change-a-kconfig-symbol-name-to-fix-e1000-build-error +1 -1
@@ -314,7 +314,7 @@ config FORCE_MAX_ZONEORDER int "Maximum zone order" default "11" -config RAM_BASE +config DRAM_BASE hex "DRAM start addr (the same with memory-section in dts)" default 0x0
_
Guo Ren
maintainerRe: [patch 04/12] csky: change a Kconfig symbol name to fix e1000 build error
Looks good to me, I'll approve it in my linux-next tree.
Quoted 46 lines · Andrew Morton
From: Randy Dunlap <[email protected]>
Subject: csky: change aKconfigsymbol name to fix e1000 build errore1000's #define of
CONFIG_RAM_BASEconflicts with aKconfigsymbol inarch/csky/Kconfig.The symbol in e1000 has been around longer, so change
arch/csky/to useDRAM_BASEinstead ofRAM_BASEto remove the conflict. (although e1000 is also a 2-line change)Signed-off-by Randy Dunlap <[email protected]>Reported-by kernel test robot <[email protected]>Acked-by Guo Ren <[email protected]>Cc Jesse Brandeburg <[email protected]>Signed-off-by Andrew Morton <[email protected]>---
arch/csky/Kconfig | 2 +- arch/csky/include/asm/page.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)arch/csky/include/asm/page.h renamed from arch/csky/include/asm/page.h~csky-change-a-kconfig-symbol-name-to-fix-e1000-build-error +1
-1@@ -28,7 +28,7 @@#define SSEG_SIZE 0x20000000#define LOWMEM_LIMIT (SSEG_SIZE * 2) -#define PHYS_OFFSET_OFFSET (CONFIG_RAM_BASE & (SSEG_SIZE - 1)) +#define PHYS_OFFSET_OFFSET (CONFIG_DRAM_BASE & (SSEG_SIZE - 1))#ifndef __ASSEMBLY__arch/csky/Kconfig renamed from arch/csky/Kconfig~csky-change-a-kconfig-symbol-name-to-fix-e1000-build-error +1
-1@@ -314,7 +314,7 @@ config FORCE_MAX_ZONEORDER int "Maximum zone order" default "11" -config RAM_BASE +config DRAM_BASE hex "DRAM start addr (the same with memory-section in dts)" default 0x0_
Signature · 4 lines
Best Regards Guo Ren ML: https://lore.kernel.org/linux-csky/
Andrew Morton
maintainerPATCH 5/12 ia64: remove duplicate entries in generic_defconfig
In reply to Andrew MortonFrom: Randy Dunlap <[email protected]>
Subject: ia64: remove duplicate entries in generic_defconfig
Fix ia64 generic_defconfig duplicate entries, as warned by:
+ arch/ia64/configs/generic_defconfig: warning: override: reassigning to symbol ATA: => 58
+ arch/ia64/configs/generic_defconfig: warning: override: reassigning to symbol ATA_PIIX: => 59
These 2 symbols still have the same value as in the removed lines.
---
arch/ia64/configs/generic_defconfig | 2 -- 1 file changed, 2 deletions(-)
arch/ia64/configs/generic_defconfig renamed from arch/ia64/configs/generic_defconfig~ia64-remove-duplicate-entries-in-generic_defconfig +0 -2
@@ -55,8 +55,6 @@ CONFIG_CHR_DEV_SG=m CONFIG_SCSI_FC_ATTRS=y CONFIG_SCSI_SYM53C8XX_2=y CONFIG_SCSI_QLOGIC_1280=y -CONFIG_ATA=y -CONFIG_ATA_PIIX=y CONFIG_SATA_VITESSE=y CONFIG_MD=y CONFIG_BLK_DEV_MD=m
_
Andrew Morton
maintainerPATCH 6/12 ia64: fix discontig.c section mismatches
In reply to Andrew MortonFrom: Randy Dunlap <[email protected]>
Subject: ia64: fix discontig.c section mismatches
Fix IA64 discontig.c Section mismatch warnings.
When CONFIG_SPARSEMEM=y and CONFIG_MEMORY_HOTPLUG=y, the functions computer_pernodesize() and scatter_node_data() should not be marked as __meminit because they are needed after init, on any memory hotplug event. Also, early_nr_cpus_node() is called by compute_pernodesize(), so early_nr_cpus_node() cannot be __meminit either.
WARNING: modpost: vmlinux.o(.text.unlikely+0x1612): Section mismatch in reference from the function arch_alloc_nodedata() to the function .meminit.text:compute_pernodesize() The function arch_alloc_nodedata() references
the function __meminit compute_pernodesize().
This is often because arch_alloc_nodedata lacks a __meminit
annotation or the annotation of compute_pernodesize is wrong.
WARNING: modpost: vmlinux.o(.text.unlikely+0x1692): Section mismatch in reference from the function arch_refresh_nodedata() to the function .meminit.text:scatter_node_data() The function arch_refresh_nodedata() references
the function __meminit scatter_node_data().
This is often because arch_refresh_nodedata lacks a __meminit
annotation or the annotation of scatter_node_data is wrong.
WARNING: modpost: vmlinux.o(.text.unlikely+0x1502): Section mismatch in reference from the function compute_pernodesize() to the function .meminit.text:early_nr_cpus_node() The function compute_pernodesize() references
the function __meminit early_nr_cpus_node().
This is often because compute_pernodesize lacks a __meminit
annotation or the annotation of early_nr_cpus_node is wrong.
---
arch/ia64/mm/discontig.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
arch/ia64/mm/discontig.c renamed from arch/ia64/mm/discontig.c~ia64-fix-discontigc-section-mismatches +3 -3
@@ -95,7 +95,7 @@ static int __init build_node_maps(unsign* acpi_boot_init() (which builds the node_to_cpu_mask array) hasn't been * called yet. Note that node 0 will also count all non-existent cpus. */ -static int __meminit early_nr_cpus_node (int node) +static int early_nr_cpus_node (int node) {int cpu, n =0 ;
@@ -110,7 +110,7 @@ static int __meminit early_nr_cpus_node(* compute_pernodesize - compute size of pernode data * @node: the node id. */ -static unsigned long __meminit compute_pernodesize (int node) +static unsigned long compute_pernodesize (int node) {unsigned long pernodesize =0 , cpus;
@@ -367,7 +367,7 @@ static void __init reserve_pernode_space } } -static void __meminit scatter_node_data (void ) +static void scatter_node_data (void ) {pg_data_t **dst;int node;
_
Andrew Morton
maintainerPATCH 7/12 ia64: tools: remove inclusion of ia64-specific version of errno.h header
In reply to Andrew MortonFrom: John Paul Adrian Glaubitz <glaubitz () physik ! fu-berlin ! de>
Subject: ia64: tools: remove inclusion of ia64-specific version of errno.h header
There is no longer an ia64-specific version of the errno.h header below arch/ia64/include/uapi/asm/, so trying to build tools/bpf fails with:
CC /usr/src/linux/tools/bpf/bpftool/btf_dumper.o
In file included from /usr/src/linux/tools/include/linux/err.h:8,
from btf_dumper.c:11:
/usr/src/linux/tools/include/uapi/asm/errno.h:13:10: fatal error: ../../../arch/ia64/include/uapi/asm/errno.h: No such file or directory
13 | #include "../../../arch/ia64/include/uapi/asm/errno.h"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~compilation terminated.
Thus, just remove the inclusion of the ia64-specific errno.h so that the build will use the generic errno.h header on this target which was used there anyway as the ia64-specific errno.h was just a wrapper for the generic header.
---
tools/include/uapi/asm/errno.h | 2 -- 1 file changed, 2 deletions(-)
tools/include/uapi/asm/errno.h renamed from tools/include/uapi/asm/errno.h~ia64-tools-remove-inclusion-of-ia64-specific-version-of-errnoh-header +0 -2
@@ -9,8 +9,6 @@#include "../../../arch/alpha/include/uapi/asm/errno.h" #elif defined(__mips__)#include "../../../arch/mips/include/uapi/asm/errno.h" -#elif defined(__ia64__) -#include "../../../arch/ia64/include/uapi/asm/errno.h" #elif defined(__xtensa__)#include "../../../arch/xtensa/include/uapi/asm/errno.h" #else
_
Andrew Morton
maintainerPATCH 8/12 ia64: tools: remove duplicate definition of ia64_mf() on ia64
In reply to Andrew MortonFrom: John Paul Adrian Glaubitz <[email protected]>
Subject: ia64: tools: remove duplicate definition of ia64_mf() on ia64
The ia64_mf() macro defined in tools/arch/ia64/include/asm/barrier.h is already defined in <asm/gcc_intrin.h> on ia64 which causes libbpf failing to build:
CC /usr/src/linux/tools/bpf/bpftool//libbpf/staticobjs/libbpf.o
In file included from /usr/src/linux/tools/include/asm/barrier.h:24,
from /usr/src/linux/tools/include/linux/ring_buffer.h:4,
from libbpf.c:37:
/usr/src/linux/tools/include/asm/../../arch/ia64/include/asm/barrier.h:43: error: "ia64_mf" redefined [-Werror]
43 | #define ia64_mf() asm volatile ("mf" ::: "memory")
|
In file included from /usr/include/ia64-linux-gnu/asm/intrinsics.h:20,
from /usr/include/ia64-linux-gnu/asm/swab.h:11,
from /usr/include/linux/swab.h:8,
from /usr/include/linux/byteorder/little_endian.h:13,
from /usr/include/ia64-linux-gnu/asm/byteorder.h:5,
from /usr/src/linux/tools/include/uapi/linux/perf_event.h:20,
from libbpf.c:36:
/usr/include/ia64-linux-gnu/asm/gcc_intrin.h:382: note: this is the location of the previous definition
382 | #define ia64_mf() __asm__ volatile ("mf" ::: "memory")
|cc1: all warnings being treated as errors
Thus, remove the definition from tools/arch/ia64/include/asm/barrier.h.
---
tools/arch/ia64/include/asm/barrier.h | 3 --- 1 file changed, 3 deletions(-)
tools/arch/ia64/include/asm/barrier.h renamed from tools/arch/ia64/include/asm/barrier.h~ia64-tools-remove-duplicate-definition-of-ia64_mf-on-ia64 +0 -3
@@ -39,9 +39,6 @@* sequential memory pages only. */ -/* XXX From arch/ia64/include/uapi/asm/gcc_intrin.h */ -#define ia64_mf () asm volatile ("mf" ::: "memory") -#define mb () ia64_mf()#define rmb () mb()#define wmb () mb()
_
Andrew Morton
maintainerPATCH 9/12 mm/mapping_dirty_helpers: guard hugepage pud's usage
In reply to Andrew MortonFrom: Zack Rusin <[email protected]>
Subject: mm/mapping_dirty_helpers: guard hugepage pud's usage
Mapping dirty helpers have, so far, been only used on X86, but a port of vmwgfx to ARM64 exposed a problem which results in a compilation error on ARM64 systems:
mm/mapping_dirty_helpers.c: In function `wp_clean_pud_entry':mm/mapping_dirty_helpers.c:172:32: error: implicit declaration of function pud_dirty'; did you mean pmd_dirty'? [-Werror=implicit-function-declaration]
This is due to the fact that mapping_dirty_helpers code assumes that pud_dirty is always defined, which is not the case for architectures that don't define CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD.
ARM64 arch is a little inconsistent when it comes to PUD hugepage helpers, e.g. it defines pud_young but not pud_dirty but regardless of that the core kernel code shouldn't assume that any of the PUD hugepage helpers are available unless CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD is defined. This prevents compilation errors whenever one of the drivers is ported to new architectures.
---
mm/mapping_dirty_helpers.c | 2 ++ 1 file changed, 2 insertions(+)
mm/mapping_dirty_helpers.c renamed from mm/mapping_dirty_helpers.c~mm-mapping_dirty_helpers-guard-hugepage-puds-usage +2 -0
@@ -165,10 +165,12 @@ static int wp_clean_pud_entry(pud_t *pudreturn 0 ; } +#ifdef CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD /* Huge pud */ walk->action =ACTION_CONTINUE ;if (pud_trans_huge (pudval) ||pud_devmap (pudval))WARN_ON (pud_write (pudval) ||pud_dirty (pudval)); +#endif return 0 ; }
_
Andrew Morton
maintainerPATCH 10/12 mm: ptdump: fix build failure
In reply to Andrew MortonFrom: Christophe Leroy <[email protected]>
Subject: mm: ptdump: fix build failure
CC mm/ptdump.o
In file included from <command-line>:
mm/ptdump.c: In function 'ptdump_pte_entry':
././include/linux/compiler_types.h:320:38: error: call to '__compiletime_assert_207' declared with attribute error: Unsupported access size for {READ,WRITE}_ONCE().
320 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
././include/linux/compiler_types.h:301:4: note: in definition of macro '__compiletime_assert'
301 | prefix ## suffix(); \
| ^~~~~~
././include/linux/compiler_types.h:320:2: note: in expansion of macro '_compiletime_assert'
320 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
./include/asm-generic/rwonce.h:36:2: note: in expansion of macro 'compiletime_assert'
36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
| ^~~~~~~~~~~~~~~~~~
./include/asm-generic/rwonce.h:49:2: note: in expansion of macro 'compiletime_assert_rwonce_type'
49 | compiletime_assert_rwonce_type(x); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mm/ptdump.c:114:14: note: in expansion of macro 'READ_ONCE'
114 | pte_t val = READ_ONCE(*pte);
| ^~~~~~~~~
make[2]: *** [mm/ptdump.o] Error 1READ_ONCE() cannot be used for reading PTEs. Use ptep_get() instead. See commit 481e980a7c19 ("mm: Allow arches to provide ptep_get()") and commit c0e1c8c22beb ("powerpc/8xx: Provide ptep_get() with 16k pages") for details.
---
mm/ptdump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
mm/ptdump.c renamed from mm/ptdump.c~mm-ptdump-fix-build-failure +1 -1
@@ -111,7 +111,7 @@ static int ptdump_pte_entry(pte_t *pte, unsigned long next, struct mm_walk *walk) { struct ptdump_state *st = walk->private; -pte_t val =READ_ONCE (*pte); +pte_t val =ptep_get (pte);if (st->effective_prot) st->effective_prot (st,4 ,pte_val (val));
_
Andrew Morton
maintainerPATCH 11/12 gcov: clang: fix clang-11+ build
In reply to Andrew MortonFrom: Johannes Berg <[email protected]>
Subject: gcov: clang: fix clang-11+ build
With clang-11+, the code is broken due to my kvmalloc() conversion (which predated the clang-11 support code) leaving one vmalloc() in place. Fix that.
---
kernel/gcov/clang.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/gcov/clang.c renamed from kernel/gcov/clang.c~gcov-clang-fix-clang-11-build +1 -1
@@ -369,7 +369,7 @@ static struct gcov_fn_info *gcov_fn_infoINIT_LIST_HEAD (&fn_dup->head); cv_size = fn->num_counters *sizeof (fn->counters[0 ]); - fn_dup->counters =vmalloc (cv_size); + fn_dup->counters =kvmalloc (cv_size,GFP_KERNEL );if (!fn_dup->counters) {kfree (fn_dup);return NULL ;
_
Nathan Chancellor
maintainerRe: [patch 11/12] gcov: clang: fix clang-11+ build
Quoted 28 lines · Andrew Morton
From: Johannes Berg <[email protected]>
Subject: gcov: clang: fix clang-11+ buildWith clang-11+, the code is broken due to my
kvmalloc()conversion (which predated the clang-11 support code) leaving onevmalloc()in place. Fix that.Link https://lkml.kernel.org/r/20210412214210.6e1ecca9cdc5.I24459763acf0591d5e6b31c7e3a59890d802f79c@changeid open hereSigned-off-by Johannes Berg <[email protected]>Reviewed-by Nick Desaulniers <[email protected]>Tested-by Nick Desaulniers <[email protected]>Signed-off-by Andrew Morton <[email protected]>---
kernel/gcov/clang.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)kernel/gcov/clang.c renamed from kernel/gcov/clang.c~gcov-clang-fix-clang-11-build +1
-1@@ -369,7 +369,7 @@ static struct gcov_fn_info *gcov_fn_infoINIT_LIST_HEAD (&fn_dup->head); cv_size = fn->num_counters *sizeof (fn->counters[0 ]); - fn_dup->counters =vmalloc (cv_size); + fn_dup->counters =kvmalloc (cv_size,GFP_KERNEL );if (!fn_dup->counters) {kfree (fn_dup);return NULL ;
Quoted 1 line
_
This should not have been merged into mainline by itself. It was a fix for "gcov: use kvmalloc()", which is still in -mm/-next. Merging it alone has now broken the build:
https://github.com/ClangBuiltLinux/continuous-integration2/runs/2384465683?check_suite_focus=true
Could it please be reverted in mainline then added as a fix patch for the patch that is still in -mm:
https://www.ozlabs.org/~akpm/mmotm/broken-out/gcov-use-kvmalloc.patch
Cheers,
Nathan
Re: [patch 11/12] gcov: clang: fix clang-11+ build
Quoted 8 lines · Nathan Chancellor
This should not have been merged into mainline by itself. It was a fix for "gcov: use
kvmalloc()", which is still in -mm/-next. Merging it alone has now broken the build:https://github.com/ClangBuiltLinux/continuous-integration2/runs/2384465683?check_suite_focus=true
Could it please be reverted in mainline [..]
Now reverted in my tree.
Sasha and stable cc'd too, since it was apparently auto-selected there..
Linus
Sasha Levin
maintainerRe: [patch 11/12] gcov: clang: fix clang-11+ build
Quoted 6 lines · Linus Torvalds
Quoted 5 lines · Nathan Chancellor
This should not have been merged into mainline by itself. It was a fix for "gcov: use
kvmalloc()", which is still in -mm/-next. Merging it alone has now broken the build:
Quoted 7 lines
Quoted 3 lines
https://github.com/ClangBuiltLinux/continuous-integration2/runs/2384465683?check_suite_focus=true
Could it please be reverted in mainline [..]
Now reverted in my tree.
Sasha and stable cc'd too, since it was apparently auto-selected there..
I'll drop it from my queue, thanks!
Signature · 2 lines
Thanks, Sasha
Andrew Morton
maintainerPATCH 12/12 lib: remove "expecting prototype" kernel-doc warnings
In reply to Andrew MortonFrom: Randy Dunlap <[email protected]>
Subject: lib: remove "expecting prototype" kernel-doc warnings
Fix various kernel-doc warnings in lib/ due to missing or erroneous function names.
Add kernel-doc for some function parameters that was missing. Use kernel-doc "Return:" notation in earlycpio.c.
Quietens the following warnings:
../lib/earlycpio.c:61: warning: expecting prototype for cpio_data find_cpio_data(). Prototype was for find_cpio_data() instead
../lib/lru_cache.c:640: warning: expecting prototype for lc_dump(). Prototype was for lc_seq_dump_details() instead lru_cache.c:90: warning: Function parameter or member 'cache' not described in 'lc_create'
../lib/parman.c:368: warning: expecting prototype for parman_item_del(). Prototype was for parman_item_remove() instead parman.c:309: warning: Excess function parameter 'prority' description in 'parman_prio_init'
../lib/radix-tree.c:703: warning: expecting prototype for __radix_tree_insert(). Prototype was for radix_tree_insert() instead radix-tree.c:180: warning: Excess function parameter 'addr' description in 'radix_tree_find_next_bit' radix-tree.c:180: warning: Excess function parameter 'size' description in 'radix_tree_find_next_bit' radix-tree.c:931: warning: Function parameter or member 'iter' not described in 'radix_tree_iter_replace'
---
lib/earlycpio.c | 4 ++-- lib/lru_cache.c | 3 ++- lib/parman.c | 4 ++-- lib/radix-tree.c | 11 ++++++----- 4 files changed, 12 insertions(+), 10 deletions(-)
lib/earlycpio.c renamed from lib/earlycpio.c~lib-remove-expecting-prototype-kernel-doc-warnings +2 -2
@@ -40,7 +40,7 @@ enum cpio_fields { };/** -* cpio_data find_cpio_data - Search for files in an uncompressed cpio +* find_cpio_data - Search for files in an uncompressed cpio * @path: The directory to search for, including a slash at the end * @data: Pointer to the cpio archive or a header inside * @len: Remaining length of the cpio based on data pointer
@@ -49,7 +49,7 @@ enum cpio_fields {* matching file itself. It can be used to iterate through the cpio * to find all files inside of a directory path. * -* @return: struct cpio_data containing the address, length and +* Return: &struct cpio_data containing the address, length and * filename (with the directory path cut off) of the found file. * If you search for a filename and not for files in a directory, * pass the absolute path of the filename in the cpio and make sure
lib/lru_cache.c renamed from lib/lru_cache.c~lib-remove-expecting-prototype-kernel-doc-warnings +2 -1
@@ -76,6 +76,7 @@ int lc_try_lock(struct lru_cache *lc)/** * lc_create - prepares to track objects in an active set * @name: descriptive name only used in lc_seq_printf_stats and lc_seq_dump_details +* @cache: cache root pointer * @max_pending_changes: maximum changes to accumulate until a transaction is required * @e_count: number of elements allowed to be active simultaneously * @e_size: size of the tracked objects
@@ -627,7 +628,7 @@ void lc_set(struct lru_cache *lc, unsign }/** -* lc_dump - Dump a complete LRU cache to seq in textual form. +* lc_seq_dump_details - Dump a complete LRU cache to seq in textual form. * @lc: the lru cache to operate on * @seq: the &struct seq_file pointer to seq_printf into * @utext: user supplied additional "heading" or other info
lib/parman.c renamed from lib/parman.c~lib-remove-expecting-prototype-kernel-doc-warnings +2 -2
@@ -297,7 +297,7 @@ EXPORT_SYMBOL(parman_destroy);* parman_prio_init - initializes a parman priority chunk * @parman: parman instance * @prio: parman prio structure to be initialized -* @prority: desired priority of the chunk +* @priority: desired priority of the chunk * * Note: all locking must be provided by the caller. *
@@ -356,7 +356,7 @@ int parman_item_add(struct parman *parmaEXPORT_SYMBOL (parman_item_add);/** -* parman_item_del - deletes parman item +* parman_item_remove - deletes parman item * @parman: parman instance * @prio: parman prio instance to delete the item from * @item: parman item instance
lib/radix-tree.c renamed from lib/radix-tree.c~lib-remove-expecting-prototype-kernel-doc-warnings +6 -5
@@ -166,9 +166,9 @@ static inline void all_tag_set(struct ra/** * radix_tree_find_next_bit - find the next set bit in a memory region * -* @addr: The address to base the search on -* @size: The bitmap size in bits -* @offset: The bitnumber to start searching at +* @node: where to begin the search +* @tag: the tag index +* @offset: the bitnumber to start searching at * * Unrollable variant of find_next_bit() for constant size arrays. * Tail bits starting from size to roundup(size, BITS_PER_LONG) must be zero.
@@ -461,7 +461,7 @@ out:/** * radix_tree_shrink - shrink radix tree to minimum height -* @root radix tree root +* @root: radix tree root */ static inline bool radix_tree_shrink (struct radix_tree_root *root) {
@@ -691,7 +691,7 @@ static inline int insert_entries(struct }/** -* __radix_tree_insert - insert into a radix tree +* radix_tree_insert - insert into a radix tree * @root: radix tree root * @index: index key * @item: item to insert
@@ -919,6 +919,7 @@ EXPORT_SYMBOL(radix_tree_replace_slot);/** * radix_tree_iter_replace - replace item in a slot * @root: radix tree root +* @iter: iterator state * @slot: pointer to slot * @item: new item to store in the slot. *
_