mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-23 04:34:11 +08:00
9326e0f85b
Originally, bpfilter_umh was linked with -static only when CONFIG_BPFILTER_UMH=y. Commit8a2cc0505c
("bpfilter: use 'userprogs' syntax to build bpfilter_umh") silently, accidentally dropped the CONFIG_BPFILTER_UMH=y test in the Makefile. Revive it in order to link it dynamically when CONFIG_BPFILTER_UMH=m. Since commitb1183b6dca
("bpfilter: check if $(CC) can link static libc in Kconfig"), the compiler must be capable of static linking to enable CONFIG_BPFILTER_UMH, but it requires more than needed. To loosen the compiler requirement, I changed the dependency as follows: depends on CC_CAN_LINK depends on m || CC_CAN_LINK_STATIC If CONFIG_CC_CAN_LINK_STATIC in unset, CONFIG_BPFILTER_UMH is restricted to 'm' or 'n'. In theory, CONFIG_CC_CAN_LINK is not required for CONFIG_BPFILTER_UMH=y, but I did not come up with a good way to describe it. Fixes:8a2cc0505c
("bpfilter: use 'userprogs' syntax to build bpfilter_umh") Reported-by: Michal Kubecek <mkubecek@suse.cz> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Tested-by: Michal Kubecek <mkubecek@suse.cz> Link: https://lore.kernel.org/bpf/20200701092644.762234-1-masahiroy@kernel.org
23 lines
744 B
Plaintext
23 lines
744 B
Plaintext
# SPDX-License-Identifier: GPL-2.0-only
|
|
menuconfig BPFILTER
|
|
bool "BPF based packet filtering framework (BPFILTER)"
|
|
depends on NET && BPF && INET
|
|
help
|
|
This builds experimental bpfilter framework that is aiming to
|
|
provide netfilter compatible functionality via BPF
|
|
|
|
if BPFILTER
|
|
config BPFILTER_UMH
|
|
tristate "bpfilter kernel module with user mode helper"
|
|
depends on CC_CAN_LINK
|
|
depends on m || CC_CAN_LINK_STATIC
|
|
default m
|
|
help
|
|
This builds bpfilter kernel module with embedded user mode helper
|
|
|
|
Note: To compile this as built-in, your toolchain must support
|
|
building static binaries, since rootfs isn't mounted at the time
|
|
when __init functions are called and do_execv won't be able to find
|
|
the elf interpreter.
|
|
endif
|