aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/prog_tests/prog_array_init.c
diff options
context:
space:
mode:
authorKees Cook <[email protected]>2023-02-04 10:33:56 -0800
committerChristian Brauner <[email protected]>2023-06-02 10:30:09 +0200
commit820eb59da8c7ca7e705a02f37dda2be316807847 (patch)
tree10f2c7cf9147e8be8197a109963a9a4656fe8d44 /tools/testing/selftests/bpf/prog_tests/prog_array_init.c
parentea2b62f305893992156a798f665847e0663c9f41 (diff)
jfs: Use unsigned variable for length calculations
To avoid confusing the compiler about possible negative sizes, switch "ssize" which can never be negative from int to u32. Seen with GCC 13: ../fs/jfs/namei.c: In function 'jfs_symlink': ../include/linux/fortify-string.h:57:33: warning: '__builtin_memcpy' pointer overflow between offset 0 and size [-2147483648, -1] [-Warray-bounds=] 57 | #define __underlying_memcpy __builtin_memcpy | ^ ... ../fs/jfs/namei.c:950:17: note: in expansion of macro 'memcpy' 950 | memcpy(ip->i_link, name, ssize); | ^~~~~~ Cc: Dave Kleikamp <[email protected]> Cc: Christian Brauner <[email protected]> Cc: Dave Chinner <[email protected]> Cc: [email protected] Signed-off-by: Kees Cook <[email protected]> Acked-by: Jeff Xu <[email protected]> Message-Id: <[email protected]> Signed-off-by: Christian Brauner <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/prog_array_init.c')
0 files changed, 0 insertions, 0 deletions