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 DEA1CC35FF3 for ; Mon, 17 Mar 2025 15:32:47 +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:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=8tQ5XWv8ZHQLAvdqbuJYebbX461ZOZRJKK/j+oRFZcI=; b=h+T8OP1EoITYxd Es1H3Mv6EhK8JGb048MgEE2SJ0LhAT/JrwM6M8LjtDnGQao75r8QjJh/lG2fmvhrwkBpq7n+3Ttxc LZG984GG5RO7vC9XroiJhz0hnRVK415CbnFLL4O5MwT0tVYkbkXZvj8hmO3q5ZXo2sUOYg/w3/Iis wQFca5A8mudY3wddmFztQ/UpwMQJ6vqZJnYIK14kUTUyITqcdb14NV+SBtP+Wqib/Bu+2VotnDDFB gxEyeC8YHoN/jm9LIePcko/Ovye3BuasDCMOrYVDKFVBhFO3qiKV/DUDusZxZhTzWDT4dXg0u+liz uwSPRRVDsrPDJ7En+NsQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tuCSG-000000039sZ-1Nih; Mon, 17 Mar 2025 15:32:40 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tuCQZ-000000039Tg-0umr; Mon, 17 Mar 2025 15:30:56 +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 3164013D5; Mon, 17 Mar 2025 08:31:03 -0700 (PDT) Received: from [10.57.84.137] (unknown [10.57.84.137]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 421503F694; Mon, 17 Mar 2025 08:30:49 -0700 (PDT) Message-ID: <70349335-84ee-4bca-a3d6-d7cf3c05b92b@arm.com> Date: Mon, 17 Mar 2025 15:30:47 +0000 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 00/11] Always call constructor for kernel page tables Content-Language: en-GB To: Kevin Brodsky , linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org, Albert Ou , Andreas Larsson , Andrew Morton , Catalin Marinas , Dave Hansen , "David S. Miller" , Geert Uytterhoeven , Linus Walleij , Madhavan Srinivasan , Mark Rutland , Matthew Wilcox , Michael Ellerman , "Mike Rapoport (IBM)" , Palmer Dabbelt , Paul Walmsley , Peter Zijlstra , Qi Zheng , Will Deacon , Yang Shi , linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-openrisc@vger.kernel.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, sparclinux@vger.kernel.org References: <20250317141700.3701581-1-kevin.brodsky@arm.com> From: Ryan Roberts In-Reply-To: <20250317141700.3701581-1-kevin.brodsky@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250317_083055_304379_BDC42AA2 X-CRM114-Status: GOOD ( 11.93 ) X-BeenThere: linux-riscv@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-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org On 17/03/2025 14:16, Kevin Brodsky wrote: > The complications in those special pgtable allocators beg the question: > does it really make sense to treat efi_mm and init_mm differently in > e.g. apply_to_pte_range()? Maybe what we really need is a way to tell if > an mm corresponds to user memory or not, and never use split locks for > non-user mm's. Feedback and suggestions welcome! The difference in treatment is whether or not the ptl is taken, right? So the real question is when calling apply_to_pte_range() for efi_mm, is there already a higher level serialization mechanism that prevents racy accesses? For init_mm, I think this is handled implicitly because there is no way for user space to cause apply_to_pte_range() for an arbitrary piece of kernel memory. Although I can't even see where apply_to_page_range() is called for efi_mm. FWIW, contpte.c has mm_is_user() which is used by arm64. Thanks, Ryan _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv