diff options
author | Valdis Kletnieks <valdis.kletnieks@vt.edu> | 2019-01-29 01:04:25 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-04-05 22:33:12 +0200 |
commit | ae92cf4760f8ee21db0297299be11cf3ed09bcc9 (patch) | |
tree | 7647399ab35c0eb686a3b4ea56be44bf5e57e6fc | |
parent | 06666a19d5a5854f0936c02088f0217d2b167d6d (diff) | |
download | linux-stable-ae92cf4760f8ee21db0297299be11cf3ed09bcc9.tar.gz linux-stable-ae92cf4760f8ee21db0297299be11cf3ed09bcc9.tar.bz2 linux-stable-ae92cf4760f8ee21db0297299be11cf3ed09bcc9.zip |
bpf: fix missing prototype warnings
[ Upstream commit 116bfa96a255123ed209da6544f74a4f2eaca5da ]
Compiling with W=1 generates warnings:
CC kernel/bpf/core.o
kernel/bpf/core.c:721:12: warning: no previous prototype for ?bpf_jit_alloc_exec_limit? [-Wmissing-prototypes]
721 | u64 __weak bpf_jit_alloc_exec_limit(void)
| ^~~~~~~~~~~~~~~~~~~~~~~~
kernel/bpf/core.c:757:14: warning: no previous prototype for ?bpf_jit_alloc_exec? [-Wmissing-prototypes]
757 | void *__weak bpf_jit_alloc_exec(unsigned long size)
| ^~~~~~~~~~~~~~~~~~
kernel/bpf/core.c:762:13: warning: no previous prototype for ?bpf_jit_free_exec? [-Wmissing-prototypes]
762 | void __weak bpf_jit_free_exec(void *addr)
| ^~~~~~~~~~~~~~~~~
All three are weak functions that archs can override, provide
proper prototypes for when a new arch provides their own.
Signed-off-by: Valdis Kletnieks <valdis.kletnieks@vt.edu>
Acked-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r-- | include/linux/filter.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/filter.h b/include/linux/filter.h index 1a39d57eb88f..037610845892 100644 --- a/include/linux/filter.h +++ b/include/linux/filter.h @@ -844,7 +844,9 @@ bpf_jit_binary_alloc(unsigned int proglen, u8 **image_ptr, unsigned int alignment, bpf_jit_fill_hole_t bpf_fill_ill_insns); void bpf_jit_binary_free(struct bpf_binary_header *hdr); - +u64 bpf_jit_alloc_exec_limit(void); +void *bpf_jit_alloc_exec(unsigned long size); +void bpf_jit_free_exec(void *addr); void bpf_jit_free(struct bpf_prog *fp); struct bpf_prog *bpf_jit_blind_constants(struct bpf_prog *fp); |