diff options
author | Kees Cook <[email protected]> | 2023-09-22 10:54:14 -0700 |
---|---|---|
committer | Bjorn Andersson <[email protected]> | 2023-09-27 16:08:31 -0700 |
commit | 433ce46a97116f431ee114b4607143860aad4054 (patch) | |
tree | 2b0404f67fe9e5bb352330ff0d499ebd767bce95 /scripts/gdb/linux/slab.py | |
parent | 9265bc6bce6919c771970e5a425a66551a1c78a0 (diff) |
soc: qcom: smem: Annotate struct qcom_smem 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 checking 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 qcom_smem.
[1] https://github.com/kees/kernel-tools/blob/trunk/coccinelle/examples/counted_by.cocci
Cc: Andy Gross <[email protected]>
Cc: Bjorn Andersson <[email protected]>
Cc: Konrad Dybcio <[email protected]>
Cc: Nathan Chancellor <[email protected]>
Cc: Nick Desaulniers <[email protected]>
Cc: Tom Rix <[email protected]>
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Kees Cook <[email protected]>
Reviewed-by: "Gustavo A. R. Silva" <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Bjorn Andersson <[email protected]>
Diffstat (limited to 'scripts/gdb/linux/slab.py')
0 files changed, 0 insertions, 0 deletions