aboutsummaryrefslogtreecommitdiffstats
path: root/lib/test_stackinit.c
diff options
context:
space:
mode:
authorKees Cook <[email protected]>2022-02-10 00:40:41 +0000
committerKees Cook <[email protected]>2022-02-16 22:30:37 +0000
commit230f6fa2c1db6a3f3e668cfe95995ac8e6eee212 (patch)
tree0efbee5d1df73b95483adf495bb6e2232342fc7d /lib/test_stackinit.c
parentoverflow: Implement size_t saturating arithmetic helpers (diff)
downloadkernel-230f6fa2c1db6a3f3e668cfe95995ac8e6eee212.tar.gz
kernel-230f6fa2c1db6a3f3e668cfe95995ac8e6eee212.zip
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 <[email protected]> Cc: Nathan Chancellor <[email protected]> Cc: Nick Desaulniers <[email protected]> Cc: Rasmus Villemoes <[email protected]> Signed-off-by: Kees Cook <[email protected]> Reviewed-by: Gustavo A. R. Silva <[email protected]> Tested-by: Gustavo A. R. Silva <[email protected]> Link: https://lore.kernel.org/lkml/20220210010407.GA701603@embeddedor
Diffstat (limited to 'lib/test_stackinit.c')
0 files changed, 0 insertions, 0 deletions