All of lore.kernel.org
 help / color / mirror / Atom feed
* linux-next: build failure after merge of the maple tree
@ 2022-02-23  0:45 broonie
  2022-02-23  2:32 ` Liam Howlett
  0 siblings, 1 reply; 16+ messages in thread
From: broonie @ 2022-02-23  0:45 UTC (permalink / raw)
  To: Liam Howlett
  Cc: Linux Kernel Mailing List, Linux Next Mailing List,
	Catalin Marinas, Will Deacon

Hi all,

After merging the maple tree, today's linux-next build (KCONFIG_NAME)
failed like this:

/tmp/next/build/arch/arm64/kernel/elfcore.c: In function 'elf_core_extra_phdrs':
/tmp/next/build/arch/arm64/kernel/elfcore.c:13:21: error: 'struct mm_struct' has no member named 'mmap'
   13 |   for (vma = tsk->mm->mmap; vma; vma = vma->vm_next) \
      |                     ^~
/tmp/next/build/arch/arm64/kernel/elfcore.c:69:2: note: in expansion of macro 'for_each_mte_vma'
   69 |  for_each_mte_vma(current, vma)
      |  ^~~~~~~~~~~~~~~~
/tmp/next/build/arch/arm64/kernel/elfcore.c:13:43: error: 'struct vm_area_struct' has no member named 'vm_next'
   13 |   for (vma = tsk->mm->mmap; vma; vma = vma->vm_next) \
      |                                           ^~
/tmp/next/build/arch/arm64/kernel/elfcore.c:69:2: note: in expansion of macro 'for_each_mte_vma'
   69 |  for_each_mte_vma(current, vma)
      |  ^~~~~~~~~~~~~~~~
/tmp/next/build/arch/arm64/kernel/elfcore.c: In function 'elf_core_write_extra_phdrs':
/tmp/next/build/arch/arm64/kernel/elfcore.c:13:21: error: 'struct mm_struct' has no member named 'mmap'
   13 |   for (vma = tsk->mm->mmap; vma; vma = vma->vm_next) \
      |                     ^~
/tmp/next/build/arch/arm64/kernel/elfcore.c:79:2: note: in expansion of macro 'for_each_mte_vma'
   79 |  for_each_mte_vma(current, vma) {
      |  ^~~~~~~~~~~~~~~~
/tmp/next/build/arch/arm64/kernel/elfcore.c:13:43: error: 'struct vm_area_struct' has no member named 'vm_next'
   13 |   for (vma = tsk->mm->mmap; vma; vma = vma->vm_next) \
      |                                           ^~
/tmp/next/build/arch/arm64/kernel/elfcore.c:79:2: note: in expansion of macro 'for_each_mte_vma'
   79 |  for_each_mte_vma(current, vma) {
      |  ^~~~~~~~~~~~~~~~
/tmp/next/build/arch/arm64/kernel/elfcore.c: In function 'elf_core_extra_data_size':
/tmp/next/build/arch/arm64/kernel/elfcore.c:13:21: error: 'struct mm_struct' has no member named 'mmap'
   13 |   for (vma = tsk->mm->mmap; vma; vma = vma->vm_next) \
      |                     ^~
/tmp/next/build/arch/arm64/kernel/elfcore.c:104:2: note: in expansion of macro 'for_each_mte_vma'
  104 |  for_each_mte_vma(current, vma)
      |  ^~~~~~~~~~~~~~~~
/tmp/next/build/arch/arm64/kernel/elfcore.c:13:43: error: 'struct vm_area_struct' has no member named 'vm_next'
   13 |   for (vma = tsk->mm->mmap; vma; vma = vma->vm_next) \
      |                                           ^~
/tmp/next/build/arch/arm64/kernel/elfcore.c:104:2: note: in expansion of macro 'for_each_mte_vma'
  104 |  for_each_mte_vma(current, vma)
      |  ^~~~~~~~~~~~~~~~
/tmp/next/build/arch/arm64/kernel/elfcore.c: In function 'elf_core_write_extra_data':
/tmp/next/build/arch/arm64/kernel/elfcore.c:13:21: error: 'struct mm_struct' has no member named 'mmap'
   13 |   for (vma = tsk->mm->mmap; vma; vma = vma->vm_next) \
      |                     ^~
/tmp/next/build/arch/arm64/kernel/elfcore.c:114:2: note: in expansion of macro 'for_each_mte_vma'
  114 |  for_each_mte_vma(current, vma) {
      |  ^~~~~~~~~~~~~~~~
/tmp/next/build/arch/arm64/kernel/elfcore.c:13:43: error: 'struct vm_area_struct' has no member named 'vm_next'
   13 |   for (vma = tsk->mm->mmap; vma; vma = vma->vm_next) \
      |                                           ^~
/tmp/next/build/arch/arm64/kernel/elfcore.c:114:2: note: in expansion of macro 'for_each_mte_vma'
  114 |  for_each_mte_vma(current, vma) {
      |  ^~~~~~~~~~~~~~~~

I did not identify the commit which triggered this. I have used the
maple tree from 20220217 instead.

^ permalink raw reply	[flat|nested] 16+ messages in thread
* Re: linux-next: build failure after merge of the maple tree
@ 2022-02-18  1:46 Liam Howlett
  2022-02-18  2:37 ` [PATCH] arm64: Change elfcore for_each_mte_vma() to use VMA iterator Liam Howlett
  0 siblings, 1 reply; 16+ messages in thread
From: Liam Howlett @ 2022-02-18  1:46 UTC (permalink / raw)
  To: Will Deacon
  Cc: Stephen Rothwell, Catalin Marinas, Linux Kernel Mailing List,
	Linux Next Mailing List

* Will Deacon <will@kernel.org> [220217 14:24]:
> On Thu, Feb 17, 2022 at 07:18:57PM +1100, Stephen Rothwell wrote:
> > Hi all,
> > 
> > After merging the maple tree, today's linux-next build (arm64 defconfig)
> > failed like this:
> > 
> > arch/arm64/kernel/elfcore.c: In function 'elf_core_extra_phdrs':
> > arch/arm64/kernel/elfcore.c:13:35: error: 'struct mm_struct' has no member named 'mmap'
> >    13 |                 for (vma = tsk->mm->mmap; vma; vma = vma->vm_next)      \
> >       |                                   ^~
> > arch/arm64/kernel/elfcore.c:69:9: note: in expansion of macro 'for_each_mte_vma'
> >    69 |         for_each_mte_vma(current, vma)
> >       |         ^~~~~~~~~~~~~~~~
> > arch/arm64/kernel/elfcore.c:13:57: error: 'struct vm_area_struct' has no member named 'vm_next'
> >    13 |                 for (vma = tsk->mm->mmap; vma; vma = vma->vm_next)      \
> >       |                                                         ^~
> > arch/arm64/kernel/elfcore.c:69:9: note: in expansion of macro 'for_each_mte_vma'
> >    69 |         for_each_mte_vma(current, vma)
> >       |         ^~~~~~~~~~~~~~~~
> > arch/arm64/kernel/elfcore.c: In function 'elf_core_write_extra_phdrs':
> > arch/arm64/kernel/elfcore.c:13:35: error: 'struct mm_struct' has no member named 'mmap'
> >    13 |                 for (vma = tsk->mm->mmap; vma; vma = vma->vm_next)      \
> >       |                                   ^~
> > arch/arm64/kernel/elfcore.c:79:9: note: in expansion of macro 'for_each_mte_vma'
> >    79 |         for_each_mte_vma(current, vma) {
> >       |         ^~~~~~~~~~~~~~~~
> > arch/arm64/kernel/elfcore.c:13:57: error: 'struct vm_area_struct' has no member named 'vm_next'
> >    13 |                 for (vma = tsk->mm->mmap; vma; vma = vma->vm_next)      \
> >       |                                                         ^~
> > arch/arm64/kernel/elfcore.c:79:9: note: in expansion of macro 'for_each_mte_vma'
> >    79 |         for_each_mte_vma(current, vma) {
> >       |         ^~~~~~~~~~~~~~~~
> > arch/arm64/kernel/elfcore.c: In function 'elf_core_extra_data_size':
> > arch/arm64/kernel/elfcore.c:13:35: error: 'struct mm_struct' has no member named 'mmap'
> >    13 |                 for (vma = tsk->mm->mmap; vma; vma = vma->vm_next)      \
> >       |                                   ^~
> > arch/arm64/kernel/elfcore.c:104:9: note: in expansion of macro 'for_each_mte_vma'
> >   104 |         for_each_mte_vma(current, vma)
> >       |         ^~~~~~~~~~~~~~~~
> > arch/arm64/kernel/elfcore.c:13:57: error: 'struct vm_area_struct' has no member named 'vm_next'
> >    13 |                 for (vma = tsk->mm->mmap; vma; vma = vma->vm_next)      \
> >       |                                                         ^~
> > arch/arm64/kernel/elfcore.c:104:9: note: in expansion of macro 'for_each_mte_vma'
> >   104 |         for_each_mte_vma(current, vma)
> >       |         ^~~~~~~~~~~~~~~~
> > arch/arm64/kernel/elfcore.c: In function 'elf_core_write_extra_data':
> > arch/arm64/kernel/elfcore.c:13:35: error: 'struct mm_struct' has no member named 'mmap'
> >    13 |                 for (vma = tsk->mm->mmap; vma; vma = vma->vm_next)      \
> >       |                                   ^~
> > arch/arm64/kernel/elfcore.c:114:9: note: in expansion of macro 'for_each_mte_vma'
> >   114 |         for_each_mte_vma(current, vma) {
> >       |         ^~~~~~~~~~~~~~~~
> > arch/arm64/kernel/elfcore.c:13:57: error: 'struct vm_area_struct' has no member named 'vm_next'
> >    13 |                 for (vma = tsk->mm->mmap; vma; vma = vma->vm_next)      \
> >       |                                                         ^~
> > arch/arm64/kernel/elfcore.c:114:9: note: in expansion of macro 'for_each_mte_vma'
> >   114 |         for_each_mte_vma(current, vma) {
> >       |         ^~~~~~~~~~~~~~~~
> > 
> > Caused by commit
> > 
> >   b09e8361a4c3 ("mm: Remove the vma linked list")
> > 
> > interacting with commit
> > 
> >   6dd8b1a0b6cb ("arm64: mte: Dump the MTE tags in the core file")
> > 
> > from the arm64 tree.
> 
> Yikes, this is quite a mess. Liam -- how would you like to resolve this?

The removal of the vma linked list means tsk->mm->mmap and vma->vm_next
are no longer usable.  for_each_mte_vma() could be altered to take a vma
iterator:

#define for_each_mte_vma(vmi, vma)					\
	if (system_supports_mte())					\
		for_each_vma(vmi, vma)					\
			if (vma->vm_flags & VM_MTE)


Then used as such:
 VMA_ITERATOR(vmi, tsk->mm, 0);
...

for_each_mte_vma(vmi, vma) {
...
}

Where might I find a branch containing this patch?  Is it a stand alone
or part of a larger series?

Liam

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

end of thread, other threads:[~2022-02-25 15:50 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-23  0:45 linux-next: build failure after merge of the maple tree broonie
2022-02-23  2:32 ` Liam Howlett
2022-02-23 12:47   ` [PATCH] arm64: Change elfcore for_each_mte_vma() to use VMA iterator kernel test robot
2022-02-23 13:08   ` kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2022-02-18  1:46 linux-next: build failure after merge of the maple tree Liam Howlett
2022-02-18  2:37 ` [PATCH] arm64: Change elfcore for_each_mte_vma() to use VMA iterator Liam Howlett
2022-02-21 18:06   ` Catalin Marinas
2022-02-22 14:26     ` Liam Howlett
2022-02-22 16:20       ` Will Deacon
2022-02-22 17:26         ` Catalin Marinas
2022-02-22 18:54           ` Liam Howlett
2022-02-23  9:39             ` Catalin Marinas
2022-02-23 13:57               ` Liam Howlett
2022-02-23 11:37             ` Catalin Marinas
2022-02-23 14:11               ` Liam Howlett
2022-02-24  2:00                 ` Liam Howlett
2022-02-25 15:50   ` Will Deacon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.