Cherry pick of minmax.h commits from 5.15.y
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest7 patches 6 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/7 | tracing: Define the is_signed_type() macro onceinclude/ include/ include/ | +6 | 3 replies | |
| 2/7 | minmax: sanity check constant bounds when clampinginclude/ | +24 | 0 replies | |
| 3/7 | minmax: clamp more efficiently by avoiding extra comparisoninclude/ | +1 | 0 replies | |
| 4/7 | minmax: fix header inclusionsinclude/ | +2 | 0 replies | |
| 5/7 | minmax: allow min()/max()/clamp() if the arguments have the same signedness.include/ | +32 | 1 reply | |
| 6/7 | minmax: allow comparisons of 'int' against 'unsigned char/short'include/ | +3 | 0 replies | |
| 7/7 | minmax: relax check to allow comparison between unsigned arguments and signed constantsinclude/ | +17 | 0 replies |
Reviews trailers per patch
3 of 7 patches have a Reviewed-by or Acked-by.
| Patch | Kees Cook | Andy Shevchenko | Herve Codina |
|---|---|---|---|
| 1/7 | A-b | ||
| 2/7 | R-b | ||
| 3/7 | |||
| 4/7 | R-b | ||
| 5/7 | |||
| 6/7 | |||
| 7/7 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.
Cover letter [PATCH 0/7 5.10.y] Cherry pick of minmax.h commits from 5.15.y
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")
The main motivation is commit d53b5d862acd, which removes the strict type check in min()/max() when both arguments have the same signedness. Without this, kernel 5.10 builds can emit warnings that become build failures when -Werror is used.
Additionally, commit ed6e37e30826 from tracing is required as a dependency; without it, compilation fails.
Andy Shevchenko (1):
minmax: fix header inclusions
Bart Van Assche (1):
tracing: Define the is_signed_type() macro once
David Laight (3):
minmax: allow min()/max()/clamp() if the arguments have the same
signedness.
minmax: allow comparisons of 'int' against 'unsigned char/short'
minmax: relax check to allow comparison between unsigned arguments and
signed constants
Jason A. Donenfeld (2):
minmax: sanity check constant bounds when clamping
minmax: clamp more efficiently by avoiding extra comparison
include/linux/compiler.h | 6 +++ include/linux/minmax.h | 89 ++++++++++++++++++++++++++---------- include/linux/overflow.h | 1 - include/linux/trace_events.h | 2 - 4 files changed, 70 insertions(+), 28 deletions(-)
Signature · 1 line
2.47.3