Since commit 5e581dad4fec ("bpf: make unknown opcode handling more robust") the verifier also checks for opcode validity while resolving file descriptor, update the comment to reflect such fact. Signed-off-by: Shung-Hsi Yu <shung-hsi.yu@xxxxxxxx> --- kernel/bpf/verifier.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c index 9b59581026f8..79a2695ee2e2 100644 --- a/kernel/bpf/verifier.c +++ b/kernel/bpf/verifier.c @@ -12350,7 +12350,8 @@ static bool bpf_map_is_cgroup_storage(struct bpf_map *map) map->map_type == BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE); } -/* find and rewrite pseudo imm in ld_imm64 instructions: +/* check the opcodes of all instructions, and find and rewrite pseudo imm in + * ld_imm64 instructions: * * 1. if it accesses map FD, replace it with actual map pointer. * 2. if it accesses btf_id of a VAR, replace it with pointer to the var. -- 2.36.1