On Fri, Jul 05, 2024 at 09:10:36AM +0200, Peter Zijlstra wrote: > On Wed, Jul 03, 2024 at 01:36:19PM -0700, Kees Cook wrote: > > > Yes, please use struct_size_t(). This is exactly what it was designed for. > > Kees, please, just let up, not going to happen. I'm getting really fed > up having to endlessly repeat what a piece of shite struct_size() is. I mean, okay, but the wrapper in the patch is basically the same thing. *shrug* > Put your time and effort into doing a proper language extension so we > can go and delete all that __builtin_*_overflow() based garbage. We are! That's in the future. Today, we have a saturating wrapper that provides type checking for the calculation's operands, and is in common use through-out the kernel. These are all things that the open-coded does not provide, so I continue to see it as an improvement over what else is available right now. I got asked for my opinion about whether to use struct_size() or not. In my opinion, this is a good place for it. I know you don't agree with me, but that wasn't the question. :) -Kees -- Kees Cook