• Daniel Borkmann's avatar
    bpf, verifier: reject xadd on flow key memory · 4b5defde
    Daniel Borkmann authored
    We should not enable xadd operation for flow key memory if not
    needed there anyway. There is no such issue as described in the
    commit f37a8cb8 ("bpf: reject stores into ctx via st and xadd")
    since there's no context rewriter for flow keys today, but it
    also shouldn't become part of the user facing behavior to allow
    for it. After patch:
    
      0: (79) r7 = *(u64 *)(r1 +144)
      1: (b7) r3 = 4096
      2: (db) lock *(u64 *)(r7 +0) += r3
      BPF_XADD stores into R7 flow_keys is not allowed
    Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
    Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
    4b5defde
verifier.c 186 KB