Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp3652798rwb; Mon, 16 Jan 2023 10:53:12 -0800 (PST) X-Google-Smtp-Source: AMrXdXutEpRDgTK0EjsgOCWtYBGGmxdbuo8ZmidRP+8p5s3zuAGD8W1KLGyQYMecQlJtF4lLmVdv X-Received: by 2002:a17:907:8e93:b0:7bf:3627:df32 with SMTP id tx19-20020a1709078e9300b007bf3627df32mr83397531ejc.75.1673895192524; Mon, 16 Jan 2023 10:53:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673895192; cv=none; d=google.com; s=arc-20160816; b=XpL3t2TNaRIHNpJEZgj5GFtYdxYr2sZPgbvhqc2KHgNva9qz+vdb7r6RiXN6jWLjgk rFo4QZWONwiLedX72y0/A1TZoFIJPf3labGkertfjxga9U91IzTznpZsRFj5hXBFVFu2 2FPBBPRjp7Fg2B1uffOSDH4ylSEzpL4HdN4J8EJKp/72E28osnm1VUJ9bGGW0MyaGliV NE62/ly8eiWElWSE3rozZ+KERIbR9jhvNOUzjIKOJMKsLYIFOOlAf7Lflh/Ylq7Qwfm6 E8VEuyTY4yTTMOwQdQzniZiW7nrRMOcjL63FKxNYNFti3h/d44RExzzLBnk1pC8BeDcx wdCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=1Uy2+K4fVH/pqjt68ETyPossN179cIpEjrdA+rrQ30w=; b=0FuGPvF6VlaWsIFbBNXCv1irFRofyFMi2xJ5H4bhT3NL8mNdvodHy12D1FZxeFZeL+ VDWNbyH5bmqmW9qFvVdRunKmuCHwzvcdexBgVcc3eXegX5uGnrp2elgCTXZmXUYXYe0l 2jG4XSloWLqCXO89PsvxpJaY4OPIg0Ymfjz/3Tu0D1rlLB3+0kw74zeZ4WZDWoulU4zB gYKHss4enrAjnEDcZmDA+iLpWmzZ+rMcTAn2EM9rNEqD8fe4D98zyrxwnBhxiJ2aUJTh LaDa5NOKg7nwG5SBK4g31xJyABOwKstb9OZIB7QCZ/AOw/f/oX2uX0NG0Zo2gFGhIDHP cBug== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id wg5-20020a17090705c500b0084d5de1fc0asi6096426ejb.606.2023.01.16.10.53.00; Mon, 16 Jan 2023 10:53:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233202AbjAPSjN (ORCPT + 50 others); Mon, 16 Jan 2023 13:39:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46606 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235057AbjAPSi1 (ORCPT ); Mon, 16 Jan 2023 13:38:27 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 656D71E1ED; Mon, 16 Jan 2023 10:30:55 -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 ams.source.kernel.org (Postfix) with ESMTPS id 17543B8106C; Mon, 16 Jan 2023 18:30:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 91409C433F0; Mon, 16 Jan 2023 18:30:50 +0000 (UTC) Date: Mon, 16 Jan 2023 18:30:47 +0000 From: Catalin Marinas To: Sasha Levin Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Will Deacon , kernel test robot , 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: Re: [PATCH AUTOSEL 5.4 05/16] arm64/mm: Define dummy pud_user_exec() when using 2-level page-table Message-ID: References: <20230116140520.116257-1-sashal@kernel.org> <20230116140520.116257-5-sashal@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230116140520.116257-5-sashal@kernel.org> X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 16, 2023 at 09:05:08AM -0500, Sasha Levin wrote: > 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 I don't think this patch should be backported to 5.4. It is a fix for a commit that went in shortly before this one (730a11f982e6). The latter commit does have a Fixes tag but I guess Will thought it's not worth a cc stable (and it's up to 5.19 anyway). -- Catalin