diff options
author | Stanislav Fomichev <[email protected]> | 2019-07-01 10:38:39 -0700 |
---|---|---|
committer | Daniel Borkmann <[email protected]> | 2019-07-08 16:22:55 +0200 |
commit | 600c70bad6594cb124c641ed05355ca134650ea4 (patch) | |
tree | 64b117309f808caca760fc11a37284880654eda3 /drivers/fpga/fpga-bridge.c | |
parent | d2850ce0bdd772a85043b1f07af99205b96e6e2a (diff) |
bpf: allow wide (u64) aligned stores for some fields of bpf_sock_addr
Since commit cd17d7770578 ("bpf/tools: sync bpf.h") clang decided
that it can do a single u64 store into user_ip6[2] instead of two
separate u32 ones:
# 17: (18) r2 = 0x100000000000000
# ; ctx->user_ip6[2] = bpf_htonl(DST_REWRITE_IP6_2);
# 19: (7b) *(u64 *)(r1 +16) = r2
# invalid bpf_context access off=16 size=8
>From the compiler point of view it does look like a correct thing
to do, so let's support it on the kernel side.
Credit to Andrii Nakryiko for a proper implementation of
bpf_ctx_wide_store_ok.
Cc: Andrii Nakryiko <[email protected]>
Cc: Yonghong Song <[email protected]>
Fixes: cd17d7770578 ("bpf/tools: sync bpf.h")
Reported-by: kernel test robot <[email protected]>
Acked-by: Yonghong Song <[email protected]>
Acked-by: Andrii Nakryiko <[email protected]>
Signed-off-by: Stanislav Fomichev <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Diffstat (limited to 'drivers/fpga/fpga-bridge.c')
0 files changed, 0 insertions, 0 deletions