Message ID | 20240910105004.706981-1-joey.gouly@arm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v1] arm64: pkeys: remove redundant WARN | expand |
On Tue, 10 Sep 2024 11:50:04 +0100, Joey Gouly wrote: > FEAT_PAN3 is present if FEAT_S1POE is, this WARN() was to represent that. > However execute_only_pkey() is always called by mmap(), even on a CPU without > POE support. > > Rather than making the WARN() conditional, just delete it. > > > [...] Applied to arm64 (arm64-shared-6.12), thanks! [1/1] arm64: pkeys: remove redundant WARN https://git.kernel.org/arm64/c/10166c23f413 Cheers,
diff --git a/arch/arm64/include/asm/pkeys.h b/arch/arm64/include/asm/pkeys.h index 19eb1b12b7fc..0ca5f83ce148 100644 --- a/arch/arm64/include/asm/pkeys.h +++ b/arch/arm64/include/asm/pkeys.h @@ -37,8 +37,6 @@ static inline int arch_override_mprotect_pkey(struct vm_area_struct *vma, static inline int execute_only_pkey(struct mm_struct *mm) { // Execute-only mappings are handled by EPAN/FEAT_PAN3. - WARN_ON_ONCE(!cpus_have_final_cap(ARM64_HAS_EPAN)); - return -1; }
FEAT_PAN3 is present if FEAT_S1POE is, this WARN() was to represent that. However execute_only_pkey() is always called by mmap(), even on a CPU without POE support. Rather than making the WARN() conditional, just delete it. Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org> Link: https://lore.kernel.org/linux-arm-kernel/CA+G9fYvarKEPN3u1Ogw2pcw4h6r3OMzg+5qJpYkAXRunAEF_0Q@mail.gmail.com/ Signed-off-by: Joey Gouly <joey.gouly@arm.com> Cc: Will Deacon <will@kernel.org> Cc: Catalin Marinas <catalin.marinas@arm.com> --- arch/arm64/include/asm/pkeys.h | 2 -- 1 file changed, 2 deletions(-)