Package: linux-source-4.19
Version: 4.19.232-1
When attempting to build the kernel without enabling CONFIG_BPF_SYSCALL I run into the following compilation error:
CC arch/x86/kernel/cpu/bugs.o
arch/x86/kernel/cpu/bugs.c: In function 'spectre_v2_select_mitigation':
arch/x86/kernel/cpu/bugs.c:973:34: error: implicit declaration of function 'unprivileged_ebpf_enabled' [-Werror=implicit-function-declaration]
if (mode == SPECTRE_V2_EIBRS && unprivileged_ebpf_enabled())
^~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[3]: *** [scripts/Makefile.build:309: arch/x86/kernel/cpu/bugs.o] Error 1
make[2]: *** [scripts/Makefile.build:549: arch/x86/kernel/cpu] Error 2
make[1]: *** [scripts/Makefile.build:549: arch/x86/kernel] Error 2
make: *** [Makefile:1060: arch/x86] Error 2
The issue appears to be the security patches applied to include/linux/bpf.h.
In the debian version of this file the 2nd definition is present but is omitted unless CONFIG_BPF_SYSCALL is set so it's never included.