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 upstream version of the source the unprivileged_ebpf_enabled
function has a 2nd definition that is included when CONFIG_BPF_SYSCALL is
not set:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/include/linux/bpf.h?id=v4.19.234#n653

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.

Reply via email to