Re: [PATCH v6 04/12] arm64/mm: Export set_direct_map_*_noflush() APIs

From
Thierry Reding <thierry.reding@kernel.org>
Date
2026-09-10 09:21:41
Also in
dri-devel, linux-devicetree, linux-iommu, linux-media, linux-mm, linux-s390, linux-tegra, lkml
Reply to
Christoph Hellwig, 2026-09-10
On Wed, Sep 09, 2026 at 10:51:43PM -0700, Christoph Hellwig wrote:
On Fri, Sep 04, 2026 at 12:44:55PM +0200, Thierry Reding wrote:
quoted
From: Thierry Reding <redacted>

Drivers that use this may want to be built as a module, so export them.
That's one of the worst commit log ever.  No, we don't just export
core symbols dealing with the kernel direct map because
"Drivers that use this may want to be built as a module".

For one exporting this at all needs a very good justification and
not just hand waiving.  But more importantly if we can't avoid
exporting it, it needs to be exported at the tightest sensible
scope.  E.g. for a given module if it is so special, or a namespace
if it's not that special.  But in doubt we should have a proper
core abstraction instead of opening up direct map manipulation to
random modules.
Fair points. In an earlier set of patches this was abstracted behind a
set of set_memory_*() functions, modelled after set_memory_encrypted()
and set_memory_decrypted(), which I think I'd still prefer, too.

Is that more along the lines of what you had in mind?

Thanks,
Thierry

Attachments

Thread (38 messages) 38 messages, 7 authors, last reply 2026-09-10
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help