[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220126173011.3476262-13-ardb@kernel.org>
Date: Wed, 26 Jan 2022 18:30:11 +0100
From: Ard Biesheuvel <ardb@...nel.org>
To: linux-arm-kernel@...ts.infradead.org
Cc: kvmarm@...ts.cs.columbia.edu, linux-hardening@...r.kernel.org,
Ard Biesheuvel <ardb@...nel.org>,
Will Deacon <will@...nel.org>, Marc Zyngier <maz@...nel.org>,
Fuad Tabba <tabba@...gle.com>,
Quentin Perret <qperret@...gle.com>,
Mark Rutland <mark.rutland@....com>,
James Morse <james.morse@....com>,
Catalin Marinas <catalin.marinas@....com>
Subject: [RFC PATCH 12/12] arm64: hugetlb: use set_pte_at() not set_pte() to provide mm pointer
Switch to set_pte_at() so we can provide the mm pointer to the code that
performs the page table update.
Signed-off-by: Ard Biesheuvel <ardb@...nel.org>
---
arch/arm64/mm/hugetlbpage.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/mm/hugetlbpage.c b/arch/arm64/mm/hugetlbpage.c
index ffb9c229610a..099b28b00f4c 100644
--- a/arch/arm64/mm/hugetlbpage.c
+++ b/arch/arm64/mm/hugetlbpage.c
@@ -252,8 +252,8 @@ void set_huge_swap_pte_at(struct mm_struct *mm, unsigned long addr,
ncontig = num_contig_ptes(sz, &pgsize);
- for (i = 0; i < ncontig; i++, ptep++)
- set_pte(ptep, pte);
+ for (i = 0; i < ncontig; i++, ptep++, addr += pgsize)
+ set_pte_at(mm, addr, ptep, pte);
}
pte_t *huge_pte_alloc(struct mm_struct *mm, struct vm_area_struct *vma,
--
2.30.2
Powered by blists - more mailing lists