diff options
| author | Kees Cook <[email protected]> | 2022-06-15 22:23:12 -0700 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2022-06-17 11:31:18 +0100 |
| commit | 2c0ab32b73cfe39a609192f338464e948fc39117 (patch) | |
| tree | d221c6e5ff70eddfd2d029895e490c03d7bd6d12 /tools/perf/scripts/python/event_analyzing_sample.py | |
| parent | 225b0ed27e6ac523e5e98e7395392446859c7f20 (diff) | |
hinic: Replace memcpy() with direct assignment
Under CONFIG_FORTIFY_SOURCE=y and CONFIG_UBSAN_BOUNDS=y, Clang is bugged
here for calculating the size of the destination buffer (0x10 instead of
0x14). This copy is a fixed size (sizeof(struct fw_section_info_st)), with
the source and dest being struct fw_section_info_st, so the memcpy should
be safe, assuming the index is within bounds, which is UBSAN_BOUNDS's
responsibility to figure out.
Avoid the whole thing and just do a direct assignment. This results in
no change to the executable code.
Cc: "David S. Miller" <[email protected]>
Cc: Eric Dumazet <[email protected]>
Cc: Jakub Kicinski <[email protected]>
Cc: Paolo Abeni <[email protected]>
Cc: Nathan Chancellor <[email protected]>
Cc: Nick Desaulniers <[email protected]>
Cc: Tom Rix <[email protected]>
Cc: Leon Romanovsky <[email protected]>
Cc: Jiri Pirko <[email protected]>
Cc: Vladimir Oltean <[email protected]>
Cc: Simon Horman <[email protected]>
Cc: [email protected]
Cc: [email protected]
Link: https://github.com/ClangBuiltLinux/linux/issues/1592
Signed-off-by: Kees Cook <[email protected]>
Reviewed-by: Gustavo A. R. Silva <[email protected]>
Tested-by: Nathan Chancellor <[email protected]> # build
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/event_analyzing_sample.py')
0 files changed, 0 insertions, 0 deletions