Blob Blame History Raw
From: Andrii Nakryiko <andrii@kernel.org>
Date: Mon, 11 Jan 2021 23:55:14 -0800
Subject: bpf: Add bpf_patch_call_args prototype to include/linux/bpf.h
Patch-mainline: v5.12-rc1
Git-commit: a643bff752dcf72a07e1b2ab2f8587e4f51118be
References: bsc#1177028

Add bpf_patch_call_args() prototype. This function is called from BPF verifier
and only if CONFIG_BPF_JIT_ALWAYS_ON is not defined. This fixes compiler
warning about missing prototype in some kernel configurations.

Fixes: 1ea47e01ad6e ("bpf: add support for bpf_call to interpreter")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/bpf/20210112075520.4103414-2-andrii@kernel.org
Acked-by: Gary Lin <glin@suse.com>
---
 include/linux/bpf.h |    3 +++
 1 file changed, 3 insertions(+)

--- a/include/linux/bpf.h
+++ b/include/linux/bpf.h
@@ -1290,7 +1290,10 @@ static inline void bpf_long_memcpy(void
 /* verify correctness of eBPF program */
 int bpf_check(struct bpf_prog **fp, union bpf_attr *attr,
 	      union bpf_attr __user *uattr);
+
+#ifndef CONFIG_BPF_JIT_ALWAYS_ON
 void bpf_patch_call_args(struct bpf_insn *insn, u32 stack_depth);
+#endif
 
 /* Map specifics */
 struct xdp_buff;