From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 19EFB30F957 for ; Sun, 17 May 2026 18:59:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779044354; cv=none; b=XGWSujQKT0wVRCLj/oxgqdTnhZPsQPuCH3SBoDCX1IesWt2cj10NHe1Np3ul49rp7BGmhl4nkktFJ511kXMQPsRjIP758aRQxgUreuusyHp99OHHmI4StXSAbjgea1n/iLKpAqylfGIagHTnOW+X/ehU+/z65AKFwB7vN/m2CCA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779044354; c=relaxed/simple; bh=TxClM2mdGfWD4Uq8Jpf0PPjMaqVPLXry0mgG8pyL1ZU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=GO1eRDCk/yTwHKW9Veo0bgwCqT+WoBMkazhgzhsC/9RMYiK/lV8u6zfxL2fQ5XwV32fTKXxzJCBkVAii6/UXDbu65LFv1XeHi+NTHsSxQ6TNDeX7Q9KmHV25nw2TtWHADZ5Wt2ovDYkCu1CtaxUuk9yJ/jt341GxJa5dv/4sk1Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=EhLEEUhu; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="EhLEEUhu" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5D8EDC2BCB0; Sun, 17 May 2026 18:59:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1779044353; bh=TxClM2mdGfWD4Uq8Jpf0PPjMaqVPLXry0mgG8pyL1ZU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=EhLEEUhu8ngvP04rcdO1wJ6msWZdfCnY5xxRLw/j/qz9RmVQey36HjQpIfxu/Nehk 44aoIxHUq3YL9Q1/FjhIR53EscyofY3edMGdLKzx4iSJTdnk2Td94s6P3VMXzkLpGP Wf6MIL7TvRBTcvlRAKzVSp5IqVoD97DGt7vgdx9WCppZa2PGwuLEs0nljOljWPwmsk wuApHQCHaO/eGv2m/snfRZ3E+3MOY9lCQTIXOvRKFrcbgtUUEBLKb5OaCwVbc/ZuXr ElqgLB9hZ0K8Bu1QWeTwQznvaCXcxXExxJONawuQuhelSSy303CUlmVDr4Es6VtZKH RYBOog/QFPn1Q== Date: Sun, 17 May 2026 21:59:05 +0300 From: Mike Rapoport To: Anshuman Khandual Cc: linux-arm-kernel@lists.infradead.org, Catalin Marinas , Will Deacon , Ryan Roberts , Mark Rutland , Lorenzo Stoakes , Andrew Morton , David Hildenbrand , Linu Cherian , Usama Arif , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [RFC V2 02/14] mm: Add read-write accessors for vm_page_prot Message-ID: References: <20260513044547.4128549-1-anshuman.khandual@arm.com> <20260513044547.4128549-3-anshuman.khandual@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260513044547.4128549-3-anshuman.khandual@arm.com> On Wed, May 13, 2026 at 10:15:35AM +0530, Anshuman Khandual wrote: > Currently vma->vm_page_prot is safely read from and written to, without any > locks with READ_ONCE() and WRITE_ONCE(). But with introduction of D128 page > tables on arm64 platform, vm_page_prot grows to 128 bits which can't safely > be handled with READ_ONCE() and WRITE_ONCE(). > > Add read and write accessors for vm_page_prot like pgprot_[read|write]() > which any platform can override when required, although still defaulting as > READ_ONCE() and WRITE_ONCE(), thus preserving the functionality for others. > > Cc: Andrew Morton > Cc: David Hildenbrand > Cc: Lorenzo Stoakes > Cc: Mike Rapoport > Cc: linux-mm@kvack.org > Cc: linux-kernel@vger.kernel.org > Signed-off-by: Anshuman Khandual Acked-by: Mike Rapoport (Microsoft) > --- > Changes in RFC V2: > > - Dropped _once from pgprot_[read|write]() callbacks per Mike > > include/linux/pgtable.h | 14 ++++++++++++++ > mm/huge_memory.c | 4 ++-- > mm/memory.c | 2 +- > mm/migrate.c | 2 +- > mm/mmap.c | 2 +- > 5 files changed, 19 insertions(+), 5 deletions(-) -- Sincerely yours, Mike.