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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 57B0DC48BC4 for ; Tue, 20 Feb 2024 19:50:50 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 522246B006E; Tue, 20 Feb 2024 14:50:49 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 4AA816B0071; Tue, 20 Feb 2024 14:50:49 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 34D536B0072; Tue, 20 Feb 2024 14:50:49 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 162396B006E for ; Tue, 20 Feb 2024 14:50:49 -0500 (EST) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 8C5011A0630 for ; Tue, 20 Feb 2024 19:50:48 +0000 (UTC) X-FDA: 81813224976.15.64C9E94 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf14.hostedemail.com (Postfix) with ESMTP id 6620B100004 for ; Tue, 20 Feb 2024 19:50:46 +0000 (UTC) Authentication-Results: imf14.hostedemail.com; dkim=none; spf=pass (imf14.hostedemail.com: domain of ryan.roberts@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=ryan.roberts@arm.com; dmarc=pass (policy=none) header.from=arm.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1708458646; a=rsa-sha256; cv=none; b=kOiqROOcvfwITRC4iR6IzwxC3hRev1LYK2Wt8HK/Qtk2wpYA5u5CBWmRkwWpfoL7X5hCxv xx1wMhuposTlP/uh9yS8t0GqMTyxY4woDqgFVoSj8IHFtSa4xJR1kcci7uCkAIYGaxI0pp Ww/DXZbNB0ps4/lTV4sH4sVDkT4cqDY= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=none; spf=pass (imf14.hostedemail.com: domain of ryan.roberts@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=ryan.roberts@arm.com; dmarc=pass (policy=none) header.from=arm.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1708458646; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vOz7pLhOiVtGjHH56iKXQm5tm1lF/VoDI7hHT8AQUuw=; b=CJiLZAJZ6f4ZuwzXMBZQMpDXW55hQ1rnn6eV5omUwsjOfssIWpcPMiSbi3sPsRFSUANNE0 eU85mYRYWKWScg3Y7XeJ5Nrixgw/FO6k2K06qL4+tahMgPUWDzL9MO3AH4jJFvZmkiP+mG s2tjg//9N+4/mcvWTDLJnkJxzyGB/6U= 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 171D1FEC; Tue, 20 Feb 2024 11:51:24 -0800 (PST) Received: from [172.20.10.9] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 47F7F3F73F; Tue, 20 Feb 2024 11:50:39 -0800 (PST) Message-ID: <061b8c8a-51cc-46b0-8a2d-90bf6c6ce5d8@arm.com> Date: Tue, 20 Feb 2024 20:50:37 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v6 12/18] arm64/mm: Wire up PTE_CONT for user mappings Content-Language: en-GB To: John Hubbard , Catalin Marinas Cc: Will Deacon , Ard Biesheuvel , Marc Zyngier , James Morse , Andrey Ryabinin , Andrew Morton , Matthew Wilcox , Mark Rutland , David Hildenbrand , Kefeng Wang , Zi Yan , Barry Song <21cnbao@gmail.com>, Alistair Popple , Yang Shi , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , linux-arm-kernel@lists.infradead.org, x86@kernel.org, linuxppc-dev@lists.ozlabs.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20240215103205.2607016-1-ryan.roberts@arm.com> <20240215103205.2607016-13-ryan.roberts@arm.com> <892caa6a-e4fe-4009-aa33-0570526961c5@arm.com> From: Ryan Roberts In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Rspam-User: X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 6620B100004 X-Stat-Signature: jfuo5p7kcfb8e5skf46n8eqn4wfjt97g X-HE-Tag: 1708458646-673307 X-HE-Meta: U2FsdGVkX19mkOy5qGNpDjK0eMIQXo/LIWEEWV8VzSSrFSFFhny0mhve2SRXbrg2X258yLlYphFQVy0TW/Q3UpCJHNQGkumEOVmXTVPShwuGxuDEFnWTUx0/2YVMLiDHaX6ZJ24ftynFmtH7BOCuaiMDTpXM0k8I3BvMo9udsmSJ6mpQnZCgzCfWVqPOq/eq6A43S15Ald0kU8kRrkUnGNjHtYgLgnT42E8JuZwu1omCul3IMqadLlgfklIKB6UKkKkz8MDaUE1FzYoHlioI8AuqNYKD/hKRLN0J+2Gqrdabw+DOi8gEjn3upmPtVn0mCRgD4HVhOSKAm++uTV3PwXMGP4crFLFn3MTiVsUeHwqO8B4LZZ88v3qiuYyQv4KHMxghJKt03puQhMiedVhOIKZDKlBEYQFVCn2fCjNxNyxyI258erKZM9rnEi3mpdEJzWTZ9HNmvFcvNE6Zep7QpnmCcDfBSpQ/0qiACk1Vnz8XLMJPMjFf7xdSWQAS3gMwijOZFuos99TQvMVVHrI6Yq2wVdNw1F80Sgz4NYwVn9e0AeSgYUSG7dpUrhrsgJCIjcYYuQkyNsItwKgPQ6ZtSDlMm4dU68jbUbbI2vb1HXVQOcniVw6ayzCMMNt1J2SR7KLRinv/zCSz676yGA2XFv6UEL7JyDCA8x9PIjfxd9NGbwtPtVb0IUjeZ+yLuYm1pirlU3P7xQ5BEzSwpPjgOkmjLB4WIjVPzQQ6pbBOx1nmepZSkf8FlZjjjuLgKIKwKxaRbZlLbNnhEWLnUfBouRgBR5C71z58ozTxCGHVGPV22Uv+bKbIOrMfK1O9YNU4LZfbDF+ZsUXOElMpXUK0U2xK+hwlpqk+ozjYMExOoYJ6BGsWL9WNaEDqbIHWHcmAzQoYnidxMoA2cIoHdoKZqQUOFcI6FoGPAK3MG2kYj+ITt5BfhE1PsXAub/ivW8+4QVBkozgh19gzrC/BjC9 nsLffIGn qN/6CN7jhnc9fRw1xr772NsJ/B3lIvy062lb88G5DmVrEKtAf9Vh2C+zBVdq4C8VE0pvR+BS+lSWMS+SK3cmrcXPfg8poEpO5gt+TN7pEVGHeQkIxtoqvmqbmhqKNDRPGoRlva6pjGPQ2aMsfBXeA0mzxZMZnEL0Z+2qqEdXt8sQ7qyVEQCT3yeD0BVXEklX/Yebqw/01qmazmWiAriC8xrh1NCYC+jWUPicCdqohXFp0uquWVtY8BnayRkqbetYOOc9/RO3bCJl5i43kRbOZPrkoKDi+g+43B6ivG1pWqnJ/x2uU64qTaVI12O2oJvEAMeqhp6d35HE+Zpet2KI+UpIPB9ixwqCI0qfzQKaIZ1skMaJGAlwPU6/IWA8/8jaTqoA4 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On 16/02/2024 19:54, John Hubbard wrote: > On 2/16/24 08:56, Catalin Marinas wrote: > ... >>> The problem is that the contpte_* symbols are called from the ptep_* inline >>> functions. So where those inlines are called from modules, we need to make sure >>> the contpte_* symbols are available. >>> >>> John Hubbard originally reported this problem against v1 and I enumerated all >>> the drivers that call into the ptep_* inlines here: >>> https://lore.kernel.org/linux-arm-kernel/b994ff89-1a1f-26ca-9479-b08c77f94be8@arm.com/#t >>> >>> So they definitely need to be exported. Perhaps we can tighten it to > > Yes. Let's keep the in-tree modules working. > >>> EXPORT_SYMBOL_GPL(), but I was being cautious as I didn't want to break anything >>> out-of-tree. I'm not sure what the normal policy is? arm64 seems to use ~equal >>> amounts of both. > > EXPORT_SYMBOL_GPL() seems appropriate and low risk. As Catalin says below, > these really are deeply core mm routines, and any module operating at this > level is not going to be able to survive on EXPORT_SYMBOL alone, IMHO. > > Now, if only I could find an out of tree module to test that claim on... :) > > >> I don't think we are consistent here. For example set_pte_at() can't be >> called from non-GPL modules because of __sync_icache_dcache. OTOH, such >> driver is probably doing something dodgy. Same with >> apply_to_page_range(), it's GPL-only (called from i915). >> >> Let's see if others have any view over the next week or so, otherwise >> I'd go for _GPL and relax it later if someone has a good use-case (can >> be a patch on top adding _GPL). > > I think going directly to _GPL for these is fine, actually. OK I'll send out a patch to convert these to _GPL on my return on Monday. Hopefully Andrew will be able to squash the patch into the existing series. > > > thanks,