Joanne Koong 0c9a7a7e20 bpf: Verifier cleanups
This patch cleans up a few things in the verifier:

  * type_is_pkt_pointer():
    Future work (skb + xdp dynptrs [0]) will be using the reg type
    PTR_TO_PACKET | PTR_MAYBE_NULL. type_is_pkt_pointer() should return
    true for any type whose base type is PTR_TO_PACKET, regardless of
    flags attached to it.

  * reg_type_may_be_refcounted_or_null():
    Get the base type at the start of the function to avoid
    having to recompute it / improve readability

  * check_func_proto(): remove unnecessary 'meta' arg

  * check_helper_call():
    Use switch casing on the base type of return value instead of
    nested ifs on the full type

There are no functional behavior changes.

  [0] https://lore.kernel.org/bpf/20220726184706.954822-1-joannelkoong@gmail.com/

Signed-off-by: Joanne Koong <joannelkoong@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Link: https://lore.kernel.org/bpf/20220802214638.3643235-1-joannelkoong@gmail.com
2022-08-08 17:54:06 +02:00
..
2022-08-08 17:54:06 +02:00
2022-08-03 09:45:08 -07:00
2022-05-26 17:13:43 -07:00
2022-08-03 16:29:08 -07:00
2022-05-25 16:18:27 -07:00
2021-12-02 17:25:21 +09:00
2022-07-28 12:36:35 +02:00
2022-06-02 08:55:01 -07:00
2022-08-02 19:34:45 -07:00
2022-08-02 13:46:35 -07:00
2022-08-03 09:45:08 -07:00
2022-08-03 16:29:08 -07:00
2022-08-03 16:29:08 -07:00
2022-01-11 13:08:21 -08:00
2022-06-15 19:28:44 -04:00
2022-05-23 17:51:12 -07:00
2022-03-15 10:32:44 +01:00
2022-07-12 15:27:19 -07:00
2022-05-29 10:31:36 -07:00
2022-08-02 19:34:45 -07:00
2021-10-14 13:29:18 +02:00
2022-01-08 12:43:57 -06:00
2022-02-25 09:36:06 +01:00