[PATCH] fadump: Use str_yes_no() helper in fadump_show_config()

2024-12-30 Thread Thorsten Blum
Remove hard-coded strings by using the str_yes_no() helper function. Signed-off-by: Thorsten Blum --- arch/powerpc/kernel/fadump.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/kernel/fadump.c b/arch/powerpc/kernel/fadump.c index 4b371c738213..8c531533dd3

Re: [PATCH] net: ethernet: toshiba: ps3_gelic_wireless: Remove driver using deprecated API wext

2024-12-30 Thread Johannes Berg
On Tue, 2024-12-24 at 09:07 +0100, Philipp Hortmann wrote: > Driver was contributed in 2008. > > The following reasons lead to the removal: > - This driver generates maintenance workload for itself and for API wext So I've been wondering, why are you so concerned about this? And in particular, mo

[PATCH v4 00/15] move pagetable_*_dtor() to __tlb_remove_table()

2024-12-30 Thread Qi Zheng
Changes in v4: - remove [PATCH v3 15/17] and [PATCH v3 16/17] (Mike Rapoport) (the tlb_remove_page_ptdesc() and tlb_remove_ptdesc() are intermediate products of the project: https://kernelnewbies.org/MatthewWilcox/Memdescs, so keep them) - collect Acked-by Changes in v3: - take patch

[PATCH v4 02/15] riscv: mm: Skip pgtable level check in {pud,p4d}_alloc_one

2024-12-30 Thread Qi Zheng
From: Kevin Brodsky {pmd,pud,p4d}_alloc_one() is never called if the corresponding page table level is folded, as {pmd,pud,p4d}_alloc() already does the required check. We can therefore remove the runtime page table level checks in {pud,p4d}_alloc_one. The PUD helper becomes equivalent to the gen

[PATCH v4 01/15] Revert "mm: pgtable: make ptlock be freed by RCU"

2024-12-30 Thread Qi Zheng
This reverts commit 2f3443770437e49abc39af26962d293851cbab6d. Signed-off-by: Qi Zheng --- include/linux/mm.h | 2 +- include/linux/mm_types.h | 9 + mm/memory.c | 22 ++ 3 files changed, 8 insertions(+), 25 deletions(-) diff --git a/include/linux

[PATCH v4 07/15] mm: pgtable: introduce pagetable_dtor()

2024-12-30 Thread Qi Zheng
The pagetable_p*_dtor() are exactly the same except for the handling of ptlock. If we make ptlock_free() handle the case where ptdesc->ptl is NULL and remove VM_BUG_ON_PAGE() from pmd_ptlock_free(), we can unify pagetable_p*_dtor() into one function. Let's introduce pagetable_dtor() to do this. La

[PATCH v4 03/15] asm-generic: pgalloc: Provide generic p4d_{alloc_one,free}

2024-12-30 Thread Qi Zheng
From: Kevin Brodsky Four architectures currently implement 5-level pgtables: arm64, riscv, x86 and s390. The first three have essentially the same implementation for p4d_alloc_one() and p4d_free(), so we've got an opportunity to reduce duplication like at the lower levels. Provide a generic vers

[PATCH v4 05/15] arm64: pgtable: use mmu gather to free p4d level page table

2024-12-30 Thread Qi Zheng
Like other levels of page tables, also use mmu gather mechanism to free p4d level page table. Signed-off-by: Qi Zheng Originally-by: Peter Zijlstra (Intel) Cc: linux-arm-ker...@lists.infradead.org --- arch/arm64/include/asm/pgalloc.h | 1 - arch/arm64/include/asm/tlb.h | 14 ++

[PATCH v4 04/15] mm: pgtable: add statistics for P4D level page table

2024-12-30 Thread Qi Zheng
Like other levels of page tables, add statistics for P4D level page table. Signed-off-by: Qi Zheng Originally-by: Peter Zijlstra (Intel) --- arch/riscv/include/asm/pgalloc.h | 6 +- arch/x86/mm/pgtable.c| 3 +++ include/asm-generic/pgalloc.h| 2 ++ include/linux/mm.h

[PATCH v4 06/15] s390: pgtable: add statistics for PUD and P4D level page table

2024-12-30 Thread Qi Zheng
Like PMD and PTE level page table, also add statistics for PUD and P4D page table. Signed-off-by: Qi Zheng Suggested-by: Peter Zijlstra (Intel) Cc: linux-s...@vger.kernel.org --- arch/s390/include/asm/pgalloc.h | 29 +++--- arch/s390/include/asm/tlb.h | 37 ++

[PATCH v4 11/15] x86: pgtable: move pagetable_dtor() to __tlb_remove_table()

2024-12-30 Thread Qi Zheng
Move pagetable_dtor() to __tlb_remove_table(), so that ptlock and page table pages can be freed together (regardless of whether RCU is used). This prevents the use-after-free problem where the ptlock is freed immediately but the page table pages is freed later via RCU. Page tables shouldn't have s

[PATCH v4 13/15] mm: pgtable: introduce generic __tlb_remove_table()

2024-12-30 Thread Qi Zheng
Several architectures (arm, arm64, riscv and x86) define exactly the same __tlb_remove_table(), just introduce generic __tlb_remove_table() to eliminate these duplications. The s390 __tlb_remove_table() is nearly the same, so also make s390 __tlb_remove_table() version generic. Signed-off-by: Qi

[PATCH v4 12/15] s390: pgtable: also move pagetable_dtor() of PxD to __tlb_remove_table()

2024-12-30 Thread Qi Zheng
To unify the PxD and PTE TLB free path, also move the pagetable_dtor() of PMD|PUD|P4D to __tlb_remove_table(). Signed-off-by: Qi Zheng Suggested-by: Peter Zijlstra (Intel) Cc: linux-s...@vger.kernel.org --- arch/s390/include/asm/tlb.h | 3 --- arch/s390/mm/pgalloc.c | 14 -- 2

[PATCH v4 10/15] riscv: pgtable: move pagetable_dtor() to __tlb_remove_table()

2024-12-30 Thread Qi Zheng
Move pagetable_dtor() to __tlb_remove_table(), so that ptlock and page table pages can be freed together (regardless of whether RCU is used). This prevents the use-after-free problem where the ptlock is freed immediately but the page table pages is freed later via RCU. Page tables shouldn't have s

[PATCH v4 09/15] arm64: pgtable: move pagetable_dtor() to __tlb_remove_table()

2024-12-30 Thread Qi Zheng
Move pagetable_dtor() to __tlb_remove_table(), so that ptlock and page table pages can be freed together (regardless of whether RCU is used). This prevents the use-after-free problem where the ptlock is freed immediately but the page table pages is freed later via RCU. Page tables shouldn't have s

[PATCH v4 15/15] mm: pgtable: introduce generic pagetable_dtor_free()

2024-12-30 Thread Qi Zheng
The pte_free(), pmd_free(), __pud_free() and __p4d_free() in asm-generic/pgalloc.h and the generic __tlb_remove_table() are basically the same, so let's introduce pagetable_dtor_free() to deduplicate them. In addition, the pagetable_dtor_free() in s390 does the same thing, so let's s390 also calls

[PATCH v4 14/15] mm: pgtable: move __tlb_remove_table_one() in x86 to generic file

2024-12-30 Thread Qi Zheng
The __tlb_remove_table_one() in x86 does not contain architecture-specific content, so move it to the generic file. Signed-off-by: Qi Zheng --- arch/x86/include/asm/tlb.h | 19 --- mm/mmu_gather.c| 20 ++-- 2 files changed, 18 insertions(+), 21 deletio

Re: [PATCH 4/6] kvm powerpc/book3s-apiv2: Introduce kvm-hv specific PMU

2024-12-30 Thread Gautam Menghani
On Sun, Dec 22, 2024 at 07:32:32PM +0530, Vaibhav Jain wrote: > Introduce a new PMU named 'kvm-hv' to report Book3s kvm-hv specific > performance counters. This will expose KVM-HV specific performance > attributes to user-space via kernel's PMU infrastructure and would enable > users to monitor act

[PATCH v4 08/15] arm: pgtable: move pagetable_dtor() to __tlb_remove_table()

2024-12-30 Thread Qi Zheng
Move pagetable_dtor() to __tlb_remove_table(), so that ptlock and page table pages can be freed together (regardless of whether RCU is used). This prevents the use-after-free problem where the ptlock is freed immediately but the page table pages is freed later via RCU. Page tables shouldn't have s

Re: [PATCH v2 0/3] sysfs: constify bin_attribute argument of sysfs_bin_attr_simple_read()

2024-12-30 Thread Alexei Starovoitov
On Sat, Dec 28, 2024 at 12:43 AM Thomas Weißschuh wrote: > > Most users use this function through the BIN_ATTR_SIMPLE* macros, > they can handle the switch transparently. > > This series is meant to be merged through the driver core tree. hmm. why? I'd rather take patches 2 and 3 into bpf-next t

[PATCH v12 1/5] modules: Support extended MODVERSIONS info

2024-12-30 Thread Matthew Maurer
Adds a new format for MODVERSIONS which stores each field in a separate ELF section. This initially adds support for variable length names, but could later be used to add additional fields to MODVERSIONS in a backwards compatible way if needed. Any new fields will be ignored by old user tooling, un

[PATCH v12 0/5] Extended MODVERSIONS Support

2024-12-30 Thread Matthew Maurer
This patch series is intended for use alongside the Implement DWARF modversions series [1] to enable RUST and MODVERSIONS at the same time. Elsewhere, we've seen a desire for long symbol name support for LTO symbol names [2], and the previous series came up [3] as a possible solution rather than h

[PATCH v12 2/5] modpost: Produce extended MODVERSIONS information

2024-12-30 Thread Matthew Maurer
Generate both the existing modversions format and the new extended one when running modpost. Presence of this metadata in the final .ko is guarded by CONFIG_EXTENDED_MODVERSIONS. We no longer generate an error on long symbols in modpost if CONFIG_EXTENDED_MODVERSIONS is set, as they can now be app

[PATCH v12 4/5] Documentation/kbuild: Document storage of symbol information

2024-12-30 Thread Matthew Maurer
Document where exported and imported symbols are kept, format options, and limitations. Signed-off-by: Matthew Maurer --- Documentation/kbuild/modules.rst | 20 1 file changed, 20 insertions(+) diff --git a/Documentation/kbuild/modules.rst b/Documentation/kbuild/modules.rst

[PATCH v12 3/5] modules: Allow extended modversions without basic MODVERSIONS

2024-12-30 Thread Matthew Maurer
If you know that your kernel modules will only ever be loaded by a newer kernel, you can disable BASIC_MODVERSIONS to save space. This also allows easy creation of test modules to see how tooling will respond to modules that only have the new format. Signed-off-by: Matthew Maurer --- kernel/modu

[PATCH v12 5/5] rust: Use gendwarfksyms + extended modversions for CONFIG_MODVERSIONS

2024-12-30 Thread Matthew Maurer
From: Sami Tolvanen Previously, two things stopped Rust from using MODVERSIONS: 1. Rust symbols are occasionally too long to be represented in the original versions table 2. Rust types cannot be properly hashed by the existing genksyms approach because: * Looking up type definitions

Re: [PATCH v4 00/15] move pagetable_*_dtor() to __tlb_remove_table()

2024-12-30 Thread Andrew Morton
On Mon, 30 Dec 2024 17:07:35 +0800 Qi Zheng wrote: > Changes in v4: > - remove [PATCH v3 15/17] and [PATCH v3 16/17] (Mike Rapoport) >(the tlb_remove_page_ptdesc() and tlb_remove_ptdesc() are intermediate > products of the project: https://kernelnewbies.org/MatthewWilcox/Memdescs, >