Re: [PATCH v1 1/2] overflow: Allow to sum a few arguments at once

From: Johannes Berg

Date: Tue Jun 23 2026 - 13:52:39 EST


On Tue, 2026-06-23 at 16:32 +0100, David Laight wrote:
>
> Both those seem to contain multiple expansions of is_constexpr().
> I'd be surprised if __builtin_constant_p() wasn't good enough.
>
> I also wonder what kind of mess the object code looks like.

You should definitely wonder less out loud and only comment when you
have actual hard facts...

> I'd also worry whether the saturating maths in any way performs the correct check.
> I suspect the (non-saturated) value gets used for a kmalloc(),
> but that has much smaller valid (and sane) limits than can come out of the above.

That's, frankly, ridiculous.

johannes