diff options
author | Jakub Kicinski <kuba@kernel.org> | 2025-05-09 08:42:13 -0700 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2025-05-13 13:22:32 +0200 |
commit | 25e37418c87249369fe546f2cb6af578c16b68b9 (patch) | |
tree | 9a4f9f12a27cede2744484a665d2d89afa3717eb /tools/perf/scripts/python/export-to-sqlite.py | |
parent | 9ba8e351efd4d003a7fc22bc7455f0e95665cf44 (diff) |
tools: ynl-gen: support struct for binary attributes
Support using a struct pointer for binary attrs. Len field is maintained
because the structs may grow with newer kernel versions. Or, which matters
more, be shorter if the binary is built against newer uAPI than kernel
against which it's executed. Since we are storing a pointer to a struct
type - always allocate at least the amount of memory needed by the struct
per current uAPI headers (unused mem is zeroed). Technically users should
check the length field but per modern ASAN checks storing a short object
under a pointer seems like a bad idea.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Donald Hunter <donald.hunter@gmail.com>
Link: https://patch.msgid.link/20250509154213.1747885-4-kuba@kernel.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions