linux/kernel/bpf/disasm.c

// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
/* Copyright (c) 2011-2014 PLUMgrid, http://plumgrid.com
 * Copyright (c) 2016 Facebook
 */

#include <linux/bpf.h>

#include "disasm.h"

#define __BPF_FUNC_STR_FN
static const char * const func_id_str[] =;
#undef __BPF_FUNC_STR_FN

static const char *__func_get_name(const struct bpf_insn_cbs *cbs,
				   const struct bpf_insn *insn,
				   char *buff, size_t len)
{}

static const char *__func_imm_name(const struct bpf_insn_cbs *cbs,
				   const struct bpf_insn *insn,
				   u64 full_imm, char *buff, size_t len)
{}

const char *func_id_name(int id)
{}

const char *const bpf_class_string[8] =;

const char *const bpf_alu_string[16] =;

static const char *const bpf_alu_sign_string[16] =;

static const char *const bpf_movsx_string[4] =;

static const char *const bpf_atomic_alu_string[16] =;

static const char *const bpf_ldst_string[] =;

static const char *const bpf_ldsx_string[] =;

static const char *const bpf_jmp_string[16] =;

static void print_bpf_end_insn(bpf_insn_print_t verbose,
			       void *private_data,
			       const struct bpf_insn *insn)
{}

static void print_bpf_bswap_insn(bpf_insn_print_t verbose,
			       void *private_data,
			       const struct bpf_insn *insn)
{}

static bool is_sdiv_smod(const struct bpf_insn *insn)
{}

static bool is_movsx(const struct bpf_insn *insn)
{}

static bool is_addr_space_cast(const struct bpf_insn *insn)
{}

/* Special (internal-only) form of mov, used to resolve per-CPU addrs:
 * dst_reg = src_reg + <percpu_base_off>
 * BPF_ADDR_PERCPU is used as a special insn->off value.
 */
#define BPF_ADDR_PERCPU

static inline bool is_mov_percpu_addr(const struct bpf_insn *insn)
{}

void print_bpf_insn(const struct bpf_insn_cbs *cbs,
		    const struct bpf_insn *insn,
		    bool allow_ptr_leaks)
{}