History

bpf: allow wide aligned loads for bpf_sock_addr user_ip6 and msg_src_ip6

Add explicit check for u64 loads of user_ip6 and msg_src_ip6 and update the comment.

Stanislav Fomichev committed 7 years ago

Commit d4ecfeb1 parent b4399542 files · +13 −3Browse files

Showing the changes to include/uapi/linux (1 of 2 files). Show all

Unified · Split

include/uapi/linux/bpf.h+2−2
@@ -3248,7 +3248,7 @@ struct bpf_sock_addr { · 3247 unmodified lines
32483248 __u32 user_ip4; /* Allows 1,2,4-byte read and 4-byte write.
32493249 * Stored in network byte order.
32503250 */
3251− __u32 user_ip6[4]; /* Allows 1,2,4-byte read and 4,8-byte write.
3251+ __u32 user_ip6[4]; /* Allows 1,2,4,8-byte read and 4,8-byte write.
32523252 * Stored in network byte order.
32533253 */
32543254 __u32 user_port; /* Allows 4-byte read and write.
@@ -3260,7 +3260,7 @@ struct bpf_sock_addr { · 5 unmodified lines
32603260 __u32 msg_src_ip4; /* Allows 1,2,4-byte read and 4-byte write.
32613261 * Stored in network byte order.
32623262 */
3263− __u32 msg_src_ip6[4]; /* Allows 1,2,4-byte read and 4,8-byte write.
3263+ __u32 msg_src_ip6[4]; /* Allows 1,2,4,8-byte read and 4,8-byte write.
32643264 * Stored in network byte order.
32653265 */
32663266 __bpf_md_ptr(struct bpf_sock *, sk);