mm-commits.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* + arm64-remove-mmap-linked-list-from-vdso-fix.patch added to -mm tree
@ 2022-04-19 19:41 Andrew Morton
  2022-04-19 20:30 ` Liam Howlett
  0 siblings, 1 reply; 2+ messages in thread
From: Andrew Morton @ 2022-04-19 19:41 UTC (permalink / raw)
  To: mm-commits, will, Liam.Howlett, catalin.marinas, liam.howlett, akpm


The patch titled
     Subject: arm64: change elfcore for_each_mte_vma() to use VMA iterator
has been added to the -mm tree.  Its filename is
     arm64-remove-mmap-linked-list-from-vdso-fix.patch

This patch should soon appear at
    https://ozlabs.org/~akpm/mmots/broken-out/arm64-remove-mmap-linked-list-from-vdso-fix.patch
and later at
    https://ozlabs.org/~akpm/mmotm/broken-out/arm64-remove-mmap-linked-list-from-vdso-fix.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Liam Howlett <liam.howlett@oracle.com>
Subject: arm64: change elfcore for_each_mte_vma() to use VMA iterator

Rework for_each_mte_vma() to use a VMA iterator instead of an explicit
linked-list.

Link: https://lore.kernel.org/r/20220218023650.672072-1-Liam.Howlett@oracle.com
Link: https://lkml.kernel.org/r/20220419192157.2jn6olj7lg6jvo5e@revolver
Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Signed-off-by: Will Deacon <will@kernel.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 arch/arm64/kernel/elfcore.c |   16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

--- a/arch/arm64/kernel/elfcore.c~arm64-remove-mmap-linked-list-from-vdso-fix
+++ a/arch/arm64/kernel/elfcore.c
@@ -8,9 +8,9 @@
 #include <asm/cpufeature.h>
 #include <asm/mte.h>
 
-#define for_each_mte_vma(tsk, vma)					\
+#define for_each_mte_vma(vmi, vma)					\
 	if (system_supports_mte())					\
-		for (vma = tsk->mm->mmap; vma; vma = vma->vm_next)	\
+		for_each_vma(vmi, vma)					\
 			if (vma->vm_flags & VM_MTE)
 
 static unsigned long mte_vma_tag_dump_size(struct vm_area_struct *vma)
@@ -81,8 +81,9 @@ Elf_Half elf_core_extra_phdrs(void)
 {
 	struct vm_area_struct *vma;
 	int vma_count = 0;
+	VMA_ITERATOR(vmi, current->mm, 0);
 
-	for_each_mte_vma(current, vma)
+	for_each_mte_vma(vmi, vma)
 		vma_count++;
 
 	return vma_count;
@@ -91,8 +92,9 @@ Elf_Half elf_core_extra_phdrs(void)
 int elf_core_write_extra_phdrs(struct coredump_params *cprm, loff_t offset)
 {
 	struct vm_area_struct *vma;
+	VMA_ITERATOR(vmi, current->mm, 0);
 
-	for_each_mte_vma(current, vma) {
+	for_each_mte_vma(vmi, vma) {
 		struct elf_phdr phdr;
 
 		phdr.p_type = PT_ARM_MEMTAG_MTE;
@@ -116,8 +118,9 @@ size_t elf_core_extra_data_size(void)
 {
 	struct vm_area_struct *vma;
 	size_t data_size = 0;
+	VMA_ITERATOR(vmi, current->mm, 0);
 
-	for_each_mte_vma(current, vma)
+	for_each_mte_vma(vmi, vma)
 		data_size += mte_vma_tag_dump_size(vma);
 
 	return data_size;
@@ -126,8 +129,9 @@ size_t elf_core_extra_data_size(void)
 int elf_core_write_extra_data(struct coredump_params *cprm)
 {
 	struct vm_area_struct *vma;
+	VMA_ITERATOR(vmi, current->mm, 0);
 
-	for_each_mte_vma(current, vma) {
+	for_each_mte_vma(vmi, vma) {
 		if (vma->vm_flags & VM_DONTDUMP)
 			continue;
 
_

Patches currently in -mm which might be from liam.howlett@oracle.com are

radix-tree-test-suite-add-lockdep_is_held-to-header.patch
mips-rename-mt_init-to-mips_mt_init.patch
maple-tree-add-new-data-structure-fix.patch
lib-test_maple_tree-add-testing-for-maple-tree.patch
mmap-change-zeroing-of-maple-tree-in-__vma_adjust.patch
arm64-remove-mmap-linked-list-from-vdso-fix.patch
riscv-use-vma-iterator-for-vdso.patch
mm-mmapc-pass-in-mapping-to-__vma_link_file.patch
mglru-vs-maple-tree-fix.patch


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: + arm64-remove-mmap-linked-list-from-vdso-fix.patch added to -mm tree
  2022-04-19 19:41 + arm64-remove-mmap-linked-list-from-vdso-fix.patch added to -mm tree Andrew Morton
@ 2022-04-19 20:30 ` Liam Howlett
  0 siblings, 0 replies; 2+ messages in thread
From: Liam Howlett @ 2022-04-19 20:30 UTC (permalink / raw)
  To: Andrew Morton; +Cc: mm-commits, will, catalin.marinas


Can you please keep this as its own patch?  Although both are linked
list removal from arm64, it's probably best to keep them as two logical
blocks changing different areas.

Thanks,
Liam

* Andrew Morton <akpm@linux-foundation.org> [220419 15:41]:
> 
> The patch titled
>      Subject: arm64: change elfcore for_each_mte_vma() to use VMA iterator
> has been added to the -mm tree.  Its filename is
>      arm64-remove-mmap-linked-list-from-vdso-fix.patch
> 
> This patch should soon appear at
>     https://ozlabs.org/~akpm/mmots/broken-out/arm64-remove-mmap-linked-list-from-vdso-fix.patch
> and later at
>     https://ozlabs.org/~akpm/mmotm/broken-out/arm64-remove-mmap-linked-list-from-vdso-fix.patch
> 
> Before you just go and hit "reply", please:
>    a) Consider who else should be cc'ed
>    b) Prefer to cc a suitable mailing list as well
>    c) Ideally: find the original patch on the mailing list and do a
>       reply-to-all to that, adding suitable additional cc's
> 
> *** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
> 
> The -mm tree is included into linux-next and is updated
> there every 3-4 working days
> 
> ------------------------------------------------------
> From: Liam Howlett <liam.howlett@oracle.com>
> Subject: arm64: change elfcore for_each_mte_vma() to use VMA iterator
> 
> Rework for_each_mte_vma() to use a VMA iterator instead of an explicit
> linked-list.
> 
> Link: https://lore.kernel.org/r/20220218023650.672072-1-Liam.Howlett@oracle.com
> Link: https://lkml.kernel.org/r/20220419192157.2jn6olj7lg6jvo5e@revolver
> Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
> Signed-off-by: Will Deacon <will@kernel.org>
> Acked-by: Catalin Marinas <catalin.marinas@arm.com>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
> 
>  arch/arm64/kernel/elfcore.c |   16 ++++++++++------
>  1 file changed, 10 insertions(+), 6 deletions(-)
> 
> --- a/arch/arm64/kernel/elfcore.c~arm64-remove-mmap-linked-list-from-vdso-fix
> +++ a/arch/arm64/kernel/elfcore.c
> @@ -8,9 +8,9 @@
>  #include <asm/cpufeature.h>
>  #include <asm/mte.h>
>  
> -#define for_each_mte_vma(tsk, vma)					\
> +#define for_each_mte_vma(vmi, vma)					\
>  	if (system_supports_mte())					\
> -		for (vma = tsk->mm->mmap; vma; vma = vma->vm_next)	\
> +		for_each_vma(vmi, vma)					\
>  			if (vma->vm_flags & VM_MTE)
>  
>  static unsigned long mte_vma_tag_dump_size(struct vm_area_struct *vma)
> @@ -81,8 +81,9 @@ Elf_Half elf_core_extra_phdrs(void)
>  {
>  	struct vm_area_struct *vma;
>  	int vma_count = 0;
> +	VMA_ITERATOR(vmi, current->mm, 0);
>  
> -	for_each_mte_vma(current, vma)
> +	for_each_mte_vma(vmi, vma)
>  		vma_count++;
>  
>  	return vma_count;
> @@ -91,8 +92,9 @@ Elf_Half elf_core_extra_phdrs(void)
>  int elf_core_write_extra_phdrs(struct coredump_params *cprm, loff_t offset)
>  {
>  	struct vm_area_struct *vma;
> +	VMA_ITERATOR(vmi, current->mm, 0);
>  
> -	for_each_mte_vma(current, vma) {
> +	for_each_mte_vma(vmi, vma) {
>  		struct elf_phdr phdr;
>  
>  		phdr.p_type = PT_ARM_MEMTAG_MTE;
> @@ -116,8 +118,9 @@ size_t elf_core_extra_data_size(void)
>  {
>  	struct vm_area_struct *vma;
>  	size_t data_size = 0;
> +	VMA_ITERATOR(vmi, current->mm, 0);
>  
> -	for_each_mte_vma(current, vma)
> +	for_each_mte_vma(vmi, vma)
>  		data_size += mte_vma_tag_dump_size(vma);
>  
>  	return data_size;
> @@ -126,8 +129,9 @@ size_t elf_core_extra_data_size(void)
>  int elf_core_write_extra_data(struct coredump_params *cprm)
>  {
>  	struct vm_area_struct *vma;
> +	VMA_ITERATOR(vmi, current->mm, 0);
>  
> -	for_each_mte_vma(current, vma) {
> +	for_each_mte_vma(vmi, vma) {
>  		if (vma->vm_flags & VM_DONTDUMP)
>  			continue;
>  
> _
> 
> Patches currently in -mm which might be from liam.howlett@oracle.com are
> 
> radix-tree-test-suite-add-lockdep_is_held-to-header.patch
> mips-rename-mt_init-to-mips_mt_init.patch
> maple-tree-add-new-data-structure-fix.patch
> lib-test_maple_tree-add-testing-for-maple-tree.patch
> mmap-change-zeroing-of-maple-tree-in-__vma_adjust.patch
> arm64-remove-mmap-linked-list-from-vdso-fix.patch
> riscv-use-vma-iterator-for-vdso.patch
> mm-mmapc-pass-in-mapping-to-__vma_link_file.patch
> mglru-vs-maple-tree-fix.patch
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-04-19 20:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-19 19:41 + arm64-remove-mmap-linked-list-from-vdso-fix.patch added to -mm tree Andrew Morton
2022-04-19 20:30 ` Liam Howlett

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).