jit_context
static int handle_body(struct jit_context *ctx)
static int jit_prepare_early_mem_alloc(struct jit_context *ctx)
static int jit_prepare_final_mem_alloc(struct jit_context *ctx)
static int jit_prepare(struct jit_context *ctx)
static int jit_compile(struct jit_context *ctx)
static int jit_finalize(struct jit_context *ctx)
static int jit_resume_context(struct jit_context *ctx)
static int jit_patch_relocations(struct jit_context *ctx)
struct jit_context ctx;
struct jit_context ctx;
static void jit_dump(const struct jit_context *ctx)
static int jit_ctx_init(struct jit_context *ctx, struct bpf_prog *prog)
static inline bool offsets_available(const struct jit_context *ctx)
static inline void maybe_free(struct jit_context *ctx, void **mem)
static void jit_ctx_cleanup(struct jit_context *ctx)
static void analyze_reg_usage(struct jit_context *ctx)
static inline int jit_buffer_check(const struct jit_context *ctx)
static inline void jit_buffer_update(struct jit_context *ctx, u32 n)
static inline u8 *effective_jit_buf(const struct jit_context *ctx)
static int handle_prologue(struct jit_context *ctx)
static int handle_epilogue(struct jit_context *ctx)
static inline s32 get_index_for_insn(const struct jit_context *ctx,
static inline s32 get_target_index_for_insn(const struct jit_context *ctx,
static inline void set_need_for_extra_pass(struct jit_context *ctx)
static inline bool check_insn_idx_valid(const struct jit_context *ctx,
static int check_bpf_jump(const struct jit_context *ctx,
static u32 get_curr_jit_off(const struct jit_context *ctx,
static u32 get_targ_jit_off(const struct jit_context *ctx,
static int handle_jumps(const struct jit_context *ctx,
static int handle_jmp_epilogue(struct jit_context *ctx,
static int handle_call(struct jit_context *ctx,
static int handle_ld_imm64(struct jit_context *ctx,
static int handle_insn(struct jit_context *ctx, u32 idx)
int push_regs(struct jit_context *ctx, u32 mask, u32 excl, int depth)
int pop_regs(struct jit_context *ctx, u32 mask, u32 excl, int depth)
int get_target(struct jit_context *ctx, u32 loc)
int get_offset(const struct jit_context *ctx, int off)
void emit_mov_i(struct jit_context *ctx, u8 dst, s32 imm)
void emit_mov_r(struct jit_context *ctx, u8 dst, u8 src)
void emit_alu_i(struct jit_context *ctx, u8 dst, s32 imm, u8 op)
void emit_alu_r(struct jit_context *ctx, u8 dst, u8 src, u8 op)
void emit_atomic_r(struct jit_context *ctx, u8 dst, u8 src, s16 off, u8 code)
void emit_cmpxchg_r(struct jit_context *ctx, u8 dst, u8 src, u8 res, s16 off)
void emit_bswap_r(struct jit_context *ctx, u8 dst, u32 width)
static void setup_jmp(struct jit_context *ctx, u8 bpf_op,
void setup_jmp_i(struct jit_context *ctx, s32 imm, u8 width,
void setup_jmp_r(struct jit_context *ctx, bool same_reg,
int finish_jmp(struct jit_context *ctx, u8 jit_op, s16 bpf_off)
void emit_jmp_i(struct jit_context *ctx, u8 dst, s32 imm, s32 off, u8 op)
void emit_jmp_r(struct jit_context *ctx, u8 dst, u8 src, s32 off, u8 op)
int emit_ja(struct jit_context *ctx, s16 off)
int emit_exit(struct jit_context *ctx)
static int build_body(struct jit_context *ctx)
static void set_convert_flag(struct jit_context *ctx, bool enable)
struct jit_context ctx;
static inline void access_reg(struct jit_context *ctx, u8 reg)
static inline void clobber_reg(struct jit_context *ctx, u8 reg)
int push_regs(struct jit_context *ctx, u32 mask, u32 excl, int depth);
int pop_regs(struct jit_context *ctx, u32 mask, u32 excl, int depth);
int get_target(struct jit_context *ctx, u32 loc);
int get_offset(const struct jit_context *ctx, int off);
void emit_mov_i(struct jit_context *ctx, u8 dst, s32 imm);
void emit_mov_r(struct jit_context *ctx, u8 dst, u8 src);
void emit_alu_i(struct jit_context *ctx, u8 dst, s32 imm, u8 op);
void emit_alu_r(struct jit_context *ctx, u8 dst, u8 src, u8 op);
void emit_atomic_r(struct jit_context *ctx, u8 dst, u8 src, s16 off, u8 code);
void emit_cmpxchg_r(struct jit_context *ctx, u8 dst, u8 src, u8 res, s16 off);
void emit_bswap_r(struct jit_context *ctx, u8 dst, u32 width);
void setup_jmp_i(struct jit_context *ctx, s32 imm, u8 width,
void setup_jmp_r(struct jit_context *ctx, bool same_reg,
int finish_jmp(struct jit_context *ctx, u8 jit_op, s16 bpf_off);
void emit_jmp_i(struct jit_context *ctx, u8 dst, s32 imm, s32 off, u8 op);
void emit_jmp_r(struct jit_context *ctx, u8 dst, u8 src, s32 off, u8 op);
int emit_ja(struct jit_context *ctx, s16 off);
int emit_exit(struct jit_context *ctx);
void build_prologue(struct jit_context *ctx);
void build_epilogue(struct jit_context *ctx, int dest_reg);
int build_insn(const struct bpf_insn *insn, struct jit_context *ctx);
static void emit_sltu_r64(struct jit_context *ctx, u8 rd,
static void emit_slti_r64(struct jit_context *ctx, u8 rd,
static void emit_slt_r64(struct jit_context *ctx, u8 rd,
static void emit_jmp_i64(struct jit_context *ctx,
static void emit_jmp_r64(struct jit_context *ctx,
static int emit_call(struct jit_context *ctx, const struct bpf_insn *insn)
static int emit_tail_call(struct jit_context *ctx)
void build_prologue(struct jit_context *ctx)
void build_epilogue(struct jit_context *ctx, int dest_reg)
int build_insn(const struct bpf_insn *insn, struct jit_context *ctx)
static void clobber_reg64(struct jit_context *ctx, const u8 reg[])
static void emit_mov_se_i64(struct jit_context *ctx, const u8 dst[], s32 imm)
static void emit_zext_ver(struct jit_context *ctx, const u8 dst[])
static void emit_load_delay(struct jit_context *ctx)
static void emit_alu_i64(struct jit_context *ctx,
static void emit_alu_r64(struct jit_context *ctx,
static void emit_neg_i64(struct jit_context *ctx, const u8 dst[])
static void emit_shift_i64(struct jit_context *ctx,
static void emit_shift_r64(struct jit_context *ctx,
static void emit_mul_i64(struct jit_context *ctx, const u8 dst[], s32 imm)
static void emit_mul_r64(struct jit_context *ctx,
static void emit_divmod_r64(struct jit_context *ctx,
static void emit_swap8_r(struct jit_context *ctx, u8 dst, u8 src, u8 mask)
static void emit_swap16_r(struct jit_context *ctx, u8 dst, u8 src)
static void emit_bswap_r64(struct jit_context *ctx, const u8 dst[], u32 width)
static void emit_trunc_r64(struct jit_context *ctx, const u8 dst[], u32 width)
static void emit_ldx(struct jit_context *ctx,
static void emit_stx(struct jit_context *ctx,
static void emit_atomic_r32(struct jit_context *ctx,
static void emit_atomic_r64(struct jit_context *ctx,
static void emit_cmpxchg_r32(struct jit_context *ctx, u8 dst, u8 src, s16 off)
static void emit_cmpxchg_r64(struct jit_context *ctx,
static void emit_movz_r(struct jit_context *ctx, u8 rd, u8 rs, u8 rt)
static void emit_movn_r(struct jit_context *ctx, u8 rd, u8 rs, u8 rt)
static void emit_sltiu_r64(struct jit_context *ctx, u8 rd,
static void emit_zext(struct jit_context *ctx, u8 dst)
static void emit_zext_ver(struct jit_context *ctx, u8 dst)
static void emit_mov_i64(struct jit_context *ctx, u8 dst, u64 imm64)
static void emit_alu_i64(struct jit_context *ctx, u8 dst, s32 imm, u8 op)
static void emit_alu_r64(struct jit_context *ctx, u8 dst, u8 src, u8 op)
static void emit_swap_r64(struct jit_context *ctx, u8 dst, u8 mask, u32 bits)
static void emit_bswap_r64(struct jit_context *ctx, u8 dst, u32 width)
static void emit_trunc_r64(struct jit_context *ctx, u8 dst, u32 width)
static void emit_ldx(struct jit_context *ctx, u8 dst, u8 src, s16 off, u8 size)
static void emit_stx(struct jit_context *ctx, u8 dst, u8 src, s16 off, u8 size)
static void emit_atomic_r64(struct jit_context *ctx,
static void emit_cmpxchg_r64(struct jit_context *ctx, u8 dst, u8 src, s16 off)
static int emit_call(struct jit_context *ctx, const struct bpf_insn *insn)
static int emit_tail_call(struct jit_context *ctx)
void build_prologue(struct jit_context *ctx)
void build_epilogue(struct jit_context *ctx, int dest_reg)
int build_insn(const struct bpf_insn *insn, struct jit_context *ctx)
static void emit_sext(struct jit_context *ctx, u8 dst, u8 src)
int oldproglen, struct jit_context *ctx, bool jmp_padding)
struct jit_context ctx;
struct jit_context ctx = {};
struct jit_context *ctx)
struct jit_context *ctx)
int oldproglen, struct jit_context *ctx)
struct jit_context ctx = {};