OSDN Git Service

bpf: Drop disabled LSM hooks from the sleepable set
authorMikko Ylinen <mikko.ylinen@linux.intel.com>
Mon, 25 Jan 2021 06:39:36 +0000 (08:39 +0200)
committerDaniel Borkmann <daniel@iogearbox.net>
Tue, 26 Jan 2021 16:08:50 +0000 (17:08 +0100)
commit78031381ae9c88f4f914d66154f4745122149c58
tree2a2f324c5b42a5161314604d2cfc79aebd52cce2
parentb9557caaf872271671bdc1ef003d72f421eb72f6
bpf: Drop disabled LSM hooks from the sleepable set

Some networking and keys LSM hooks are conditionally enabled
and when building the new sleepable BPF LSM hooks with those
LSM hooks disabled, the following build error occurs:

  BTFIDS  vmlinux
  FAILED unresolved symbol bpf_lsm_socket_socketpair

To fix the error, conditionally add the relevant networking/keys
LSM hooks to the sleepable set.

Fixes: 423f16108c9d8 ("bpf: Augment the set of sleepable LSM hooks")
Signed-off-by: Mikko Ylinen <mikko.ylinen@linux.intel.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: KP Singh <kpsingh@kernel.org>
Link: https://lore.kernel.org/bpf/20210125063936.89365-1-mikko.ylinen@linux.intel.com
kernel/bpf/bpf_lsm.c