android_kernel_motorola_sm6375/include
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Kees Cook ed6c8c1fe6 overflow: Allow mixed type arguments
commit d219d2a9a92e39aa92799efe8f2aa21259b6dd82 upstream.

When the check_[op]_overflow() helpers were introduced, all arguments
were required to be the same type to make the fallback macros simpler.
However, now that the fallback macros have been removed[1], it is fine
to allow mixed types, which makes using the helpers much more useful,
as they can be used to test for type-based overflows (e.g. adding two
large ints but storing into a u8), as would be handy in the drm core[2].

Remove the restriction, and add additional self-tests that exercise
some of the mixed-type overflow cases, and double-check for accidental
macro side-effects.

[1] https://git.kernel.org/linus/4eb6bd55cfb22ffc20652732340c4962f3ac9a91
[2] https://lore.kernel.org/lkml/[email protected]

Cc: Rasmus Villemoes <[email protected]>
Cc: Gwan-gyeong Mun <[email protected]>
Cc: "Gustavo A. R. Silva" <[email protected]>
Cc: Nick Desaulniers <[email protected]>
Cc: [email protected]
Reviewed-by: Andrzej Hajda <[email protected]>
Reviewed-by: Gwan-gyeong Mun <[email protected]>
Tested-by: Gwan-gyeong Mun <[email protected]>
Signed-off-by: Kees Cook <[email protected]>
[florian: Drop changes to lib/test_overflow.c]
Signed-off-by: Florian Fainelli <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2025-03-13 12:42:52 +01:00
..
acpi ACPI: CPPC: Do not prevent CPPC from working in the future 2022-08-25 11:18:15 +02:00
asm-generic asm-generic: qspinlock: fix queued_spin_value_unlocked() implementation 2023-12-20 15:41:22 +01:00
clocksource
crypto crypto: af_alg - Disallow multiple in-flight AIO requests 2024-01-25 14:34:23 -08:00
drm drm/printer: Allow NULL data in devcoredump printer 2024-11-08 16:20:39 +01:00
dt-bindings
keys
kvm
linux overflow: Allow mixed type arguments 2025-03-13 12:42:52 +01:00
math-emu
media media: rename VFL_TYPE_GRABBER to _VIDEO 2024-03-26 18:22:22 -04:00
misc
net net: add exit_batch_rtnl() method 2025-02-01 18:18:49 +01:00
pcmcia
ras
rdma RDMA/netlink: Add __maybe_unused to static inline in C file 2021-11-26 10:47:18 +01:00
scsi scsi: core: Introduce the scsi_cmd_to_rq() function 2023-12-08 08:44:28 +01:00
soc soc: fsl: qbman: Add CGR update function 2024-04-13 12:51:27 +02:00
sound ALSA: pcm: Set per-card upper limit of PCM buffer allocations 2023-08-30 16:27:22 +02:00
target scsi: target: Fix ordered tag handling 2021-11-26 10:47:16 +01:00
trace f2fs: reduce expensive checkpoint trigger frequency 2024-11-08 16:20:32 +01:00
uapi netfilter: Replace zero-length array with flexible-array member 2025-01-09 13:23:35 +01:00
vdso
video video: of_display_timing.h: include errno.h 2022-07-12 16:30:47 +02:00
xen xen/xenbus: fix locking 2024-12-14 19:44:47 +01:00