From patchwork Tue Sep 10 10:50:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joey Gouly X-Patchwork-Id: 13798331 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1DF5EEB64DE for ; Tue, 10 Sep 2024 10:51:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=ysf+GomX9cPAIS2J93tc2TAXONlwUSpkxsQcWEe1gYI=; b=a8H0bEhitQ5fQyrY2IUCdN21ma p8UHgsupWQGG0xCHFtx63CfpbpeRllfxuHdP36YLMzXm6E4jsRfQB8TKfm7QMnnjQi363qU+EMqUc zL7F4tgPOrRziaITADIcl61I48H32W7Z9iqCJFismhxdSoQ7AbNb+AuClT23sC4AZChdGLY3QkHAM OZfCWzYmcLWfgPvuYMn8Gs+cWolpB+cmQlLfTYEKEY2InxsI1KAcUXT33M1H6wnE09OS9Oy7oPfAt WDCU5ocBidX6KILqXVGu05XDMQKlFmivWXNHkErGWOBL8TjJu73t9/miXluhaqRDnzjKIKnnbMGdC Ki+DX0Ow==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1snySp-00000005IhV-1PYq; Tue, 10 Sep 2024 10:51:15 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1snyRn-00000005IYb-32Ja for linux-arm-kernel@lists.infradead.org; Tue, 10 Sep 2024 10:50:13 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D5ED7106F; Tue, 10 Sep 2024 03:50:39 -0700 (PDT) Received: from e124191.cambridge.arm.com (e124191.cambridge.arm.com [10.1.197.45]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 0E8993F66E; Tue, 10 Sep 2024 03:50:09 -0700 (PDT) From: Joey Gouly To: linux-arm-kernel@lists.infradead.org Cc: catalin.marinas@arm.com, joey.gouly@arm.com, naresh.kamboju@linaro.org, will@kernel.org Subject: [PATCH v1] arm64: pkeys: remove redundant WARN Date: Tue, 10 Sep 2024 11:50:04 +0100 Message-Id: <20240910105004.706981-1-joey.gouly@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240910_035011_831077_193814E2 X-CRM114-Status: UNSURE ( 8.80 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 Link: https://lore.kernel.org/linux-arm-kernel/CA+G9fYvarKEPN3u1Ogw2pcw4h6r3OMzg+5qJpYkAXRunAEF_0Q@mail.gmail.com/ Signed-off-by: Joey Gouly Cc: Will Deacon Cc: Catalin Marinas --- arch/arm64/include/asm/pkeys.h | 2 -- 1 file changed, 2 deletions(-) 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; }