Message ID | 20240204075634.32969-1-masahiroy@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-51507-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp242467dyb; Sat, 3 Feb 2024 23:57:59 -0800 (PST) X-Google-Smtp-Source: AGHT+IEHu1hB54ynna/oqzq29haNWtvb2HTbiikILlalL0oF3WhJV6fegCQzkexxG2orvv3z2mOt X-Received: by 2002:a17:906:200a:b0:a37:7a6a:602b with SMTP id 10-20020a170906200a00b00a377a6a602bmr910494ejo.63.1707033478838; Sat, 03 Feb 2024 23:57:58 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707033478; cv=pass; d=google.com; s=arc-20160816; b=slRPcD9IqjVOXI1tcOgC407ufVkz3u2o0kLNq69v3Wp5ArneYHG8FJAk+mmzRUnzvI JGXyh6ApfO3NxJaigZ4Vj+6GaXkAwoWFyfnA+KHGhI82oGVvTDXxxT2jru3PndjzUaYk agMcb5KEkCfH/HY4YuHUYFWQNkth2x+ELJmtmtCRemiL5t4dJHgStRdxjJJg43z72Hhq u9MHaT3fi5LdH9RfbPUp9zLyBlaS/tZoeyOFFv1LQvKtkauVGzfnuxjKUSJpbE4/XftD ix+AQfsH3YSXC24fsyRynuRwxcC2rx2Gg1wY4apfVm35HUq/HqeMsPPfciaG+wZGET73 Tg0w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=JXFQwu6PRhSGvlORes8ZHRFfsW28imTw3rnmNvboQSE=; fh=7Vo4oen/i6LGrokUDObe8MYGHBW4c+p7oQ3BqwNIpjs=; b=I7mx0ts4VaHZyPmvaEFNNG54VE5PsgPIyjTERv7KRjovNwZPN2DWM0ovC+NRza0KcT m2su+afNaci3szFT0ycuA5wNYo91pt0CNfQBqe74oo7p3p1PmMgm9fA/v3wXK+NHOZbM 8VUkFi/7mGKpfX1KP+gwU6WYtkKmBgAbMztDEs9TiqxfWK6PEy9ae448rQ3w74346f3g Jf2l4Kckx6DR2NUwlpzE08quHnTEmpk8gRymftK4et5D+wJUQYeulMY13pWetaS7+KlU GuvsMxXpBDWsBLPE6CARrqqHWy6DTMrSXtAoQ1dnatF3UyhURZvobN6ycfSvh7cY4W2X C96w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MHc1PZTU; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-51507-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51507-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=1; AJvYcCXOnzrQBnFlaO57L1vaLa77t40eszNpK9ev82PWzFQRCciMqKvhA83EfoG0MyTMTIlkBzQM4Q9SIZEkz1NhR3t4l/0fKQ== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id lh24-20020a170906f8d800b00a3797bd4d1esi289788ejb.533.2024.02.03.23.57.58 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Feb 2024 23:57:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-51507-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MHc1PZTU; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-51507-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51507-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 7157E1F22934 for <ouuuleilei@gmail.com>; Sun, 4 Feb 2024 07:57:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 74114BE6F; Sun, 4 Feb 2024 07:57:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="MHc1PZTU" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D17618F72; Sun, 4 Feb 2024 07:57:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707033462; cv=none; b=aFKJ9nvLKKZt9hlVi2Fdp7lD92httOZsxGlvY0qD02WYOi7PCzB1T1KTQ53lgqXXgvTqulcmA0kxHkW0H5+xTwzEXvAISmos9AsIkBD8H1F6pqnE5ZditFiuNLEkbWdPQ4MDsVCCa1j2fi2czDBrTyaz9fZv2J+HvTNPSX2tFJo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707033462; c=relaxed/simple; bh=iUmin44j0XR3TQtN9khodNxCLgpk4mSAs/ZltHAV8fI=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=auOyobTAGm6HpBVOO5lIlaBwNZwWxgouHMP8fUQPfjjyP0z3GSqrTqfmPdqOm1GyferRhQaZhd5QXuISwIu3sFUlx/HvbQZd5mAVQyUTZeaAJiq6OB9ECEuM7QJ5d2zotTMcJNJ7+j4H9r2fEmhmjY4DOLqB/NPpOIqaO+j7x7M= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=MHc1PZTU; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 288A3C433C7; Sun, 4 Feb 2024 07:57:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707033462; bh=iUmin44j0XR3TQtN9khodNxCLgpk4mSAs/ZltHAV8fI=; h=From:To:Cc:Subject:Date:From; b=MHc1PZTUBGUPV64KSSegREl6PIvZQFyCExP3IkGbEJPyRkqwM1o+uta3QBG8R22x+ +3DephlHQO4cWDlv9kTMdOwg2UDw/ZRt9qLhL+xIP9guSPy0qMxpgtX+Lvwar+l5hy 3+uLCoClvU2Tq4hxWIkVEgY0I6iX5q6URLBwxMjIIxJ/LqFVj4lGhVm7b3p7GhuuTS uHMMZw+sMxnOa3AHL9sHN9eW0y2mAM0DoNmQZv6mokpET8DlJI0bdHygdcex8y3+qK ZGNtjHO7pFE0pZ1v0UqkVYoEFUvtjCNudT73uCk5zK0udnDhDqWwy6HhLLeyQJaRsV 8cWKO6BSXcyPQ== From: Masahiro Yamada <masahiroy@kernel.org> To: Alexei Starovoitov <ast@kernel.org>, Daniel Borkmann <daniel@iogearbox.net>, John Fastabend <john.fastabend@gmail.com>, bpf@vger.kernel.org Cc: Masahiro Yamada <masahiroy@kernel.org>, Andrii Nakryiko <andrii@kernel.org>, Hao Luo <haoluo@google.com>, Jiri Olsa <jolsa@kernel.org>, KP Singh <kpsingh@kernel.org>, Martin KaFai Lau <martin.lau@linux.dev>, Song Liu <song@kernel.org>, Stanislav Fomichev <sdf@google.com>, Yonghong Song <yonghong.song@linux.dev>, linux-kernel@vger.kernel.org Subject: [PATCH] bpf: merge two CONFIG_BPF entries Date: Sun, 4 Feb 2024 16:56:34 +0900 Message-Id: <20240204075634.32969-1-masahiroy@kernel.org> X-Mailer: git-send-email 2.40.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789954337194405297 X-GMAIL-MSGID: 1789954337194405297 |
Series |
bpf: merge two CONFIG_BPF entries
|
|
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
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
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
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 > >
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 --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