Re: [PATCH 8/8] ucounts: delete these duplicate static variables ue_zero and ue_int_max

From: Joel Granados
Date: Thu Mar 21 2024 - 10:30:50 EST


On Sun, Feb 25, 2024 at 06:29:33AM -0600, Eric W. Biederman wrote:
> wenyang.linux@xxxxxxxxxxx writes:
>
> > From: Wen Yang <wenyang.linux@xxxxxxxxxxx>
> >
> > Since these static variables (ue_zero and ue_int_max) are only used for
> > boundary checks and will not be changed, remove it and use the ones in
> > our shared const array.
>
> What happened to the plans to kill the shared const array?
I agree with removing sysctl_vals. I wanted to get more info but was not
able to find much in lore.kernel.org. I was wondering if the push
towards removing it had been discussed in the lists? Or was it more like
a conference hallway discussion?

Best
>
> You can still save a lot more by turning .extra1 and .extra2
> into longs instead of keeping them as pointers and needing
> constants to be pointed at somewhere.
>
> As I recall the last version of this actually broke the code,
> (but not on little endian).
>
> This one if the constants are properly named looks better
> than that, but I don't see any reason why you want shared
> constants for such a handful of things. Especially when
> it has proven to be error prone in the past.
>
> The only people I can see who find a significant benefit by
> consolidating all of the constants into one place are people who know
> how to stomp kernel memory.
>
> Eric
>

--

Joel Granados

Attachment: signature.asc
Description: PGP signature