overflow: Use POD in check_shl_overflow()
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>
This commit is contained in:
committed by
Kees Cook
parent
c2efa5387c
commit
c5e6d3d85e
@@ -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; \
|
||||
u64 _a_full = _a; \
|
||||
unsigned long long _a_full = _a; \
|
||||
unsigned int _to_shift = \
|
||||
is_non_negative(_s) && _s < 8 * sizeof(*d) ? _s : 0; \
|
||||
*_d = (_a_full << _to_shift); \
|
||||
|
||||
Reference in New Issue
Block a user