aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/libxed.py
diff options
context:
space:
mode:
authorAlexander Lobakin <[email protected]>2024-03-27 15:22:41 +0100
committerJakub Kicinski <[email protected]>2024-03-28 18:50:47 -0700
commit93d24acfa05ebe954ec1782bca374de2501a5830 (patch)
tree1da137ec4c75662d71f257e3591dd8c406caf23a /tools/perf/scripts/python/libxed.py
parentc00d33f1fc7958e6e7f461c994fa025aa2273c13 (diff)
idpf: sprinkle __counted_by{,_le}() in the virtchnl2 header
Both virtchnl2.h and its consumer idpf_virtchnl.c are very error-prone. There are 10 structures with flexible arrays at the end, but 9 of them has flex member counter in Little Endian. Make the code a bit more robust by applying __counted_by_le() to those 9. LE platforms is the main target for this driver, so they would receive additional protection. While we're here, add __counted_by() to virtchnl2_ptype::proto_id, as its counter is `u8` regardless of the Endianness. Compile test on x86_64 (LE) didn't reveal any new issues after applying the attributes. Acked-by: Kees Cook <[email protected]> Acked-by: Gustavo A. R. Silva <[email protected]> Signed-off-by: Alexander Lobakin <[email protected]> Reviewed-by: Przemek Kitszel <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/libxed.py')
0 files changed, 0 insertions, 0 deletions