Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp1950708rdb; Tue, 20 Feb 2024 11:53:41 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUwINRE8wk88zVT/Y66kVrVB1xY4wxwdyZIwelj++MHVqnsHFqrsuqV67sqhoqeGeRsYODvQmFUnPSpCY84oXU2v49SVoXKISXQH85zuA== X-Google-Smtp-Source: AGHT+IGaFNnlfe05gnhPJaa9p6IhU7TNAWeXnAYDXl+2eo2eZ0XdIV5DFrIej6zYnsBdHB2ZFWfc X-Received: by 2002:a05:6359:4c19:b0:17b:335c:fa68 with SMTP id kj25-20020a0563594c1900b0017b335cfa68mr9252417rwc.17.1708458821489; Tue, 20 Feb 2024 11:53:41 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708458821; cv=pass; d=google.com; s=arc-20160816; b=FahpCnOhMkN8v4Odbv34dOuHH0yBa5/dy6jpzDIpv7DU76iQYsB2fp5XoUYzulPULi vyWQ9Oq2tqDawSaYJKK6rD0O097J4TD8XwVWYTpIARhDzDX2bwOcWsmupjerhZMmf9em tlkuIiYC7AwcOrR5Xxyy13ZZO/u7YhoxfFoFyy0gJoHX+KwUGvvnn5A4ydq6nWCbhsCz ko5vtg5ZwBO0P6o+IfohGkA+EqyejIVXfsm3umnH4ikAt5W2Sya1xQ3B4PUaFMv/Bd/B oGgtkFAvQ+zo/HJbI2ZYb+cVoctxcDPEmJUFXRV4tYX5ZTbaZNsBUEYeImn638ZiHvR7 OGWA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=vOz7pLhOiVtGjHH56iKXQm5tm1lF/VoDI7hHT8AQUuw=; fh=NYrVwjXFkUxs/11bIHEuBiZOjmpTWi7wRAeyLw3ed3M=; b=c0Wsq2bBG5rgtZBT3eX2nA0f373mLtFF9XvS2eag9OsPTTBjcmGdyoABJW7Ig8iOGb gZjU5aDhp82O9ucbsHx/gFfqLvtjR0rzDtGGCTIqagCrBEs9ywXHhLiajVhPwDJkV6sZ 0TdeceB34pJATK6LOKaq0AUM//GJJbFokm1wmOPShSOgkKhGx2NpXo3ZgITVxqykS4uP xxy8mACCrVngJeQdq+yx7nfBdJDsNNWFCEvjHOOB7/cfna85fUbQmQq6eE0ipu5DGiWM daaSx413R9JtXP1ZSQT0X4qKtpw2blHaYvVLVNk92Npi/eBwOYJ4PUruB7f3r+3pNjfP pQlA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-73616-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-73616-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id s28-20020a63925c000000b005dc855c40a4si6611162pgn.645.2024.02.20.11.53.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 11:53:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-73616-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-73616-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-73616-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 375D8B23D6D for ; Tue, 20 Feb 2024 19:50:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 10ED214A0BE; Tue, 20 Feb 2024 19:50:49 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4A62937142 for ; Tue, 20 Feb 2024 19:50:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708458648; cv=none; b=Ll91lr78usSvnvTyTEJWms+T2n2cJ+wqLqEZ32rIwNwf7640arOYkJ5KAc6jInx7GxMfqvOJQ6izkzoHx2B3NwtgN51W1ak3nj0PqJvZjnlFHeT9+Wm76s7/kfcIKDbmepLguES5pnJDboGvBx7egj+WFsM8LojhP77qykx+FPs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708458648; c=relaxed/simple; bh=ZHNJV10QT5ZCkniFfESwb5/+Afun37K5/tpp9k6AKJc=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Q3gADkIutKdDNRrN6WsJ9ft4etHhAMc2rn1XPU5M/gProhvYi3aUQ8srgXH5afTHoXwSdaLJnECpgpjola/S49ugLFAspahBu8RJAtrjTIXIhRlQyfLYnil0ubE99UPZVVc8lhQENntZlEOal8YhS1NcoLdf3OKVVUYemfUJoQo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com 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 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 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,