diff options
author | Eric Biggers <ebiggers@kernel.org> | 2025-10-05 18:20:37 -0700 |
---|---|---|
committer | Andrii Nakryiko <andrii@kernel.org> | 2025-10-06 09:16:29 -0700 |
commit | 4d920ed684392ae064af62957d6f5a90312dfaf6 (patch) | |
tree | 6b2c26b86f4a0c76a3c50451db7e6c2ca8a468d3 /rust/helpers/mutex.c | |
parent | de7342228b7343774d6a9981c2ddbfb5e201044b (diff) |
libbpf: Fix undefined behavior in {get,put}_unaligned_be32()
These violate aliasing rules and may be miscompiled unless
-fno-strict-aliasing is used. Replace them with the standard memcpy()
solution. Note that compilers know how to optimize this properly.
Fixes: 4a1c9e544b8d ("libbpf: remove linux/unaligned.h dependency for libbpf_sha256()")
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Yonghong Song <yonghong.song@linux.dev>
Link: https://lore.kernel.org/bpf/20251006012037.159295-1-ebiggers@kernel.org
Diffstat (limited to 'rust/helpers/mutex.c')
0 files changed, 0 insertions, 0 deletions