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
3248 __u32 user_ip4; /* Allows 1,2,4-byte read and 4-byte write.3248 __u32 user_ip4; /* Allows 1,2,4-byte read and 4-byte write.
3249 * Stored in network byte order.3249 * Stored in network byte order.
3250 */3250 */
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.
3252 * Stored in network byte order.3252 * Stored in network byte order.
3253 */3253 */
3254 __u32 user_port; /* Allows 4-byte read and write.3254 __u32 user_port; /* Allows 4-byte read and write.
@@ -3260,7 +3260,7 @@ struct bpf_sock_addr { · 5 unmodified lines
3260 __u32 msg_src_ip4; /* Allows 1,2,4-byte read and 4-byte write.3260 __u32 msg_src_ip4; /* Allows 1,2,4-byte read and 4-byte write.
3261 * Stored in network byte order.3261 * Stored in network byte order.
3262 */3262 */
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.
3264 * Stored in network byte order.3264 * Stored in network byte order.
3265 */3265 */
3266 __bpf_md_ptr(struct bpf_sock *, sk);3266 __bpf_md_ptr(struct bpf_sock *, sk);