Re: [net-next PATCH 5/9] bpf: more SK_SKB selftests

Alexei Starovoitov
2017-08-28T17:38:35Z

On Mon, Aug 28, 2017 at 07:11:24AM -0700, John Fastabend wrote:
> Tests packet read/writes and additional skb fields.
>
> Signed-off-by: John Fastabend <john.fastabend@gmail.com>

Acked-by: Alexei Starovoitov <ast@kernel.org>

> {
> + "invalid access of tc_classid for SK_SKB",
> + .insns = {
> + BPF_LDX_MEM(BPF_W, BPF_REG_0, BPF_REG_1,
> + offsetof(struct __sk_buff, tc_classid)),
> + BPF_EXIT_INSN(),
> + },
> + .result = REJECT,
> + .prog_type = BPF_PROG_TYPE_SK_SKB,
> + .errstr = "invalid bpf_context access",

it shouldn't be readable eight, right?