]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blame - kernel/bpf/disasm.h
UBUNTU: Start new release
[mirror_ubuntu-bionic-kernel.git] / kernel / bpf / disasm.h
CommitLineData
f4ac7e0b
JK
1/* Copyright (c) 2011-2014 PLUMgrid, http://plumgrid.com
2 * Copyright (c) 2016 Facebook
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of version 2 of the GNU General Public
6 * License as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * General Public License for more details.
12 */
13
14#ifndef __BPF_DISASM_H__
15#define __BPF_DISASM_H__
16
17#include <linux/bpf.h>
18#include <linux/kernel.h>
19#include <linux/stringify.h>
20
21extern const char *const bpf_alu_string[16];
22extern const char *const bpf_class_string[8];
23
24const char *func_id_name(int id);
25
26struct bpf_verifier_env;
27typedef void (*bpf_insn_print_cb)(struct bpf_verifier_env *env,
28 const char *, ...);
29void print_bpf_insn(bpf_insn_print_cb verbose, struct bpf_verifier_env *env,
30 const struct bpf_insn *insn, bool allow_ptr_leaks);
31
32#endif