[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220222142557.6oykxjz3j7fq4mrn@revolver>
Date: Tue, 22 Feb 2022 14:26:03 +0000
From: Liam Howlett <liam.howlett@...cle.com>
To: Catalin Marinas <catalin.marinas@....com>
CC: Will Deacon <will@...nel.org>,
Stephen Rothwell <sfr@...b.auug.org.au>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linux Next Mailing List <linux-next@...r.kernel.org>
Subject: Re: [PATCH] arm64: Change elfcore for_each_mte_vma() to use VMA
iterator
* Catalin Marinas <catalin.marinas@....com> [220221 13:07]:
> On Fri, Feb 18, 2022 at 02:37:04AM +0000, Liam Howlett wrote:
> > diff --git a/arch/arm64/kernel/elfcore.c b/arch/arm64/kernel/elfcore.c
> > index 3455ee4acc04..930a0bc4cac4 100644
> > --- a/arch/arm64/kernel/elfcore.c
> > +++ b/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)
> > @@ -65,8 +65,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++;
>
> I'm fine with the patch but it can't be applied to arm64 for-next/mte
> branch as it won't build and the maple tree doesn't have the MTE
> patches. Do you have a stable branch with the for_each_vma() iterator?
The vma iterator uses the maple tree, so this patch would resolve the
conflict but both branches are needed.
>
> Anyway, if you find a way to solve the problem, for this patch:
>
> Acked-by: Catalin Marinas <catalin.marinas@....com>
Powered by blists - more mailing lists