#include <linux/moduleloader.h>
#include <linux/netdevice.h>
#include <linux/filter.h>
#include <asm/cacheflush.h>
#include <asm/processor.h>
#include <asm/facility.h>
Go to the source code of this file.
#define BPF_SIZE_MAX 4096 /* Max size for program */ |
Value:({ \
if (jit->prg + 2 <= jit->mid) \
*(
u16 *) jit->prg =
op; \
jit->prg += 2; \
})
Definition at line 71 of file bpf_jit_comp.c.
Value:({ \
if (jit->prg + 4 <= jit->mid) \
*(
u32 *) jit->prg =
op; \
jit->prg += 4; \
})
Definition at line 78 of file bpf_jit_comp.c.
#define EMIT4_DISP |
( |
|
op, |
|
|
|
disp |
|
) |
| |
Value:({ \
unsigned int __disp = (disp) & 0xfff; \
})
Definition at line 85 of file bpf_jit_comp.c.
#define EMIT4_IMM |
( |
|
op, |
|
|
|
imm |
|
) |
| |
Value:({ \
unsigned int __imm = (imm) & 0xffff; \
})
Definition at line 91 of file bpf_jit_comp.c.
#define EMIT4_PCREL |
( |
|
op, |
|
|
|
pcrel |
|
) |
| |
Value:({ \
long __pcrel = ((pcrel) >> 1) & 0xffff; \
})
Definition at line 97 of file bpf_jit_comp.c.
#define EMIT6 |
( |
|
op1, |
|
|
|
op2 |
|
) |
| |
Value:({ \
if (jit->prg + 6 <= jit->mid) { \
*(
u32 *) jit->prg = op1; \
*(
u16 *) (jit->prg + 4) = op2; \
} \
jit->prg += 6; \
})
Definition at line 103 of file bpf_jit_comp.c.
#define EMIT6_DISP |
( |
|
op1, |
|
|
|
op2, |
|
|
|
disp |
|
) |
| |
Value:({ \
unsigned int __disp = (disp) & 0xfff; \
EMIT6(op1 | __disp, op2); \
})
Definition at line 112 of file bpf_jit_comp.c.
#define EMIT6_IMM |
( |
|
op, |
|
|
|
imm |
|
) |
| |
Value:({ \
unsigned int __imm = (imm); \
EMIT6(
op | (__imm >> 16), __imm & 0xffff); \
})
Definition at line 118 of file bpf_jit_comp.c.
#define EMIT_CONST |
( |
|
val | ) |
|
Value:({ \
ret = (
unsigned int) (jit->lit - jit->base_ip); \
if (jit->lit + 4 <= jit->end) \
jit->lit += 4; \
ret; \
})
Definition at line 124 of file bpf_jit_comp.c.
#define EMIT_FN_CONST |
( |
|
bit, |
|
|
|
fn |
|
) |
| |
Value:({ \
ret = (
unsigned int) (jit->lit - jit->base_ip); \
if (jit->lit + 8 <= jit->end) \
*(
void **) jit->lit =
fn; \
jit->lit += 8; \
} \
ret; \
})
Definition at line 135 of file bpf_jit_comp.c.
#define SEEN_DATAREF 1 /* might call external helpers */ |
#define SEEN_LITERAL 16 /* code uses literals */ |
#define SEEN_MEM 4 /* use mem[] for temporary storage */ |
#define SEEN_RET0 8 /* pc_ret0 points to a valid return 0 */ |