This is a note to let you know that I've just added the patch titled bpf: Fix sparse warning for bpf_kptr_xchg_proto to the 5.18-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: bpf-fix-sparse-warning-for-bpf_kptr_xchg_proto.patch and it can be found in the queue-5.18 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 5b74c690e1c55953ec99fd9dab74f72dbee4fe95 Mon Sep 17 00:00:00 2001 From: Kumar Kartikeya Dwivedi <memxor@xxxxxxxxx> Date: Thu, 12 May 2022 01:16:51 +0530 Subject: bpf: Fix sparse warning for bpf_kptr_xchg_proto From: Kumar Kartikeya Dwivedi <memxor@xxxxxxxxx> commit 5b74c690e1c55953ec99fd9dab74f72dbee4fe95 upstream. Kernel Test Robot complained about missing static storage class annotation for bpf_kptr_xchg_proto variable. sparse: symbol 'bpf_kptr_xchg_proto' was not declared. Should it be static? This caused by missing extern definition in the header. Add it to suppress the sparse warning. Fixes: c0a5a21c25f3 ("bpf: Allow storing referenced kptr in map") Reported-by: kernel test robot <lkp@xxxxxxxxx> Signed-off-by: Kumar Kartikeya Dwivedi <memxor@xxxxxxxxx> Link: https://lore.kernel.org/r/20220511194654.765705-2-memxor@xxxxxxxxx Signed-off-by: Alexei Starovoitov <ast@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- include/linux/bpf.h | 1 + 1 file changed, 1 insertion(+) --- a/include/linux/bpf.h +++ b/include/linux/bpf.h @@ -2228,6 +2228,7 @@ extern const struct bpf_func_proto bpf_f extern const struct bpf_func_proto bpf_loop_proto; extern const struct bpf_func_proto bpf_strncmp_proto; extern const struct bpf_func_proto bpf_copy_from_user_task_proto; +extern const struct bpf_func_proto bpf_kptr_xchg_proto; const struct bpf_func_proto *tracing_prog_func_proto( enum bpf_func_id func_id, const struct bpf_prog *prog); Patches currently in stable-queue which might be from memxor@xxxxxxxxx are queue-5.18/bpf-allow-storing-referenced-kptr-in-map.patch queue-5.18/bpf-move-check_ptr_off_reg-before-check_map_access.patch queue-5.18/bpf-tag-argument-to-be-released-in-bpf_func_proto.patch queue-5.18/bpf-adapt-copy_map_value-for-multiple-offset-case.patch queue-5.18/bpf-wire-up-freeing-of-referenced-kptr.patch queue-5.18/bpf-fix-sparse-warning-for-bpf_kptr_xchg_proto.patch queue-5.18/bpf-populate-pairs-of-btf_id-and-destructor-kfunc-in.patch queue-5.18/bpf-suppress-passing-zero-to-ptr_err-warning.patch queue-5.18/bpf-allow-storing-unreferenced-kptr-in-map.patch queue-5.18/bpf-make-btf_find_field-more-generic.patch