diff options
author | Kees Cook <[email protected]> | 2023-10-03 16:18:28 -0700 |
---|---|---|
committer | Steffen Klassert <[email protected]> | 2023-10-05 08:18:19 +0200 |
commit | 1d495f1c896cfa8c78e7a858119e2fbfcbd0925e (patch) | |
tree | 7fda6f8da2830c719e24bd8959adaad66d5942cc /tools/perf/scripts/python/task-analyzer.py | |
parent | 5fa4704d14b29ca59e80212e0a067b0c83b42d42 (diff) |
xfrm: Annotate struct xfrm_sec_ctx with __counted_by
Prepare for the coming implementation by GCC and Clang of the __counted_by
attribute. Flexible array members annotated with __counted_by can have
their accesses bounds-checked at run-time via CONFIG_UBSAN_BOUNDS (for
array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family
functions).
As found with Coccinelle[1], add __counted_by for struct xfrm_sec_ctx.
Cc: Steffen Klassert <[email protected]>
Cc: Herbert Xu <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: [email protected]
Link: https://github.com/kees/kernel-tools/blob/trunk/coccinelle/examples/counted_by.cocci [1]
Signed-off-by: Kees Cook <[email protected]>
Reviewed-by: Gustavo A. R. Silva <[email protected]>
Signed-off-by: Steffen Klassert <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/task-analyzer.py')
0 files changed, 0 insertions, 0 deletions