Files
ack-tegra/include/linux
Kees Cook 230f6fa2c1 overflow: Provide constant expression struct_size
There have been cases where struct_size() (or flex_array_size()) needs
to be calculated for an initializer, which requires it be a constant
expression. This is possible when the "count" argument is a constant
expression, so provide this ability for the helpers.

Cc: Gustavo A. R. Silva <gustavoars@kernel.org>
Cc: Nathan Chancellor <nathan@kernel.org>
Cc: Nick Desaulniers <ndesaulniers@google.com>
Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Tested-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Link: https://lore.kernel.org/lkml/20220210010407.GA701603@embeddedor
2022-02-16 14:30:37 -08:00
..
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2022-01-22 08:33:34 +02:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2022-01-15 08:47:31 -08:00
…
…
2022-01-09 10:36:51 -07:00
…
…
…
…
…
…
…
2021-11-12 10:19:09 -08:00
…
…
…
…
…
…
…
2021-11-17 10:36:15 -05:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2021-12-10 17:10:55 -08:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2021-12-10 12:51:28 +01:00
…
…
…
…
…
2021-12-01 00:06:43 +01:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2022-01-15 08:47:31 -08:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2022-01-20 08:52:54 +02:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2022-01-04 13:15:33 -05:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2021-12-17 09:06:15 +01:00
…
…
…
2021-12-20 09:03:05 +01:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2021-12-16 22:22:20 +01:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2022-01-12 10:14:09 -06:00
…
…
…
…
…
…
…
…
2021-11-16 19:07:53 -08:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2022-01-22 08:33:37 +02:00
…
2022-01-08 12:43:57 -06:00
…
…
…
…
…
…
…
…
…
2021-11-18 09:36:39 +01:00
…
2022-01-24 14:45:02 +01:00
…
…
…
…
…
2021-11-30 17:25:20 -08:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2022-01-22 08:33:37 +02:00
…
…
…
…
…
…
…
…
…
2022-01-22 08:33:38 +02:00
…
…
2021-11-16 13:10:34 +00:00
…
…
…
…
…
…
2021-10-26 14:58:45 +01:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2021-11-03 11:41:25 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2021-11-25 18:35:23 +01:00
…
…
…
…
…
…
…
…
…
…
2021-12-30 12:13:04 +01:00
…
…
…
…
…
…
…
…
…
2022-01-14 18:50:52 -05:00
…
…
…
…
…
…
…
…
…
2021-12-09 10:49:56 -08:00
…
…
2022-01-08 00:28:41 -05:00
…
…
…
…
…
…
…
…
…