projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c2efa53
)
overflow: Use POD in check_shl_overflow()
author
Andy Shevchenko
<andriy.shevchenko@linux.intel.com>
Wed, 28 Feb 2024 20:41:31 +0000
(22:41 +0200)
committer
Kees Cook
<keescook@chromium.org>
Thu, 29 Feb 2024 21:38:03 +0000
(13:38 -0800)
The check_shl_overflow() uses u64 type that is defined in types.h.
Instead of including that header, just switch to use POD type
directly.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Kees Cook <keescook@chromium.org>
Link:
https://lore.kernel.org/r/20240228204919.3680786-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Kees Cook <keescook@chromium.org>
include/linux/overflow.h
patch
|
blob
|
history
diff --git
a/include/linux/overflow.h
b/include/linux/overflow.h
index dede374832c9b992e5c48eac73f2bb82a40a300e..bc390f0261288c7ebda6088cc9e1c3a957e63146 100644
(file)
--- a/
include/linux/overflow.h
+++ b/
include/linux/overflow.h
@@
-197,7
+197,7
@@
static inline bool __must_check __must_check_overflow(bool overflow)
typeof(a) _a = a; \
typeof(s) _s = s; \
typeof(d) _d = d; \
- u
64 _a_full = _a;
\
+ u
nsigned long long _a_full = _a;
\
unsigned int _to_shift = \
is_non_negative(_s) && _s < 8 * sizeof(*d) ? _s : 0; \
*_d = (_a_full << _to_shift); \