Skip to content

Commit a0ab7e5

Browse files
committed
Revert "arm64: Change elfcore for_each_mte_vma() to use VMA iterator"
This reverts commit 3a4f7ef. Revert this temporary bodge. It only existed to ease integration with the maple tree work for the 5.18 merge window and that doesn't appear to have landed in any case. Signed-off-by: Will Deacon <will@kernel.org>
1 parent 3123109 commit a0ab7e5

File tree

1 file changed

+6
-17
lines changed

1 file changed

+6
-17
lines changed

arch/arm64/kernel/elfcore.c

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,9 @@
88
#include <asm/cpufeature.h>
99
#include <asm/mte.h>
1010

11-
#ifndef VMA_ITERATOR
12-
#define VMA_ITERATOR(name, mm, addr) \
13-
struct mm_struct *name = mm
14-
#define for_each_vma(vmi, vma) \
15-
for (vma = vmi->mmap; vma; vma = vma->vm_next)
16-
#endif
17-
18-
#define for_each_mte_vma(vmi, vma) \
11+
#define for_each_mte_vma(tsk, vma) \
1912
if (system_supports_mte()) \
20-
for_each_vma(vmi, vma) \
13+
for (vma = tsk->mm->mmap; vma; vma = vma->vm_next) \
2114
if (vma->vm_flags & VM_MTE)
2215

2316
static unsigned long mte_vma_tag_dump_size(struct vm_area_struct *vma)
@@ -72,9 +65,8 @@ Elf_Half elf_core_extra_phdrs(void)
7265
{
7366
struct vm_area_struct *vma;
7467
int vma_count = 0;
75-
VMA_ITERATOR(vmi, current->mm, 0);
7668

77-
for_each_mte_vma(vmi, vma)
69+
for_each_mte_vma(current, vma)
7870
vma_count++;
7971

8072
return vma_count;
@@ -83,9 +75,8 @@ Elf_Half elf_core_extra_phdrs(void)
8375
int elf_core_write_extra_phdrs(struct coredump_params *cprm, loff_t offset)
8476
{
8577
struct vm_area_struct *vma;
86-
VMA_ITERATOR(vmi, current->mm, 0);
8778

88-
for_each_mte_vma(vmi, vma) {
79+
for_each_mte_vma(current, vma) {
8980
struct elf_phdr phdr;
9081

9182
phdr.p_type = PT_ARM_MEMTAG_MTE;
@@ -109,9 +100,8 @@ size_t elf_core_extra_data_size(void)
109100
{
110101
struct vm_area_struct *vma;
111102
size_t data_size = 0;
112-
VMA_ITERATOR(vmi, current->mm, 0);
113103

114-
for_each_mte_vma(vmi, vma)
104+
for_each_mte_vma(current, vma)
115105
data_size += mte_vma_tag_dump_size(vma);
116106

117107
return data_size;
@@ -120,9 +110,8 @@ size_t elf_core_extra_data_size(void)
120110
int elf_core_write_extra_data(struct coredump_params *cprm)
121111
{
122112
struct vm_area_struct *vma;
123-
VMA_ITERATOR(vmi, current->mm, 0);
124113

125-
for_each_mte_vma(vmi, vma) {
114+
for_each_mte_vma(current, vma) {
126115
if (vma->vm_flags & VM_DONTDUMP)
127116
continue;
128117

0 commit comments

Comments
 (0)