[PATCH 1/2] arm64/mm: Export contpte symbols only to GPL users
Ryan Roberts
ryan.roberts at arm.com
Mon Feb 26 04:40:55 PST 2024
On 26/02/2024 12:25, David Hildenbrand wrote:
> On 26.02.24 13:03, Ryan Roberts wrote:
>> The contpte symbols must be exported since some of the public inline
>> ptep_* APIs are called from modules and these inlines now call the
>> contpte functions. Originally they were exported as EXPORT_SYMBOL() for
>> fear of breaking out-of-tree modules. But we subsequently concluded that
>> EXPORT_SYMBOL_GPL() should be safe since these functions are deeply core
>> mm routines, and any module operating at this level is not going to be
>> able to survive on EXPORT_SYMBOL alone.
>>
>
> I only looked at __set_ptes() to get a feeling what would currently work.
>
> __set_ptes() might already call __sync_icache_dcache() via
> __sync_cache_and_tags(), that is EXPORT_SYMBOL_GPL.
>
> [mte_sync_tags() is not exported at all, so maybe it's safe to assume that some
> out-of-tree module could not make good use of set_pte_at() in general]
That's interesting, some grepping I previously did showed that ptep_get() and
set_pte_at() are used by in-tree drivers (which I assume can be built as modules):
https://lore.kernel.org/linux-arm-kernel/b994ff89-1a1f-26ca-9479-b08c77f94be8@arm.com/
>
> Acked-by: David Hildenbrand <david at redhat.com>
>
Thanks!
More information about the linux-arm-kernel
mailing list