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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1EB4AC63797 for ; Mon, 16 Jan 2023 14:15:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232409AbjAPOPA (ORCPT ); Mon, 16 Jan 2023 09:15:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58484 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232453AbjAPONk (ORCPT ); Mon, 16 Jan 2023 09:13:40 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0728B23866; Mon, 16 Jan 2023 06:05:11 -0800 (PST) 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 858FA60FD8; Mon, 16 Jan 2023 14:05:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 90562C433F0; Mon, 16 Jan 2023 14:05:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1673877903; bh=sctyEg4WGSg9Uy1TRMOTAIcncueAL9Lf8+Xck+p0hbU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=detcGoMANKSsGDMedL7gHHSGYV+yENpdRcYThdFslKiRaYt+dUvK4ugkPx0UTKQb8 7YVk1dYIqsR2hP5rajeeTeEa5gDx8v4PoDiMJp6u/dzX3AGNAy/TjIQfBPSjy/tHwP EvF8eWxDPMPhenDymbxI9KHc4q8RFft750ckkUYjYKS7ZtoqnM6rDGESGFpeJxU3PW IBT4m19BzBMEPK64K0F1s3Bo3D+OZJAHsqey63JgJlM6dF1Mt7D4o/YyRczi7/7ERB H7I2w/0pRyaN2iiHA8mpL63g3hUCVq+MmKxn7MFFxmozKLk7EoH5ZF8oPUhwN5Oym7 3GJ5D5iT6ETog== 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.10 07/17] arm64/mm: Define dummy pud_user_exec() when using 2-level page-table Date: Mon, 16 Jan 2023 09:04:38 -0500 Message-Id: <20230116140448.116034-7-sashal@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20230116140448.116034-1-sashal@kernel.org> References: <20230116140448.116034-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.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 3f74db7b0a31..67f33df4006a 100644 --- a/arch/arm64/include/asm/pgtable.h +++ b/arch/arm64/include/asm/pgtable.h @@ -653,6 +653,7 @@ static inline unsigned long pud_page_vaddr(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 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 3438EC46467 for ; Mon, 16 Jan 2023 14:19:49 +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=yB1He+NwU4Nm09eSYMmVvwj4a97OAdMipWy9bB6oA8I=; b=a3zfI3Qg8RNWTJ YQv/fCyumY1zE+mcwdX2m5d6YqinO1IE/f9a7U7aBtuNBhsoFtzTne2ouh/pu3hjy+FiwJpCLH4jI 0hzOm82nwKVlLr+HOiq7Oei9WXyE/2z5tJtYSd8KpJ979Tf169Fhy2r4hRZekbcFGm0dvo19+XkIO ywmZESx7A+J3dz1SErN2nEmQdBeBU21171eVJE0vaqem9xttR2Yb51uCGWD8N9wWBhjtWBwP7PQhB xG/ALqjwue/C7yXppchL7VhD4a8xgiG5hFnyDIIp7OV+MF5YheXHO6oS0e/T4qMQFHpe7y7B6KCpd 8hjpu7vv9Hwe7Kpgkqmw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pHQJo-00ApNr-7A; Mon, 16 Jan 2023 14:18:37 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pHQ6j-00Ai3W-3p for linux-arm-kernel@lists.infradead.org; Mon, 16 Jan 2023 14:05:07 +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 7DBA960F95; Mon, 16 Jan 2023 14:05:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 90562C433F0; Mon, 16 Jan 2023 14:05:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1673877903; bh=sctyEg4WGSg9Uy1TRMOTAIcncueAL9Lf8+Xck+p0hbU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=detcGoMANKSsGDMedL7gHHSGYV+yENpdRcYThdFslKiRaYt+dUvK4ugkPx0UTKQb8 7YVk1dYIqsR2hP5rajeeTeEa5gDx8v4PoDiMJp6u/dzX3AGNAy/TjIQfBPSjy/tHwP EvF8eWxDPMPhenDymbxI9KHc4q8RFft750ckkUYjYKS7ZtoqnM6rDGESGFpeJxU3PW IBT4m19BzBMEPK64K0F1s3Bo3D+OZJAHsqey63JgJlM6dF1Mt7D4o/YyRczi7/7ERB H7I2w/0pRyaN2iiHA8mpL63g3hUCVq+MmKxn7MFFxmozKLk7EoH5ZF8oPUhwN5Oym7 3GJ5D5iT6ETog== 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.10 07/17] arm64/mm: Define dummy pud_user_exec() when using 2-level page-table Date: Mon, 16 Jan 2023 09:04:38 -0500 Message-Id: <20230116140448.116034-7-sashal@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20230116140448.116034-1-sashal@kernel.org> References: <20230116140448.116034-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_060505_236042_2CC3D8BA X-CRM114-Status: GOOD ( 11.88 ) 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 3f74db7b0a31..67f33df4006a 100644 --- a/arch/arm64/include/asm/pgtable.h +++ b/arch/arm64/include/asm/pgtable.h @@ -653,6 +653,7 @@ static inline unsigned long pud_page_vaddr(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