]> git.baikalelectronics.ru Git - kernel.git/commit
bpf, offload: Reorder offload callback 'prepare' in verifier
authorYinjun Zhang <yinjun.zhang@corigine.com>
Thu, 20 May 2021 08:58:34 +0000 (10:58 +0200)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 20 May 2021 21:51:52 +0000 (23:51 +0200)
commitceb11679d9fcf3fdb358a310a38760fcbe9b63ed
treee16f4bb7a298ec677e2a71b305de8f6f60496936
parent0af02eb2a7d76ca85a1ecaf4b3775e2c86408fab
bpf, offload: Reorder offload callback 'prepare' in verifier

Commit 4976b718c355 ("bpf: Introduce pseudo_btf_id") switched the
order of resolve_pseudo_ldimm(), in which some pseudo instructions
are rewritten. Thus those rewritten instructions cannot be passed
to driver via 'prepare' offload callback.

Reorder the 'prepare' offload callback to fix it.

Fixes: 4976b718c355 ("bpf: Introduce pseudo_btf_id")
Signed-off-by: Yinjun Zhang <yinjun.zhang@corigine.com>
Signed-off-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Song Liu <songliubraving@fb.com>
Link: https://lore.kernel.org/bpf/20210520085834.15023-1-simon.horman@netronome.com
kernel/bpf/verifier.c