On Sun, Dec 22, 2024 at 07:15:37PM +0800, Guo Weikang wrote:
Hi Guo,
> Before SLUB initialization, various subsystems used memblock_alloc to
> allocate memory. In most cases, when memory allocation fails, an immediate
> panic is required. To simplify this behavior and reduce repetitive checks,
>
On 07/01/2025 11:51, Qi Zheng wrote:
> [...]
>
> Author: Qi Zheng
> Date: Fri Dec 13 17:13:48 2024 +0800
>
> mm: pgtable: completely move pagetable_dtor() to generic
> tlb_remove_table()
>
> For the generic tlb_remove_table(), it is implemented in the
> following two
> forms:
>
>
On 23. Nov 2024, at 11:19, Christophe Leroy wrote:
> Isn't our file just a copy of the one from binutils ? Shouldn't we adjust it
> based on commit https://github.com/bminor/binutils-gdb/commit/2ce18a16268a ?
It looks like it's a copy and the name is spelled the same as in my patch:
"Mimi Phuo
Use note name macros to match with the userspace's expectation.
Acked-by: Baoquan He
Signed-off-by: Akihiko Odaki
---
arch/powerpc/kernel/fadump.c | 2 +-
arch/powerpc/platforms/powernv/opal-core.c | 8
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/p
On 07/01/2025 13:31, Qi Zheng wrote:
> On 2025/1/7 19:58, Kevin Brodsky wrote:
>> On 07/01/2025 11:51, Qi Zheng wrote:
>>> [...]
>>>
>>> Author: Qi Zheng
>>> Date: Fri Dec 13 17:13:48 2024 +0800
>>>
>>> mm: pgtable: completely move pagetable_dtor() to generic
>>> tlb_remove_table()
>>>
>>>
On Mon, Dec 30, 2024 at 05:07:48PM +0800, Qi Zheng wrote:
> 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
Hi,
On Tue, Jan 07, 2025 at 09:45:56PM +0900, Akihiko Odaki wrote:
> Use note name macros to match with the userspace's expectation.
>
> Signed-off-by: Akihiko Odaki
> ---
> arch/s390/kernel/crash_dump.c | 62
> ---
> 1 file changed, 23 insertions(+), 39
On Tue, Jan 07, 2025 at 09:45:53PM +0900, Akihiko Odaki wrote:
> Use note name macros to match with the userspace's expectation.
Also (and more importantly) get rid of duplicated knowledge about the
mapping of note types to note names, so that elf.h is the authoritative
source of this information?
On Sat, Dec 28, 2024 at 10:49:38AM -0800, Yury Norov wrote:
Hi Yury,
> cpumask_next_wrap_old() has two additional parameters, comparing to it's
> analogue in linux/find.h find_next_bit_wrap(). The reason for that is
> historical.
>
> Before 4fe49b3b97c262 ("lib/bitmap: introduce for_each_set_bit
On Tue, Jan 7, 2025 at 12:50 AM Christophe Leroy
wrote:
>
> Le 06/01/2025 à 21:05, Ian Rogers a écrit :
> > On Mon, Jan 6, 2025 at 11:38 AM Christophe Leroy
> > wrote:
> >>
> >> Building perf with EXTRA_CFLAGS="-DMAX_NR_CPUS=1" fails:
> >>
> >>CC /home/chleroy/linux-powerpc/tools
On Mon, Dec 30, 2024 at 05:07:50PM +0800, Qi Zheng wrote:
> 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 pagetab
Le 07/01/2025 à 13:45, Akihiko Odaki a écrit :
> Use note name macros to match with the userspace's expectation.
In the subject:
s/powwerpc/powerpc
Christophe
>
> Acked-by: Baoquan He
> Signed-off-by: Akihiko Odaki
> ---
> arch/powerpc/kernel/fadump.c | 2 +-
> arch/powerp
On Sat, Dec 28, 2024 at 10:49:35AM -0800, Yury Norov wrote:
> A loop based on cpumask_next_wrap() opencodes the dedicated macro
> for_each_online_cpu_wrap(). Using the macro allows to avoid setting
> bits affinity mask more than once when stride >= num_online_cpus.
>
> This also helps to drop cpum
On Tue, Jan 07, 2025 at 04:37:17PM -0600, Nick Child wrote:
> On Sat, Dec 28, 2024 at 10:49:35AM -0800, Yury Norov wrote:
> > A loop based on cpumask_next_wrap() opencodes the dedicated macro
> > for_each_online_cpu_wrap(). Using the macro allows to avoid setting
> > bits affinity mask more than on
On Mon, Jan 06, 2025 at 02:50:31PM +0100, Christophe Leroy wrote:
>
>
> Le 02/01/2025 à 19:31, J. Neuschäfer via B4 Relay a écrit :
> > [Vous ne recevez pas souvent de courriers de
> > devnull+j.ne.posteo@kernel.org. Découvrez pourquoi ceci est important à
> > https://aka.ms/LearnAboutSende
On Mon, Jan 06, 2025 at 02:52:59PM +0100, Christophe Leroy wrote:
>
>
> Le 02/01/2025 à 19:31, J. Neuschäfer via B4 Relay a écrit :
> > [Vous ne recevez pas souvent de courriers de
> > devnull+j.ne.posteo@kernel.org. Découvrez pourquoi ceci est important à
> > https://aka.ms/LearnAboutSende
On Tue, Jan 07, 2025 at 02:43:01PM -0800, Yury Norov wrote:
> On Tue, Jan 07, 2025 at 04:37:17PM -0600, Nick Child wrote:
> > On Sat, Dec 28, 2024 at 10:49:35AM -0800, Yury Norov wrote:
> > > A loop based on cpumask_next_wrap() opencodes the dedicated macro
> > > for_each_online_cpu_wrap(). Using t
Similar to syscall_set_arguments() that complements
syscall_get_arguments(), introduce syscall_set_nr()
that complements syscall_get_nr().
syscall_set_nr() is going to be needed along with
syscall_set_arguments() on all HAVE_ARCH_TRACEHOOK
architectures to implement PTRACE_SET_SYSCALL_INFO API.
S
syscall_set_arguments() is going to be needed to implement
PTRACE_SET_SYSCALL_INFO API.
This is a partial revert: on a few architectures syscall_set_arguments()
implementations were buggy, so instead of adding them here and applying
fixes on top, cleaner implementations are coming in follow-up com
On Mon, Jan 06, 2025 at 02:55:22PM +0100, Christophe Leroy wrote:
> Le 02/01/2025 à 19:31, J. Neuschäfer via B4 Relay a écrit :
> > [Vous ne recevez pas souvent de courriers de
> > devnull+j.ne.posteo@kernel.org. Découvrez pourquoi ceci est important à
> > https://aka.ms/LearnAboutSenderIdent
PTRACE_SET_SYSCALL_INFO is a generic ptrace API that complements
PTRACE_GET_SYSCALL_INFO by letting the ptracer modify details of
system calls the tracee is blocked in.
This API allows ptracers to obtain and modify system call details
in a straightforward and architecture-agnostic way.
Current im
On 06.01.25 03:07, Alistair Popple wrote:
On Fri, Dec 20, 2024 at 08:06:48PM +0100, David Hildenbrand wrote:
On 20.12.24 20:01, David Hildenbrand wrote:
On 17.12.24 06:12, Alistair Popple wrote:
In preparation for using insert_page() for DAX, enhance
insert_page_into_pte_locked() to handle est
On 07.01.25 04:42, Alistair Popple wrote:
The rmap doesn't currently support adding a PUD mapping of a
folio. This patch adds support for entire PUD mappings of folios,
primarily to allow for more standard refcounting of device DAX
folios. Currently DAX is the only user of this and it doesn't req
Le 06/01/2025 à 21:05, Ian Rogers a écrit :
On Mon, Jan 6, 2025 at 11:38 AM Christophe Leroy
wrote:
Building perf with EXTRA_CFLAGS="-DMAX_NR_CPUS=1" fails:
CC /home/chleroy/linux-powerpc/tools/perf/libperf/cpumap.o
cpumap.c:16: error: "MAX_NR_CPUS" redefined [-Wer
On Mon, 6 Jan 2025 13:47:50 -0600
Shawn Anastasio wrote:
> Hi all,
>
> Just wanted to check in and let the community know that Raptor
> Engineering will be officially dedicating development resources towards
> maintaining, developing, and testing the existing Linux KVM facilities
> for PowerNV m
On 2025/1/7 17:57, Kevin Brodsky wrote:
On 06/01/2025 04:49, Qi Zheng wrote:
[...]
Once this is done, we should be able to replace all those confusing
calls to tlb_remove_page() on PTPs with tlb_remove_table() and remove
the explicit call to pagetable_dtor(). AIUI this is essentially what
P
On (24/12/20 18:41), Sebastian Andrzej Siewior wrote:
> dereference_symbol_descriptor() needs to obtain the module pointer
> belonging to pointer in order to resolve that pointer.
> The returned mod pointer is obtained under RCU-sched/ preempt_disable()
> guarantees and needs to be used within this
On 12/16/24 12:45 PM, Kajol Jain wrote:
> The pseries Shared Processor Logical Partition(SPLPAR) machines
> can retrieve a log of dispatch and preempt events from the
> hypervisor using data from Disptach Trace Log(DTL) buffer.
> With this information, user can retrieve when and why each dispatc
On 06/01/2025 14:23, Qi Zheng wrote:
> On 2025/1/6 20:36, Alexander Gordeev wrote:
>> On Mon, Jan 06, 2025 at 06:55:58PM +0800, Qi Zheng wrote:
> +static inline void pagetable_dtor(struct ptdesc *ptdesc)
> +{
> + struct folio *folio = ptdesc_folio(ptdesc);
> +
> + ptlock_f
On 06/01/2025 04:49, Qi Zheng wrote:
> [...]
>
>> Once this is done, we should be able to replace all those confusing
>> calls to tlb_remove_page() on PTPs with tlb_remove_table() and remove
>> the explicit call to pagetable_dtor(). AIUI this is essentially what
>> Peter suggested on v3 [2].
>
> Si
On 2025/1/7 19:58, Kevin Brodsky wrote:
On 07/01/2025 11:51, Qi Zheng wrote:
[...]
Author: Qi Zheng
Date: Fri Dec 13 17:13:48 2024 +0800
mm: pgtable: completely move pagetable_dtor() to generic
tlb_remove_table()
For the generic tlb_remove_table(), it is implemented in the
fol
On 2025/1/7 20:32, Andreas Larsson wrote:
On 2024-12-30 10:07, Qi Zheng wrote:
diff --git a/arch/sparc/include/asm/tlb_32.h b/arch/sparc/include/asm/tlb_32.h
index 5cd28a8793e39..910254867dfbd 100644
--- a/arch/sparc/include/asm/tlb_32.h
+++ b/arch/sparc/include/asm/tlb_32.h
@@ -2,6 +2,7 @@
On 2024-12-30 10:07, Qi Zheng wrote:
> diff --git a/arch/sparc/include/asm/tlb_32.h b/arch/sparc/include/asm/tlb_32.h
> index 5cd28a8793e39..910254867dfbd 100644
> --- a/arch/sparc/include/asm/tlb_32.h
> +++ b/arch/sparc/include/asm/tlb_32.h
> @@ -2,6 +2,7 @@
> #ifndef _SPARC_TLB_H
> #define _SPA
elf.h had a comment saying:
> Notes used in ET_CORE. Architectures export some of the arch register
> sets using the corresponding note types via the PTRACE_GETREGSET and
> PTRACE_SETREGSET requests.
> The note name for these types is "LINUX", except NT_PRFPREG that is
> named "CORE".
However, NT_
Use note name macros to match with the userspace's expectation.
Signed-off-by: Akihiko Odaki
Acked-by: Baoquan He
---
fs/binfmt_elf.c | 21 ++---
fs/binfmt_elf_fdpic.c | 8
2 files changed, 14 insertions(+), 15 deletions(-)
diff --git a/fs/binfmt_elf.c b/fs/binf
elf.h had a comment saying:
> Notes used in ET_CORE. Architectures export some of the arch register
> sets using the corresponding note types via the PTRACE_GETREGSET and
> PTRACE_SETREGSET requests.
> The note name for these types is "LINUX", except NT_PRFPREG that is
> named "CORE".
However, NT_
Use note name macros to match with the userspace's expectation.
Signed-off-by: Akihiko Odaki
Acked-by: Baoquan He
---
fs/proc/kcore.c | 12 ++--
include/linux/vmcore_info.h | 2 +-
kernel/crash_core.c | 2 +-
3 files changed, 8 insertions(+), 8 deletions(-)
diff -
KEXEC_CORE_NOTE_NAME is no longer used.
Signed-off-by: Akihiko Odaki
Acked-by: Baoquan He
---
include/linux/kexec.h | 2 --
include/linux/vmcore_info.h | 1 -
2 files changed, 3 deletions(-)
diff --git a/include/linux/kexec.h b/include/linux/kexec.h
index f0e9f8eda7a3..c840431eadda 10064
Use note name macros to match with the userspace's expectation.
Signed-off-by: Akihiko Odaki
---
arch/s390/kernel/crash_dump.c | 62 ---
1 file changed, 23 insertions(+), 39 deletions(-)
diff --git a/arch/s390/kernel/crash_dump.c b/arch/s390/kernel/crash_
On Tue, 7 Jan 2025 14:42:16 +1100 Alistair Popple wrote:
> Device and FS DAX pages have always maintained their own page
> reference counts without following the normal rules for page reference
> counting. In particular pages are considered free when the refcount
> hits one rather than zero and
Hi Alistair,
kernel test robot noticed the following build warnings:
[auto build test WARNING on e25c8d66f6786300b680866c0e0139981273feba]
url:
https://github.com/intel-lab-lkp/linux/commits/Alistair-Popple/fuse-Fix-dax-truncate-punch_hole-fault-path/20250107-114726
base
On 2025/01/08 1:17, Dave Martin wrote:
Hi,
On Tue, Jan 07, 2025 at 09:45:56PM +0900, Akihiko Odaki wrote:
Use note name macros to match with the userspace's expectation.
Signed-off-by: Akihiko Odaki
---
arch/s390/kernel/crash_dump.c | 62 ---
1 file
On 2025/01/08 1:18, Dave Martin wrote:
On Tue, Jan 07, 2025 at 09:45:53PM +0900, Akihiko Odaki wrote:
Use note name macros to match with the userspace's expectation.
Also (and more importantly) get rid of duplicated knowledge about the
mapping of note types to note names, so that elf.h is the
Le 07/01/2025 à 23:45, J. Neuschäfer a écrit :
[Vous ne recevez pas souvent de courriers de j...@posteo.net. Découvrez
pourquoi ceci est important à https://aka.ms/LearnAboutSenderIdentification ]
On Mon, Jan 06, 2025 at 02:50:31PM +0100, Christophe Leroy wrote:
Le 02/01/2025 à 19:31, J.
Changes in v5:
- cancel the move of p4d_free_tlb()'s location in [PATCH v4 06/15]
(Alexander Gordeev)
- fix the missing pagetable_dtor() in [PATCH v4 08/15] (Kevin Brodsky)
- change the subject and description in [PATCH v4 12/15]
(Alexander Gordeev)
- remove the redundant __HAVE_ARCH_TLB_
This reverts commit 2f3443770437e49abc39af26962d293851cbab6d.
Signed-off-by: Qi Zheng
Reviewed-by: Kevin Brodsky
---
include/linux/mm.h | 2 +-
include/linux/mm_types.h | 9 +
mm/memory.c | 22 ++
3 files changed, 8 insertions(+), 25 deletions(-)
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
Like other levels of page tables, add statistics for P4D level page table.
Signed-off-by: Qi Zheng
Originally-by: Peter Zijlstra (Intel)
Reviewed-by: Kevin Brodsky
---
arch/riscv/include/asm/pgalloc.h | 6 +-
arch/x86/mm/pgtable.c| 3 +++
include/asm-generic/pgalloc.h| 2
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
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
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)
Reviewed-by: Kevin Brodsky
Cc: linux-arm-ker...@lists.infradead.org
---
arch/arm64/include/asm/pgalloc.h | 1 -
arch/arm64/include/asm/tl
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)
Reviewed-by: Kevin Brodsky
Cc: linux-s...@vger.kernel.org
---
arch/s390/include/asm/pgalloc.h | 29 +
arch/s390/include/as
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
Convert __tlb_remove_table() to use struct ptdesc, which will help to move
pagetable_dtor() to __tlb_remove_table().
And page tables shouldn't have swap cache, so use pagetable_free() instead
of free_page_and_swap_cache() to free page table pages.
Signed-off-by: Qi Zheng
---
arch/x86/include/as
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
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
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.
Signed-off-by: Qi Zheng
Sug
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
For the generic tlb_remove_table(), it is implemented in the following two
forms:
1) CONFIG_MMU_GATHER_TABLE_FREE is enabled
tlb_remove_table
--> generic __tlb_remove_table()
2) CONFIG_MMU_GATHER_TABLE_FREE is disabled
tlb_remove_table
--> tlb_remove_page
For case 1), the pagetable_dtor() has
Call pagetable_dtor() for PMD|PUD|P4D tables just before ptdesc is
freed - same as it is done for PTE tables. That allows consolidating
TLB free paths for all table types.
Signed-off-by: Qi Zheng
Suggested-by: Peter Zijlstra (Intel)
Reviewed-by: Kevin Brodsky
Cc: linux-s...@vger.kernel.org
---
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
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
Reviewed-by: Kevin Brodsky
---
arch/x86/include/asm/tlb.h | 19 ---
mm/mmu_gather.c| 20 ++--
2 files changed,
62 matches
Mail list logo