Re: [PATCH] proc: make struct proc_dir_entry::name const

From: Alexey Dobriyan
Date: Thu Nov 30 2023 - 01:58:46 EST


On Wed, Nov 29, 2023 at 02:07:05PM -0800, Andrew Morton wrote:
> On Wed, 29 Nov 2023 12:46:57 +0300 Alexey Dobriyan <adobriyan@xxxxxxxxx> wrote:
>
> > Multiply ::name into "mut_name" and "name" which is "const char*".
> >
> > PDE's name must not be mutated on live PDE, hint modules they should not
> > do it.
>
> Do any modules do this?

x86_64 allmodconfig is OK, so in-kernel modules are OK.

> If so, we just broke them.

pff...

> If not, why bother with this change?

I don't know, out of love for humanity and increasing OOT modules
code quality. I don't think I've seen changing pde->name, but then
it is OOT modules we are talking about.

C doesn't have a notion for write once members, oh well.