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

From: Thierry Reding

Date: Thu Sep 10 2026 - 05:35:26 EST


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:
> > From: Thierry Reding <treding@xxxxxxxxxx>
> >
> > 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

Attachment: signature.asc
Description: PGP signature