diff options
| author | Kees Cook <[email protected]> | 2021-08-19 13:28:25 -0700 |
|---|---|---|
| committer | Kalle Valo <[email protected]> | 2021-08-21 20:15:36 +0300 |
| commit | 92276c592a6b5d7e3d99b8905429dd5c2bff4ec7 (patch) | |
| tree | ab13516102797dcfd4c6e2ec68e97bf24ae377a7 /tools/perf/scripts/python/bin/stackcollapse-record | |
| parent | d6b6d1bb80beabab43aa5f4289721e6659790f3a (diff) | |
ray_cs: Split memcpy() to avoid bounds check warning
In preparation for FORTIFY_SOURCE performing compile-time and run-time
field bounds checking for memcpy(), memmove(), and memset(), avoid
intentionally writing across neighboring fields.
Split memcpy() for each address range to help memcpy() correctly reason
about the bounds checking. Avoids the future warning:
In function 'fortify_memcpy_chk',
inlined from 'memcpy_toio' at ./include/asm-generic/io.h:1204:2,
inlined from 'ray_build_header.constprop' at drivers/net/wireless/ray_cs.c:984:3:
./include/linux/fortify-string.h:285:4: warning: call to '__write_overflow_field' declared with attribute warning: detected write beyond size of field (1st parameter); maybe use struct_group()? [-Wattribute-warning]
285 | __write_overflow_field(p_size_field, size);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Cc: Kalle Valo <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: Jakub Kicinski <[email protected]>
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Kees Cook <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-record')
0 files changed, 0 insertions, 0 deletions