diff options
author | Joanne Koong <joannelkoong@gmail.com> | 2022-07-12 14:06:03 -0700 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2022-07-13 14:45:58 -0700 |
commit | 8ab4cdcf03d0b060fbf73f76460f199bbd759ff7 (patch) | |
tree | 76cea5c5b7aaad1c7f0b8c4b78fe7d8b22dd5717 /samples/bpf/test_cgrp2_attach.c | |
parent | 8ed2f5a6f385b5fff313208b90ea83f7121bd909 (diff) | |
download | lwn-8ab4cdcf03d0b060fbf73f76460f199bbd759ff7.tar.gz lwn-8ab4cdcf03d0b060fbf73f76460f199bbd759ff7.zip |
bpf: Tidy up verifier check_func_arg()
This patch does two things:
1. For matching against the arg type, the match should be against the
base type of the arg type, since the arg type can have different
bpf_type_flags set on it.
2. Uses switch casing to improve readability + efficiency.
Signed-off-by: Joanne Koong <joannelkoong@gmail.com>
Acked-by: Hao Luo <haoluo@google.com>
Link: https://lore.kernel.org/r/20220712210603.123791-1-joannelkoong@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'samples/bpf/test_cgrp2_attach.c')
0 files changed, 0 insertions, 0 deletions