Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp3121485pxb; Sun, 20 Feb 2022 09:55:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJxuQzQpRbDGChY7LJlVQ1mgsLyrjFdb3tXkLzxJMEP++wnhe6nVLqCvI0odEMfNZ66kmNrB X-Received: by 2002:a17:90a:aa91:b0:1b9:19d6:95b6 with SMTP id l17-20020a17090aaa9100b001b919d695b6mr17842744pjq.106.1645379704988; Sun, 20 Feb 2022 09:55:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645379704; cv=none; d=google.com; s=arc-20160816; b=RiNJa4AeqWAJyi55jIbgPoP2x4vxdtDmaS8/it6KZFFDKTfPSUD1Y8kT8Pw1X8ipI+ tlZbne8olhpz/W+jP8KRLhhihTgjloiIEv4JB0/tC/Achkizdxpyb+6AKeeggEWPET94 cq+YODXXSSrKaXkyI8mJolRpxFnTjWSzHaly5Y5y+onS/8/URf6tm+DXakhhj88DOVu1 F1NoFaNWQWYiRdoDDuWfOo32qPZDA8tWklenehwAcjsNn2GCwcocy1sd2+212KkzMcCT /7AeSgfm/vHkAU9KAxvoqpsoTOPqDVfU59t341NFaNhsjLI3EvsXYEguOtw2c7CoizA2 13LQ== 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=ErJeQz+urtu8gBcgnmDVpTG8Fxe9QHy/oYddnBnRICE=; b=fdeuLXDc9V129VYniu7Jxv5JIq2m6ehdUuKrI6ThyvD52MgreDggauNvdMlVPFlK+Y rr1dbFASEdE6z69/1SuTfb/DV7dT/Q5kN3zuLdpx6AQxk4iAEL3GlQRNgy5NayoAmuiP eyHgBAJuVDZkycM02NJyM0bAEJ+5whIo3LNwDRANEvJCcIjZTgCFFfgNyjqPd0Sv/mJa OklQjsfWaSL4j8gOBQaCp6PRY/Yq819ZA8MpYflQls91tac6mq+dMWc3UtnkvHQD8WhQ cw3mC/4mTmyCqabYarhIB7f+I79xgrRFyuAkPda5TbNVvv48252fTOLdtewmyTqHgTgE BsyQ== 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 s64si15017644pgs.339.2022.02.20.09.54.47; Sun, 20 Feb 2022 09:55:04 -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 S241268AbiBSDPf (ORCPT + 99 others); Fri, 18 Feb 2022 22:15:35 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:36008 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235991AbiBSDPa (ORCPT ); Fri, 18 Feb 2022 22:15:30 -0500 Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8E9C850471; Fri, 18 Feb 2022 19:15:10 -0800 (PST) Received: from linux.localdomain (unknown [113.200.148.30]) by mail.loongson.cn (Coremail) with SMTP id AQAAf9DxWMm3YBBi94UDAA--.2803S3; Sat, 19 Feb 2022 11:15:04 +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 v2 1/2] bpf: Add some description about BPF_JIT_ALWAYS_ON in Kconfig Date: Sat, 19 Feb 2022 11:15:01 +0800 Message-Id: <1645240502-13398-2-git-send-email-yangtiezhu@loongson.cn> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1645240502-13398-1-git-send-email-yangtiezhu@loongson.cn> References: <1645240502-13398-1-git-send-email-yangtiezhu@loongson.cn> X-CM-TRANSID: AQAAf9DxWMm3YBBi94UDAA--.2803S3 X-Coremail-Antispam: 1UD129KBjvdXoWrtF47WF4fJFyxCFWfJr1DZFb_yoWDKrbEqr y5tF48Wws0kF9Y9F129a1fuF97Zr1UGr18C3Wagr1UAa4av3ZxG3s8JF1jkF9xXw4YvrZr WrZ3A39akr4FvjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbykFF20E14v26ryj6rWUM7CY07I20VC2zVCF04k26cxKx2IYs7xG 6rWj6s0DM7CIcVAFz4kK6r1j6r18M28IrcIa0xkI8VA2jI8067AKxVWUGwA2048vs2IY02 0Ec7CjxVAFwI0_Gr0_Xr1l8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxSw2x7M28EF7xv wVC0I7IYx2IY67AKxVWUJVWUCwA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxVW8JVWxJwA2z4 x0Y4vEx4A2jsIE14v26r4UJVWxJr1l84ACjcxK6I8E87Iv6xkF7I0E14v26r4UJVWxJr1l e2I262IYc4CY6c8Ij28IcVAaY2xG8wAqx4xG64xvF2IEw4CE5I8CrVC2j2WlYx0E2Ix0cI 8IcVAFwI0_Jr0_Jr4lYx0Ex4A2jsIE14v26r1j6r4UMcvjeVCFs4IE7xkEbVWUJVW8JwAC jcxG0xvY0x0EwIxGrwACjI8F5VA0II8E6IAqYI8I648v4I1lFIxGxcIEc7CjxVA2Y2ka0x kIwI1lc2xSY4AK67AK6r48MxAIw28IcxkI7VAKI48JMxC20s026xCaFVCjc4AY6r1j6r4U MI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE17CEb7AF67 AKxVWUtVW8ZwCIc40Y0x0EwIxGrwCI42IY6xIIjxv20xvE14v26r1j6r1xMIIF0xvE2Ix0 cI8IcVCY1x0267AKxVW8JVWxJwCI42IY6xAIw20EY4v20xvaj40_Jr0_JF4lIxAIcVC2z2 80aVAFwI0_Jr0_Gr1lIxAIcVC2z280aVCY1x0267AKxVW8JVW8JrUvcSsGvfC2KfnxnUUI 43ZEXa7sRRR6wJUUUUU== 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 in 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 --- kernel/bpf/Kconfig | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kernel/bpf/Kconfig b/kernel/bpf/Kconfig index d24d518..cbf3f65 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 + in 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