diff options
| author | Kees Cook <[email protected]> | 2022-11-18 13:58:51 -0800 |
|---|---|---|
| committer | Jason Gunthorpe <[email protected]> | 2022-11-18 19:54:11 -0400 |
| commit | 8f649b57856b855f8a28724321e7ae72e31d513a (patch) | |
| tree | 12cd9b7421a64ec0a8a1e50f9768b645c5ca229b /tools/perf/scripts/python/bin/stackcollapse-record | |
| parent | 34a046f08b62fb855ac590c1f4dfb1934f1fdb64 (diff) | |
IB/hfi1: Replace 1-element array with singleton
Zero-length arrays are deprecated[1] and are being replaced with flexible
array members in support of the ongoing efforts to tighten the
FORTIFY_SOURCE routines on memcpy(), correctly instrument array indexing
with UBSAN_BOUNDS, and to globally enable -fstrict-flex-arrays=3.
Replace zero-length array with flexible-array member "lvs" in struct
opa_port_data_counters_msg and struct opa_port_error_counters64_msg.
Additionally, the "port" member of several structs is defined as a
single-element, but is only ever accessed at index 0. Replace it with a
singleton so that flexible array usage is sane.
This results in no differences in binary output.
[1] https://github.com/KSPP/linux/issues/78
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Kees Cook <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-record')
0 files changed, 0 insertions, 0 deletions