[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <98f086dbdc2d4a7c8586bdcb04571300@amazon.com>
Date: Fri, 19 Sep 2025 10:41:09 +0000
From: "Farber, Eliav" <farbere@...zon.com>
To: David Laight <david.laight.linux@...il.com>
CC: "luc.vanoostenryck@...il.com" <luc.vanoostenryck@...il.com>,
"rostedt@...dmis.org" <rostedt@...dmis.org>, "mingo@...hat.com"
<mingo@...hat.com>, "akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>, "sj@...nel.org"
<sj@...nel.org>, "David.Laight@...LAB.COM" <David.Laight@...LAB.COM>,
"Jason@...c4.com" <Jason@...c4.com>, "andriy.shevchenko@...ux.intel.com"
<andriy.shevchenko@...ux.intel.com>, "bvanassche@....org"
<bvanassche@....org>, "keescook@...omium.org" <keescook@...omium.org>,
"linux-sparse@...r.kernel.org" <linux-sparse@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, "Chocron,
Jonathan" <jonnyc@...zon.com>, "stable@...r.kernel.org"
<stable@...r.kernel.org>
Subject: RE: [PATCH 0/7 5.10.y] Cherry pick of minmax.h commits from 5.15.y
> On Tue, 16 Sep 2025 21:22:52 +0000
> Eliav Farber <farbere@...zon.com> wrote:
>
> > This series backports seven commits from v5.15.y that update minmax.h
> > and related code:
> >
> > - ed6e37e30826 ("tracing: Define the is_signed_type() macro once")
> > - 998f03984e25 ("minmax: sanity check constant bounds when clamping")
> > - d470787b25e6 ("minmax: clamp more efficiently by avoiding extra
> > comparison")
> > - 1c2ee5bc9f11 ("minmax: fix header inclusions")
> > - d53b5d862acd ("minmax: allow min()/max()/clamp() if the arguments
> > have the same signedness.")
> > - 7ed91c5560df ("minmax: allow comparisons of 'int' against 'unsigned
> > char/short'")
> > - 22f7794ef5a3 ("minmax: relax check to allow comparison between
> > unsigned arguments and signed constants")
>
> I think you need to pick up the later changes (from Linus) as well.
> Without them nested min() and max() can generate very long lines from the pre-processor (tens of megabytes) that cause very slow and/or failing compilations on 32bit and other memory-limited systems.
>
> There are a few other changes needed at the same time.
> The current min() and max() can't be used in a few places because they aren't 'constant enough' with constant arguments.
I aligned minmax.h to include all changes in v6.17-rc6.
https://lore.kernel.org/stable/20250919101727.16152-1-farbere@amazon.com/T/#t
---
Regards, Eliav
Powered by blists - more mailing lists