verifier.c (16d1e00c7e8a4950e914223b3112144289a82913) verifier.c (3bc253c2e652cf5f12cd8c00d80d8ec55d67d1a7)
1// SPDX-License-Identifier: GPL-2.0-only
2/* Copyright (c) 2011-2014 PLUMgrid, http://plumgrid.com
3 * Copyright (c) 2016 Facebook
4 * Copyright (c) 2018 Covalent IO, Inc. http://covalent.io
5 */
6#include <uapi/linux/btf.h>
7#include <linux/bpf-cgroup.h>
8#include <linux/kernel.h>

--- 495 unchanged lines hidden (view full) ---

504
505static bool is_ptr_cast_function(enum bpf_func_id func_id)
506{
507 return func_id == BPF_FUNC_tcp_sock ||
508 func_id == BPF_FUNC_sk_fullsock ||
509 func_id == BPF_FUNC_skc_to_tcp_sock ||
510 func_id == BPF_FUNC_skc_to_tcp6_sock ||
511 func_id == BPF_FUNC_skc_to_udp6_sock ||
1// SPDX-License-Identifier: GPL-2.0-only
2/* Copyright (c) 2011-2014 PLUMgrid, http://plumgrid.com
3 * Copyright (c) 2016 Facebook
4 * Copyright (c) 2018 Covalent IO, Inc. http://covalent.io
5 */
6#include <uapi/linux/btf.h>
7#include <linux/bpf-cgroup.h>
8#include <linux/kernel.h>

--- 495 unchanged lines hidden (view full) ---

504
505static bool is_ptr_cast_function(enum bpf_func_id func_id)
506{
507 return func_id == BPF_FUNC_tcp_sock ||
508 func_id == BPF_FUNC_sk_fullsock ||
509 func_id == BPF_FUNC_skc_to_tcp_sock ||
510 func_id == BPF_FUNC_skc_to_tcp6_sock ||
511 func_id == BPF_FUNC_skc_to_udp6_sock ||
512 func_id == BPF_FUNC_skc_to_mptcp_sock ||
512 func_id == BPF_FUNC_skc_to_tcp_timewait_sock ||
513 func_id == BPF_FUNC_skc_to_tcp_request_sock;
514}
515
516static bool is_cmpxchg_insn(const struct bpf_insn *insn)
517{
518 return BPF_CLASS(insn->code) == BPF_STX &&
519 BPF_MODE(insn->code) == BPF_ATOMIC &&

--- 14363 unchanged lines hidden ---
513 func_id == BPF_FUNC_skc_to_tcp_timewait_sock ||
514 func_id == BPF_FUNC_skc_to_tcp_request_sock;
515}
516
517static bool is_cmpxchg_insn(const struct bpf_insn *insn)
518{
519 return BPF_CLASS(insn->code) == BPF_STX &&
520 BPF_MODE(insn->code) == BPF_ATOMIC &&

--- 14363 unchanged lines hidden ---