Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp2117172rdb; Sun, 4 Feb 2024 16:22:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IGHoDxs8fuybclRGf3/ZJk9pLmL39qsGrPRJFeSqBtdLe7pL2hlt0/Yg0k41+YR71fkOyB0 X-Received: by 2002:a05:620a:4d19:b0:785:45f0:c3ee with SMTP id wa25-20020a05620a4d1900b0078545f0c3eemr12679033qkn.76.1707092545178; Sun, 04 Feb 2024 16:22:25 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707092545; cv=pass; d=google.com; s=arc-20160816; b=t6nNEVJfxvj1LhfeXAEmQeKKs3TfqYYSMOJAaWBFpetAa5c5vQm6rBowrYLLTtxHg6 0Aywg3zCf1+eCJIVEPhTZoy3pLQfC12W4DqyPiO3NcbBRSBWu/Fg/eh1olmQd48GTUOg BCAlFkWIK9UxLThmodly50mLLEwiYYyTlazUrIQQ/4nVXmfSxsayehCPeqVe/ed1GNYx 4dwwpBgZkVQN2yNJZVaVzM6daf/vG88gPDbIvogeSMhOd6LSQJNPu+eNau16puQnsMNJ 1e0jXlIv2H1I71wG/FjliAJxaleSiXuPAj1hUK78E7uG9/dXo4VL7dwQU5rma8DPv8/a E21A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:dkim-signature:message-id; bh=+5Ch6QC8mvBeUr1N/NvWc9aBhLpyOmqab4NFHqp2HiM=; fh=7JvN64InTCMnkBEv42V8r7vZtYqKcdavHfwJd4SLvVM=; b=oDZCZX/Mrbp7YEqHEQzCIbvafNrqBVzEfVHwVGHLZJSnLnAnMiq7FaEGDDsDtBDulU PJuOrkoj2+satoehSdu+u038C1PO3khFIfSHcj6xtnGapPRoKOaJ2UWLQsq4WaA/gsf/ nWV3xWZvqAO4UORwBobOes7KA5hGyZXrqdJleiRVCgZq1X274ppiVjTi9XzMHqP1GuEq JpPDI/32wc5PiVd/RCuyjsnQ961Ha9zYeUHjLccxIUdcHsNjyCbyfhm/zsk1SczyM5wI /rqe7n7uC3mfM0oUNE0Z74/ic4VcyEQZXz0R/BHUN7Sq6Me8lx9kObry9Y/szrNZg6oy cAZg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=ngNEwYAF; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-51963-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51963-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev X-Forwarded-Encrypted: i=1; AJvYcCVckIT0aN80f3dhN+pOiPmB0rtsz5HTRZpG0V5X5oc9FGsNTVKoLgfnnlR1ChmgDxhnbBDzyt/WrBYpvH3JjdZ5n7QkFnVM73bB8kAA1w== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id v8-20020a05620a0a8800b0078542ba9d96si7674703qkg.334.2024.02.04.16.22.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Feb 2024 16:22:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-51963-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=ngNEwYAF; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-51963-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51963-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id DBEB31C21D86 for ; Mon, 5 Feb 2024 00:22:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 06E02A927; Mon, 5 Feb 2024 00:22:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="ngNEwYAF" Received: from out-179.mta0.migadu.com (out-179.mta0.migadu.com [91.218.175.179]) (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 D95A97F for ; Mon, 5 Feb 2024 00:22:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707092534; cv=none; b=fZbiZZnyKcTsrTXLiWWwkGTSfzUmGgQzNuebCSUYiTbzRNSJbHLvBo5c0Q0x9IA5ckv/eN9DpfswoQoFEXJos4Ycb6BEM6nQqPNWlAb36i7FFruHFduaVUCW9JBwMuid/VjnSTQnsMSkTuSv2AP2w83WPrYYEctJ8oM01v63Ph4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707092534; c=relaxed/simple; bh=TGVsFWXSbybD+7JMrDRw6Xo4yjS+fQKrHqTsbsCQUWg=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=KxLlViiZFTkge0U+WPOZaUpUNqedzLA754jC46b7Tc2o8JOHD79Za1MfRh/sclK0ASGOlPOyI1DKVsfgtbaAHOijkAiqgMwORdMWYO/AwOD4ejGP4RCcMq3EBH6qMuLL4BiOrBBcEhsDCllhwMAFNRawLioetLno//wL3gnaeCA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=ngNEwYAF; arc=none smtp.client-ip=91.218.175.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Message-ID: <3c8ebba7-c449-4f81-be49-41f6b5ea2b64@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1707092530; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+5Ch6QC8mvBeUr1N/NvWc9aBhLpyOmqab4NFHqp2HiM=; b=ngNEwYAFuKc+1ThaJzyiv4nFd8OYJFWJJzCu0tw5WIDrdmDufpmMoMxruLPylQq05Jym3B s/wYHEJdmLVil/CllDHNEcGwKXPPRjmngMNMbyCq3tiFQDDdv5j1AqTQsVluTtTY4p1xvE L7g3EcKwYYQK63YDmghvgJbL8dtszRI= Date: Sun, 4 Feb 2024 16:22:02 -0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH] bpf: merge two CONFIG_BPF entries Content-Language: en-GB To: Masahiro Yamada Cc: Alexei Starovoitov , Daniel Borkmann , John Fastabend , bpf@vger.kernel.org, Andrii Nakryiko , Hao Luo , Jiri Olsa , KP Singh , Martin KaFai Lau , Song Liu , Stanislav Fomichev , linux-kernel@vger.kernel.org References: <20240204075634.32969-1-masahiroy@kernel.org> <25615f41-a725-4276-bc0a-a3e7fe47b864@linux.dev> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Yonghong Song In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT On 2/4/24 3:37 PM, Masahiro Yamada wrote: > On Mon, Feb 5, 2024 at 3:11 AM Yonghong Song 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 >>> --- >>> >>> 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 > > > >>> # 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 > >