X-Received: by 2002:a17:90a:69c1:b0:1bc:3e97:e585 with SMTP id s59-20020a17090a69c100b001bc3e97e585mr3399569pjj.89.1645525529218; Tue, 22 Feb 2022 02:25:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645525529; cv=none; d=google.com; s=arc-20160816; b=IYVC7F+VioDvojXAnC2oP6b1KjyBi4VpFH08/bWLXlD3qplMFsHXHmelD42Fp7lEqH /yqEx16tRAMY6xMMtSpsVCSMCnkTwOn/dEl5gGMSv6Ys/Yah5h206kyArdZkOGS61nzu +6GF++EalTct+9pk1dpZyWQTmNeH2ZwbbTWWElluV1ZqZQUnCCx6079EPsc9TQu3nCqp p99GHr03XEYFwdQiRGC9xSFJBwsetIae8VXzgBn9JzlWvg38gwkfADGkPMl/ZXGVRFj2 75HKT9/fRQcrEdXKSwljTyJ9CsLxUPNixIXrcPGwriSe9USEgsNXGX7InQjE+V6+6R/U z3Iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=2AUvk9rMZBJWUa7651MGq1nBMgJtBNWe6uAy3HiA06Y=; b=wrSd9aB8v/kjz9t+VwSQI3xdxc5wK2B6JDtEFO4Zbu29I3D4czks6jSyRKtdx7nY9K S5umpTGe6OvtD2K/FHAl+G3RnGPihhNGHIvquXaIPlsbmQ+WhDz8mVmMz83AK+BD2bWm h7l2AqE0MdCfl8ooEINNex87+d5uct1kfS6Y3SDQJHPRGk69jpcLq9NcMLz1IiQ+14tw mWxIudxjb9qWRO/VsNugsc6nhyRAV0HPpUUZDAC8GI99M/j1AvFClSEi1dKjYtnKaKHN uf2O6nQuyuLEeZmLgD6a4Pqc2EbNIigtTXIPvU8SAbFxv0v9g9Dp5spMrO1tg8jMe7yk nj6g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w6si3655447plp.441.2022.02.22.02.25.14; Tue, 22 Feb 2022 02:25:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230379AbiBVJ5u (ORCPT + 99 others); Tue, 22 Feb 2022 04:57:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54680 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230396AbiBVJ5l (ORCPT ); Tue, 22 Feb 2022 04:57:41 -0500 Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B0C10D224B; Tue, 22 Feb 2022 01:57:14 -0800 (PST) Received: from linux.localdomain (unknown [113.200.148.30]) by mail.loongson.cn (Coremail) with SMTP id AQAAf9DxmMhzsxRiHa8EAA--.4515S3; Tue, 22 Feb 2022 17:57:08 +0800 (CST) From: Tiezhu Yang To: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh Cc: Xuefeng Li , netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH bpf-next v3 1/2] bpf: Add some description about BPF_JIT_ALWAYS_ON in Kconfig Date: Tue, 22 Feb 2022 17:57:05 +0800 Message-Id: <1645523826-18149-2-git-send-email-yangtiezhu@loongson.cn> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1645523826-18149-1-git-send-email-yangtiezhu@loongson.cn> References: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W8JVWxJwCI42IY6xAIw20EY4v20xvaj40_Jr0_JF4lIxAIcVC2z280aV AFwI0_Jr0_Gr1lIxAIcVC2z280aVCY1x0267AKxVW8JVW8JrUvcSsGvfC2KfnxnUUI43ZE Xa7VUUuHq3UUUUU== X-CM-SenderInfo: p1dqw3xlh2x3gn0dqz5rrqw2lrqou0/ X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When CONFIG_BPF_JIT_ALWAYS_ON is enabled, /proc/sys/net/core/bpf_jit_enable is permanently set to 1 and setting any other value than that will return failure. Add the above description in the help text of config BPF_JIT_ALWAYS_ON, and then we can distinguish between BPF_JIT_ALWAYS_ON and BPF_JIT_DEFAULT_ON. Signed-off-by: Tiezhu Yang Acked-by: Song Liu --- kernel/bpf/Kconfig | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kernel/bpf/Kconfig b/kernel/bpf/Kconfig index d24d518..f3db15a 100644 --- a/kernel/bpf/Kconfig +++ b/kernel/bpf/Kconfig @@ -58,6 +58,10 @@ config BPF_JIT_ALWAYS_ON Enables BPF JIT and removes BPF interpreter to avoid speculative execution of BPF instructions by the interpreter. + When CONFIG_BPF_JIT_ALWAYS_ON is enabled, /proc/sys/net/core/bpf_jit_enable + is permanently set to 1 and setting any other value than that will return + failure. + config BPF_JIT_DEFAULT_ON def_bool ARCH_WANT_DEFAULT_BPF_JIT || BPF_JIT_ALWAYS_ON depends on HAVE_EBPF_JIT && BPF_JIT -- 2.1.0