Re: [PATCH v1 1/2] overflow: Allow to sum a few arguments at once
From: Andy Shevchenko
Date: Fri Jun 19 2026 - 02:46:18 EST
On Thu, Jun 18, 2026 at 08:47:34PM -0700, Kees Cook wrote:
> On Wed, Jun 17, 2026 at 01:12:36PM +0200, Andy Shevchenko wrote:
> > Convert size_add() to take variadic argument, so we can simplify users
> > with using a macro only once.
>
> Oh, this is fun. I like it. :)
He-he :-)
...
> > +#define __size_add4(addend1, addend2, addend3, addend4, addend5, ...) \
> > + __size_add(__size_add3(addend1, addend2, addend3, addend4), addend5)
>
> Is 4 the max seen in practice?
In patch 2 there are 5! In cover letter I also mentioned a new user
(there are actually three). And I remember seeing 3 somewhere else.
--
With Best Regards,
Andy Shevchenko