diff options
author | Kees Cook <[email protected]> | 2023-09-22 10:52:57 -0700 |
---|---|---|
committer | Krzysztof Wilczyński <[email protected]> | 2023-10-14 20:02:55 +0000 |
commit | f741bcadfe52e424985926d4d1c1e3941bf8403e (patch) | |
tree | 1b2c1f198e26da15997248d937197cc14a646841 /tools/perf/util/trace-event-scripting.c | |
parent | 0bb80ecc33a8fb5a682236443c1e740d5c917d1d (diff) |
PCI: hv: Annotate struct hv_dr_state 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 hv_dr_state.
[1] https://github.com/kees/kernel-tools/blob/trunk/coccinelle/examples/counted_by.cocci
Link: https://lore.kernel.org/linux-pci/[email protected]
Signed-off-by: Kees Cook <[email protected]>
Signed-off-by: Krzysztof Wilczyński <[email protected]>
Reviewed-by: "Gustavo A. R. Silva" <[email protected]>
Acked-by: Wei Liu <[email protected]>
Cc: Bjorn Helgaas <[email protected]>
Cc: Dexuan Cui <[email protected]>
Cc: Haiyang Zhang <[email protected]>
Cc: "K. Y. Srinivasan" <[email protected]>
Cc: Krzysztof Wilczyński <[email protected]>
Cc: Lorenzo Pieralisi <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Wei Liu <[email protected]>
Cc: [email protected]
Cc: [email protected]
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions