From mboxrd@z Thu Jan 1 00:00:00 1970 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 DE301C54EBE for ; Mon, 16 Jan 2023 14:21:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=YgsPtNYNfJGsqBSZ4Q9eWsgBwUEPHABDpqwhjctbOkI=; b=k9zxXLs6KYufwJ yf8xx5GR6+hNkoTrLxW6dR917BSftNY2F9zFKKqPyhGpD7YlFWvg17G/IPJ+5UxOHJ/Ds6KNfUIQj Ha98hr8jLTPMMNJGTwhx9Hhb+y/JvNsQviRvyagk4NGdyyuxA9h2EsHFXYHpZAKGFwE9s3ZJFLzxM sBf8q/KpA/BuGz6SCThYgoBfiJw91bIDZSPMOhhmP0mrQ4RM1TYTZkEKoVXnsXiGpa0oc4mPo0N07 ZUmsfCDVEIqCMxxZrkomfGydf5aVg249n8FabZvyyy75EAl34dmmMe75rYGmYOVjOR17vOdqd9LgA EEyZkMuDAifOY5Hwnu5g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pHQL7-00Aq1g-IM; Mon, 16 Jan 2023 14:19:57 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pHQ7A-00AiHM-II for linux-arm-kernel@lists.infradead.org; Mon, 16 Jan 2023 14:05:35 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id ED95760FC9; Mon, 16 Jan 2023 14:05:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 67B1DC433D2; Mon, 16 Jan 2023 14:05:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1673877931; bh=zf3vVZwT1YV8sXZuWo5gGUU/CbgGYrKql4HN7Nu0Uzw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jz4b8PdN7Th6Gj4YAPeqK0NUNZQ79QV7+DtSnoPEOFKD02VSYSNKeTo1X538Xj+fr mukw1bVNFE26aMAVYuIYiApf+bMLVHz9TGFQ+0iJv02cXr013F6I5w10CZpv89MrPC UMxVUSRxoVh1vXBqfGyWHH7WxqpjtsoCoqnMrWU+jBUK5hfuMW1DigRnUBVnx0tf1E ITVo7+6ZtV6yPLvASBBkRjbw5XHeM1zQ75CFiyGmMVI6XU3VbSHccUv/SqcxcshaQm R+QHjtqJL9RtgwkpNSZGLav18sWtnEtN+juMgUq6om3vnOvKr4oRtPO3VUCvymNvfK JJVylr0iStOMg== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Will Deacon , kernel test robot , Sasha Levin , catalin.marinas@arm.com, akpm@linux-foundation.org, anshuman.khandual@arm.com, wangkefeng.wang@huawei.com, liushixin2@huawei.com, david@redhat.com, tongtiangen@huawei.com, yuzhao@google.com, linux-arm-kernel@lists.infradead.org Subject: [PATCH AUTOSEL 5.4 05/16] arm64/mm: Define dummy pud_user_exec() when using 2-level page-table Date: Mon, 16 Jan 2023 09:05:08 -0500 Message-Id: <20230116140520.116257-5-sashal@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20230116140520.116257-1-sashal@kernel.org> References: <20230116140520.116257-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230116_060532_683399_F6388B38 X-CRM114-Status: GOOD ( 11.84 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Will Deacon [ Upstream commit 4e4ff23a35ee3a145fbc8378ecfeaab2d235cddd ] With only two levels of page-table, the generic 'pud_*' macros are implemented using dummy operations in pgtable-nopmd.h. Since commit 730a11f982e6 ("arm64/mm: add pud_user_exec() check in pud_user_accessible_page()"), pud_user_accessible_page() unconditionally calls pud_user_exec(), which is an arm64-specific helper and therefore isn't defined by pgtable-nopmd.h. This results in a build failure for configurations with only two levels of page table: arch/arm64/include/asm/pgtable.h: In function 'pud_user_accessible_page': >> arch/arm64/include/asm/pgtable.h:870:51: error: implicit declaration of function 'pud_user_exec'; did you mean 'pmd_user_exec'? [-Werror=implicit-function-declaration] 870 | return pud_leaf(pud) && (pud_user(pud) || pud_user_exec(pud)); | ^~~~~~~~~~~~~ | pmd_user_exec Fix the problem by defining pud_user_exec() as pud_user() in this case. Link: https://lore.kernel.org/r/202301080515.z6zEksU4-lkp@intel.com Reported-by: kernel test robot Signed-off-by: Will Deacon Signed-off-by: Sasha Levin --- arch/arm64/include/asm/pgtable.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h index 3a057d427900..68d5fbbd0f8a 100644 --- a/arch/arm64/include/asm/pgtable.h +++ b/arch/arm64/include/asm/pgtable.h @@ -588,6 +588,7 @@ static inline phys_addr_t pud_page_paddr(pud_t pud) #else #define pud_page_paddr(pud) ({ BUILD_BUG(); 0; }) +#define pud_user_exec(pud) pud_user(pud) /* Always 0 with folding */ /* Match pmd_offset folding in */ #define pmd_set_fixmap(addr) NULL -- 2.35.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel