aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/bpf/core.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/kernel/bpf/core.c b/kernel/bpf/core.c
index fddd76b1b627..2831ba1e71c1 100644
--- a/kernel/bpf/core.c
+++ b/kernel/bpf/core.c
@@ -1154,12 +1154,22 @@ const struct bpf_func_proto bpf_tail_call_proto = {
1154 .arg3_type = ARG_ANYTHING, 1154 .arg3_type = ARG_ANYTHING,
1155}; 1155};
1156 1156
1157/* For classic BPF JITs that don't implement bpf_int_jit_compile(). */ 1157/* Stub for JITs that only support cBPF. eBPF programs are interpreted.
1158 * It is encouraged to implement bpf_int_jit_compile() instead, so that
1159 * eBPF and implicitly also cBPF can get JITed!
1160 */
1158struct bpf_prog * __weak bpf_int_jit_compile(struct bpf_prog *prog) 1161struct bpf_prog * __weak bpf_int_jit_compile(struct bpf_prog *prog)
1159{ 1162{
1160 return prog; 1163 return prog;
1161} 1164}
1162 1165
1166/* Stub for JITs that support eBPF. All cBPF code gets transformed into
1167 * eBPF by the kernel and is later compiled by bpf_int_jit_compile().
1168 */
1169void __weak bpf_jit_compile(struct bpf_prog *prog)
1170{
1171}
1172
1163bool __weak bpf_helper_changes_pkt_data(void *func) 1173bool __weak bpf_helper_changes_pkt_data(void *func)
1164{ 1174{
1165 return false; 1175 return false;