diff mbox series

bpf: merge two CONFIG_BPF entries

Message ID 20240204075634.32969-1-masahiroy@kernel.org (mailing list archive)
State Accepted
Commit e55dad12abe42383b68ba88212eb3d0fba0e9820
Delegated to: BPF
Headers show
Series bpf: merge two CONFIG_BPF entries | expand

Checks

Context Check Description
bpf/vmtest-bpf-next-PR success PR summary
netdev/tree_selection success Not a local patch
bpf/vmtest-bpf-next-VM_Test-11 success Logs for s390x-gcc / build / build for s390x with gcc
bpf/vmtest-bpf-next-VM_Test-17 success Logs for s390x-gcc / veristat
bpf/vmtest-bpf-next-VM_Test-18 success Logs for set-matrix
bpf/vmtest-bpf-next-VM_Test-19 success Logs for x86_64-gcc / build / build for x86_64 with gcc
bpf/vmtest-bpf-next-VM_Test-21 success Logs for x86_64-gcc / test (test_maps, false, 360) / test_maps on x86_64 with gcc
bpf/vmtest-bpf-next-VM_Test-20 success Logs for x86_64-gcc / build-release
bpf/vmtest-bpf-next-VM_Test-22 success Logs for x86_64-gcc / test (test_progs, false, 360) / test_progs on x86_64 with gcc
bpf/vmtest-bpf-next-VM_Test-24 success Logs for x86_64-gcc / test (test_progs_no_alu32_parallel, true, 30) / test_progs_no_alu32_parallel on x86_64 with gcc
bpf/vmtest-bpf-next-VM_Test-27 success Logs for x86_64-gcc / veristat / veristat on x86_64 with gcc
bpf/vmtest-bpf-next-VM_Test-25 success Logs for x86_64-gcc / test (test_progs_parallel, true, 30) / test_progs_parallel on x86_64 with gcc
bpf/vmtest-bpf-next-VM_Test-26 success Logs for x86_64-gcc / test (test_verifier, false, 360) / test_verifier on x86_64 with gcc
bpf/vmtest-bpf-next-VM_Test-30 success Logs for x86_64-llvm-17 / test (test_maps, false, 360) / test_maps on x86_64 with llvm-17
bpf/vmtest-bpf-next-VM_Test-28 success Logs for x86_64-llvm-17 / build / build for x86_64 with llvm-17
bpf/vmtest-bpf-next-VM_Test-33 success Logs for x86_64-llvm-17 / test (test_verifier, false, 360) / test_verifier on x86_64 with llvm-17
bpf/vmtest-bpf-next-VM_Test-31 success Logs for x86_64-llvm-17 / test (test_progs, false, 360) / test_progs on x86_64 with llvm-17
bpf/vmtest-bpf-next-VM_Test-32 success Logs for x86_64-llvm-17 / test (test_progs_no_alu32, false, 360) / test_progs_no_alu32 on x86_64 with llvm-17
bpf/vmtest-bpf-next-VM_Test-34 success Logs for x86_64-llvm-17 / veristat
bpf/vmtest-bpf-next-VM_Test-36 success Logs for x86_64-llvm-18 / build-release / build for x86_64 with llvm-18 and -O2 optimization
bpf/vmtest-bpf-next-VM_Test-35 success Logs for x86_64-llvm-18 / build / build for x86_64 with llvm-18
bpf/vmtest-bpf-next-VM_Test-39 success Logs for x86_64-llvm-18 / test (test_progs_cpuv4, false, 360) / test_progs_cpuv4 on x86_64 with llvm-18
bpf/vmtest-bpf-next-VM_Test-38 success Logs for x86_64-llvm-18 / test (test_progs, false, 360) / test_progs on x86_64 with llvm-18
bpf/vmtest-bpf-next-VM_Test-40 success Logs for x86_64-llvm-18 / test (test_progs_no_alu32, false, 360) / test_progs_no_alu32 on x86_64 with llvm-18
bpf/vmtest-bpf-next-VM_Test-37 success Logs for x86_64-llvm-18 / test (test_maps, false, 360) / test_maps on x86_64 with llvm-18
bpf/vmtest-bpf-next-VM_Test-41 success Logs for x86_64-llvm-18 / test (test_verifier, false, 360) / test_verifier on x86_64 with llvm-18
bpf/vmtest-bpf-next-VM_Test-42 success Logs for x86_64-llvm-18 / veristat
bpf/vmtest-bpf-next-VM_Test-16 success Logs for s390x-gcc / test (test_verifier, false, 360) / test_verifier on s390x with gcc
bpf/vmtest-bpf-next-VM_Test-1 success Logs for ShellCheck
bpf/vmtest-bpf-next-VM_Test-0 success Logs for Lint
bpf/vmtest-bpf-next-VM_Test-3 success Logs for Validate matrix.py
bpf/vmtest-bpf-next-VM_Test-2 success Logs for Unittests
bpf/vmtest-bpf-next-VM_Test-5 success Logs for aarch64-gcc / build-release
bpf/vmtest-bpf-next-VM_Test-8 success Logs for set-matrix
bpf/vmtest-bpf-next-VM_Test-7 success Logs for s390x-gcc / build-release
bpf/vmtest-bpf-next-VM_Test-4 success Logs for aarch64-gcc / build / build for aarch64 with gcc
bpf/vmtest-bpf-next-VM_Test-10 success Logs for aarch64-gcc / veristat
bpf/vmtest-bpf-next-VM_Test-12 success Logs for s390x-gcc / build-release
bpf/vmtest-bpf-next-VM_Test-15 success Logs for x86_64-gcc / build-release
bpf/vmtest-bpf-next-VM_Test-13 success Logs for set-matrix
bpf/vmtest-bpf-next-VM_Test-6 success Logs for aarch64-gcc / test (test_maps, false, 360) / test_maps on aarch64 with gcc
bpf/vmtest-bpf-next-VM_Test-9 success Logs for aarch64-gcc / test (test_verifier, false, 360) / test_verifier on aarch64 with gcc
bpf/vmtest-bpf-next-VM_Test-14 success Logs for x86_64-gcc / build / build for x86_64 with gcc
bpf/vmtest-bpf-next-VM_Test-23 success Logs for x86_64-llvm-17 / build / build for x86_64 with llvm-17
bpf/vmtest-bpf-next-VM_Test-29 success Logs for x86_64-llvm-17 / veristat

Commit Message

Masahiro Yamada Feb. 4, 2024, 7:56 a.m. UTC
'config BPF' exists in both init/Kconfig and kernel/bpf/Kconfig.

Commit b24abcff918a ("bpf, kconfig: Add consolidated menu entry for bpf
with core options") added the second one to kernel/bpf/Kconfig instead
of moving the existing one.

Merge them together.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

 init/Kconfig       | 5 -----
 kernel/bpf/Kconfig | 1 +
 2 files changed, 1 insertion(+), 5 deletions(-)

Comments

Yonghong Song Feb. 4, 2024, 6:10 p.m. UTC | #1
On 2/3/24 11:56 PM, Masahiro Yamada wrote:
> 'config BPF' exists in both init/Kconfig and kernel/bpf/Kconfig.
>
> Commit b24abcff918a ("bpf, kconfig: Add consolidated menu entry for bpf
> with core options") added the second one to kernel/bpf/Kconfig instead
> of moving the existing one.
>
> Merge them together.
>
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> ---
>
>   init/Kconfig       | 5 -----
>   kernel/bpf/Kconfig | 1 +
>   2 files changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/init/Kconfig b/init/Kconfig
> index 8d4e836e1b6b..46ccad83a664 100644
> --- a/init/Kconfig
> +++ b/init/Kconfig
> @@ -1457,11 +1457,6 @@ config SYSCTL_ARCH_UNALIGN_ALLOW
>   config HAVE_PCSPKR_PLATFORM
>   	bool
>   
> -# interpreter that classic socket filters depend on
> -config BPF
> -	bool
> -	select CRYPTO_LIB_SHA1
> -
>   menuconfig EXPERT
>   	bool "Configure standard kernel features (expert users)"
>   	# Unhide debug options, to make the on-by-default options visible
> diff --git a/kernel/bpf/Kconfig b/kernel/bpf/Kconfig
> index 6a906ff93006..bc25f5098a25 100644
> --- a/kernel/bpf/Kconfig
> +++ b/kernel/bpf/Kconfig
> @@ -3,6 +3,7 @@
>   # BPF interpreter that, for example, classic socket filters depend on.
>   config BPF
>   	bool
> +	select CRYPTO_LIB_SHA1

Currently, the kernel/bpf directory is guarded with CONFIG_BPF
   obj-$(CONFIG_BPF) += bpf/
in kernel/bpf/Makefile.

Your patch probably works since there are lots of some other BPF related
configurations which requires CONFIG_BPF. But maybe we sould
keep 'config BPF' in init/Kconfig and remove 'config BPF'
in kernel/bpf/Kconfig. This will be less confusing?

>   
>   # Used by archs to tell that they support BPF JIT compiler plus which
>   # flavour. Only one of the two can be selected for a specific arch since
Masahiro Yamada Feb. 4, 2024, 11:37 p.m. UTC | #2
On Mon, Feb 5, 2024 at 3:11 AM Yonghong Song <yonghong.song@linux.dev> wrote:
>
>
> On 2/3/24 11:56 PM, Masahiro Yamada wrote:
> > 'config BPF' exists in both init/Kconfig and kernel/bpf/Kconfig.
> >
> > Commit b24abcff918a ("bpf, kconfig: Add consolidated menu entry for bpf
> > with core options") added the second one to kernel/bpf/Kconfig instead
> > of moving the existing one.
> >
> > Merge them together.
> >
> > Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> > ---
> >
> >   init/Kconfig       | 5 -----
> >   kernel/bpf/Kconfig | 1 +
> >   2 files changed, 1 insertion(+), 5 deletions(-)
> >
> > diff --git a/init/Kconfig b/init/Kconfig
> > index 8d4e836e1b6b..46ccad83a664 100644
> > --- a/init/Kconfig
> > +++ b/init/Kconfig
> > @@ -1457,11 +1457,6 @@ config SYSCTL_ARCH_UNALIGN_ALLOW
> >   config HAVE_PCSPKR_PLATFORM
> >       bool
> >
> > -# interpreter that classic socket filters depend on
> > -config BPF
> > -     bool
> > -     select CRYPTO_LIB_SHA1
> > -
> >   menuconfig EXPERT
> >       bool "Configure standard kernel features (expert users)"
> >       # Unhide debug options, to make the on-by-default options visible
> > diff --git a/kernel/bpf/Kconfig b/kernel/bpf/Kconfig
> > index 6a906ff93006..bc25f5098a25 100644
> > --- a/kernel/bpf/Kconfig
> > +++ b/kernel/bpf/Kconfig
> > @@ -3,6 +3,7 @@
> >   # BPF interpreter that, for example, classic socket filters depend on.
> >   config BPF
> >       bool
> > +     select CRYPTO_LIB_SHA1
>
> Currently, the kernel/bpf directory is guarded with CONFIG_BPF
>    obj-$(CONFIG_BPF) += bpf/
> in kernel/bpf/Makefile.


Wrong.

"in kernel/Makefile".


Why is it related to this patch?



> Your patch probably works since there are lots of some other BPF related
> configurations which requires CONFIG_BPF. But maybe we sould
> keep 'config BPF' in init/Kconfig and remove 'config BPF'
> in kernel/bpf/Kconfig. This will be less confusing?


Why?



> >
> >   # Used by archs to tell that they support BPF JIT compiler plus which
> >   # flavour. Only one of the two can be selected for a specific arch since
Yonghong Song Feb. 5, 2024, 12:22 a.m. UTC | #3
On 2/4/24 3:37 PM, Masahiro Yamada wrote:
> On Mon, Feb 5, 2024 at 3:11 AM Yonghong Song <yonghong.song@linux.dev> wrote:
>>
>> On 2/3/24 11:56 PM, Masahiro Yamada wrote:
>>> 'config BPF' exists in both init/Kconfig and kernel/bpf/Kconfig.
>>>
>>> Commit b24abcff918a ("bpf, kconfig: Add consolidated menu entry for bpf
>>> with core options") added the second one to kernel/bpf/Kconfig instead
>>> of moving the existing one.
>>>
>>> Merge them together.
>>>
>>> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
>>> ---
>>>
>>>    init/Kconfig       | 5 -----
>>>    kernel/bpf/Kconfig | 1 +
>>>    2 files changed, 1 insertion(+), 5 deletions(-)
>>>
>>> diff --git a/init/Kconfig b/init/Kconfig
>>> index 8d4e836e1b6b..46ccad83a664 100644
>>> --- a/init/Kconfig
>>> +++ b/init/Kconfig
>>> @@ -1457,11 +1457,6 @@ config SYSCTL_ARCH_UNALIGN_ALLOW
>>>    config HAVE_PCSPKR_PLATFORM
>>>        bool
>>>
>>> -# interpreter that classic socket filters depend on
>>> -config BPF
>>> -     bool
>>> -     select CRYPTO_LIB_SHA1
>>> -
>>>    menuconfig EXPERT
>>>        bool "Configure standard kernel features (expert users)"
>>>        # Unhide debug options, to make the on-by-default options visible
>>> diff --git a/kernel/bpf/Kconfig b/kernel/bpf/Kconfig
>>> index 6a906ff93006..bc25f5098a25 100644
>>> --- a/kernel/bpf/Kconfig
>>> +++ b/kernel/bpf/Kconfig
>>> @@ -3,6 +3,7 @@
>>>    # BPF interpreter that, for example, classic socket filters depend on.
>>>    config BPF
>>>        bool
>>> +     select CRYPTO_LIB_SHA1
>> Currently, the kernel/bpf directory is guarded with CONFIG_BPF
>>     obj-$(CONFIG_BPF) += bpf/
>> in kernel/bpf/Makefile.
>
> Wrong.
>
> "in kernel/Makefile".
>
>
> Why is it related to this patch?

Sorry, my obvious mistake.

>
>
>
>> Your patch probably works since there are lots of some other BPF related
>> configurations which requires CONFIG_BPF. But maybe we sould
>> keep 'config BPF' in init/Kconfig and remove 'config BPF'
>> in kernel/bpf/Kconfig. This will be less confusing?
>
> Why?

The 'less confusing' part is just my initial feeling. I found
some CGROUP related configs are defined in init/Kconfig but not
under kernel/cgroup directory. So I thought 'config BPF' could
stay in init/Kconfig as well.

But I just did some other checking. For example, 'config NET'
is actually under 'net' directory. So probably you are right,
let us remove the one in init/Kconfig and use the one
in kernel/bpf/Kconfig.

So

Acked-by: Yonghong Song <yonghong.song@linux.dev>

>
>
>
>>>    # Used by archs to tell that they support BPF JIT compiler plus which
>>>    # flavour. Only one of the two can be selected for a specific arch since
>
>
patchwork-bot+netdevbpf@kernel.org Feb. 8, 2024, 12:40 a.m. UTC | #4
Hello:

This patch was applied to bpf/bpf-next.git (master)
by Andrii Nakryiko <andrii@kernel.org>:

On Sun,  4 Feb 2024 16:56:34 +0900 you wrote:
> 'config BPF' exists in both init/Kconfig and kernel/bpf/Kconfig.
> 
> Commit b24abcff918a ("bpf, kconfig: Add consolidated menu entry for bpf
> with core options") added the second one to kernel/bpf/Kconfig instead
> of moving the existing one.
> 
> Merge them together.
> 
> [...]

Here is the summary with links:
  - bpf: merge two CONFIG_BPF entries
    https://git.kernel.org/bpf/bpf-next/c/e55dad12abe4

You are awesome, thank you!
diff mbox series

Patch

diff --git a/init/Kconfig b/init/Kconfig
index 8d4e836e1b6b..46ccad83a664 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -1457,11 +1457,6 @@  config SYSCTL_ARCH_UNALIGN_ALLOW
 config HAVE_PCSPKR_PLATFORM
 	bool
 
-# interpreter that classic socket filters depend on
-config BPF
-	bool
-	select CRYPTO_LIB_SHA1
-
 menuconfig EXPERT
 	bool "Configure standard kernel features (expert users)"
 	# Unhide debug options, to make the on-by-default options visible
diff --git a/kernel/bpf/Kconfig b/kernel/bpf/Kconfig
index 6a906ff93006..bc25f5098a25 100644
--- a/kernel/bpf/Kconfig
+++ b/kernel/bpf/Kconfig
@@ -3,6 +3,7 @@ 
 # BPF interpreter that, for example, classic socket filters depend on.
 config BPF
 	bool
+	select CRYPTO_LIB_SHA1
 
 # Used by archs to tell that they support BPF JIT compiler plus which
 # flavour. Only one of the two can be selected for a specific arch since