lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <173048223682.1108539.16990086073905192650.b4-ty@arm.com>
Date: Fri,  1 Nov 2024 17:35:37 +0000
From: Catalin Marinas <catalin.marinas@....com>
To: linux-arm-kernel@...ts.infradead.org,
	Anshuman Khandual <anshuman.khandual@....com>
Cc: Will Deacon <will@...nel.org>,
	Ard Biesheuvel <ardb@...nel.org>,
	Ryan Roberts <ryan.roberts@....com>,
	Mark Rutland <mark.rutland@....com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] arm64/mm: Re-organize arch_make_huge_pte()

On Tue, 29 Oct 2024 10:15:29 +0530, Anshuman Khandual wrote:
> Core HugeTLB defines a fallback definition for arch_make_huge_pte(), which
> calls platform provided pte_mkhuge(). But if any platform already provides
> an override for arch_make_huge_pte(), then it does not need to provide the
> helper pte_mkhuge().
> 
> arm64 override for arch_make_huge_pte() calls pte_mkhuge() internally, thus
> creating an impression, that both of these callbacks are being used in core
> HugeTLB and hence required to be defined. This drops off pte_mkhuge() which
> was never required to begin with as there could not be any section mappings
> at the PTE level. Re-organize arch_make_huge_pte() based on requested page
> size and create the entry for the applicable page table level as needed. It
> also removes a redundancy of clearing PTE_TABLE_BIT bit followed by setting
> both PTE_TABLE_BIT and PTE_VALID bits (via PTE_TYPE_MASK) in the pte, while
> creating CONT_PTE_SIZE size entries.
> 
> [...]

Applied to arm64 (for-next/misc), thanks!

[1/1] arm64/mm: Re-organize arch_make_huge_pte()
      https://git.kernel.org/arm64/c/f8192813dcbe

I think we can now get pte_mkcont() to only set PTE_CONT without
touching PTE_TYPE_PAGE. Previously it wasn't possible because
pte_mkhuge() was clearing the PTE_TABLE_BIT and we added it back via
pte_mkcont(). Give it a try and send an additional patch cleaning up
pte_mkcont() if this works. Thanks.

-- 
Catalin


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ