mbox series

[bpf-next,v2,0/2] add hwtstamp to __sk_buff

Message ID 20210904001901.16771-1-vfedorenko@novek.ru
Headers show
Series add hwtstamp to __sk_buff | expand

Message

Vadim Fedorenko Sept. 4, 2021, 12:18 a.m. UTC
This patch set adds hardware timestamps to __sk_buff. The first patch
implements feature, the second one adds a selftest.

v1 -> v2:

* Fixed bpf_skb_is_valid_access() to provide correct access to field
* Added explicit test to deny access to padding area
* Added verifier selftest to check for denied access to padding area

Vadim Fedorenko (2):
  bpf: add hardware timestamp field to __sk_buff
  selftests/bpf: test new __sk_buff field hwtstamp

 include/uapi/linux/bpf.h                      |  2 +
 lib/test_bpf.c                                |  1 +
 net/bpf/test_run.c                            |  8 +++
 net/core/filter.c                             | 21 +++++++
 tools/include/uapi/linux/bpf.h                |  2 +
 .../selftests/bpf/prog_tests/skb_ctx.c        |  1 +
 .../selftests/bpf/progs/test_skb_ctx.c        |  2 +
 .../testing/selftests/bpf/verifier/ctx_skb.c  | 60 +++++++++++++++++++
 8 files changed, 97 insertions(+)

Comments

Martin KaFai Lau Sept. 7, 2021, 7:09 p.m. UTC | #1
On Sat, Sep 04, 2021 at 03:18:59AM +0300, Vadim Fedorenko wrote:
> This patch set adds hardware timestamps to __sk_buff. The first patch

> implements feature, the second one adds a selftest.

> 

> v1 -> v2:

> 

> * Fixed bpf_skb_is_valid_access() to provide correct access to field

> * Added explicit test to deny access to padding area

> * Added verifier selftest to check for denied access to padding area

Acked-by: Martin KaFai Lau <kafai@fb.com>
Andrii Nakryiko Sept. 9, 2021, 4:08 a.m. UTC | #2
On Tue, Sep 7, 2021 at 12:11 PM Martin KaFai Lau <kafai@fb.com> wrote:
>

> On Sat, Sep 04, 2021 at 03:18:59AM +0300, Vadim Fedorenko wrote:

> > This patch set adds hardware timestamps to __sk_buff. The first patch

> > implements feature, the second one adds a selftest.

> >

> > v1 -> v2:

> >

> > * Fixed bpf_skb_is_valid_access() to provide correct access to field

> > * Added explicit test to deny access to padding area

> > * Added verifier selftest to check for denied access to padding area

> Acked-by: Martin KaFai Lau <kafai@fb.com>


This patch set doesn't apply cleanly anymore ([0]). Please collect
Acks, rebase, and resubmit. Thanks!

  [0] https://github.com/kernel-patches/bpf/pull/1718#issuecomment-914717959