bpf: Fix BPF_LSM kconfig symbol dependency
authorDaniel Borkmann <daniel@iogearbox.net>
Tue, 25 May 2021 18:35:29 +0000 (20:35 +0200)
committerDaniel Borkmann <daniel@iogearbox.net>
Tue, 25 May 2021 19:16:23 +0000 (21:16 +0200)
commit5c9d706f61336d9f7f285df64c734af778c70f39
tree5ea8487331d41d40d5e3d2203ca363709b565159
parent6fd5fb63820a9a1146aba0bba2fdbc1db4b903e7
bpf: Fix BPF_LSM kconfig symbol dependency

Similarly as 6bdacdb48e94 ("bpf: Fix BPF_JIT kconfig symbol dependency") we
need to detangle the hard BPF_LSM dependency on NET. This was previously
implicit by its dependency on BPF_JIT which itself was dependent on NET (but
without any actual/real hard dependency code-wise). Given the latter was
lifted, so should be the former as BPF_LSMs could well exist on net-less
systems. This therefore also fixes a randconfig build error recently reported
by Randy:

  ld: kernel/bpf/bpf_lsm.o: in function `bpf_lsm_func_proto':
  bpf_lsm.c:(.text+0x1a0): undefined reference to `bpf_sk_storage_get_proto'
  ld: bpf_lsm.c:(.text+0x1b8): undefined reference to `bpf_sk_storage_delete_proto'
  [...]

Fixes: b24abcff918a ("bpf, kconfig: Add consolidated menu entry for bpf with core options")
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
kernel/bpf/bpf_lsm.c