mbox series

[bpf-next,v3,0/3] bpf: allow wide (u64) aligned stores for some fields of bpf_sock_addr

Message ID 20190701173841.32249-1-sdf@google.com
Headers show
Series bpf: allow wide (u64) aligned stores for some fields of bpf_sock_addr | expand

Message

Stanislav Fomichev July 1, 2019, 5:38 p.m. UTC
Clang can generate 8-byte stores for user_ip6 & msg_src_ip6,
let's support that on the verifier side.

v3:
* fix comments spelling an -> and (Andrii Nakryiko)

v2:
* Add simple cover letter (Yonghong Song)
* Update comments (Yonghong Song)
* Remove [4] selftests (Yonghong Song)

Stanislav Fomichev (3):
  bpf: allow wide (u64) aligned stores for some fields of bpf_sock_addr
  bpf: sync bpf.h to tools/
  selftests/bpf: add verifier tests for wide stores

 include/linux/filter.h                        |  6 ++++
 include/uapi/linux/bpf.h                      |  6 ++--
 net/core/filter.c                             | 22 +++++++-----
 tools/include/uapi/linux/bpf.h                |  6 ++--
 tools/testing/selftests/bpf/test_verifier.c   | 17 +++++++--
 .../selftests/bpf/verifier/wide_store.c       | 36 +++++++++++++++++++
 6 files changed, 76 insertions(+), 17 deletions(-)
 create mode 100644 tools/testing/selftests/bpf/verifier/wide_store.c

Comments

Daniel Borkmann July 8, 2019, 3:25 p.m. UTC | #1
On 07/01/2019 07:38 PM, Stanislav Fomichev wrote:
> Clang can generate 8-byte stores for user_ip6 & msg_src_ip6,
> let's support that on the verifier side.
> 
> v3:
> * fix comments spelling an -> and (Andrii Nakryiko)
> 
> v2:
> * Add simple cover letter (Yonghong Song)
> * Update comments (Yonghong Song)
> * Remove [4] selftests (Yonghong Song)
> 
> Stanislav Fomichev (3):
>   bpf: allow wide (u64) aligned stores for some fields of bpf_sock_addr
>   bpf: sync bpf.h to tools/
>   selftests/bpf: add verifier tests for wide stores
> 
>  include/linux/filter.h                        |  6 ++++
>  include/uapi/linux/bpf.h                      |  6 ++--
>  net/core/filter.c                             | 22 +++++++-----
>  tools/include/uapi/linux/bpf.h                |  6 ++--
>  tools/testing/selftests/bpf/test_verifier.c   | 17 +++++++--
>  .../selftests/bpf/verifier/wide_store.c       | 36 +++++++++++++++++++
>  6 files changed, 76 insertions(+), 17 deletions(-)
>  create mode 100644 tools/testing/selftests/bpf/verifier/wide_store.c
> 

Applied, thanks!