Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp4434635pxb; Mon, 21 Feb 2022 21:30:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJx0eZkIGexKFzRNt0qQs+l62cm5JeKimYD/1zw/sacSK9cthTgB6Cb11r/2+MdNybSsI5n+ X-Received: by 2002:a63:e5f:0:b0:374:62d8:c551 with SMTP id 31-20020a630e5f000000b0037462d8c551mr3452769pgo.129.1645507848829; Mon, 21 Feb 2022 21:30:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645507848; cv=none; d=google.com; s=arc-20160816; b=JyH/r5YF0xIZLEpX+jH7+Ari5QHLB1MJFBJrbvUK/tRAGdvxAFerqBsAWG6poAp9Zl DiCMmMmAXBzqZYxQy9WGvfQeu6ci5l1TuI3Wo5kSoNhGJWi9uD2tBycAW2AMKtaTAZA3 Lky/cLj9jR1Afr0iPd8jLQXorT4XgOEGrFXHRkKfYLTYfdnQA6xsUv1o9LknoFRt1vdg GBAMNSoy197zQvHH98tIO807OiAlHJwLMuWtjVjoReNKJKVZ7MauYzJ1DwF83yAeODKq hcynKLzinxZVrJbxqFMrfNwu/DxWcsuBb0WUcbqCbJ7ET1fZWzhwLsPUTxIMa04Cvn5k b0vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=hRDNoNUE13jyp0yoqI31jaGhOMOe9Waq4gzPhivfyyU=; b=asNNHO/k+IRLd2JGFUQrjL3EoJr2Tgput64v8AD+btv12AjUGY3WYWY4JfdA1OBsb5 t272QaNrG5CAp1TvNHO1lude8vd8IrRC6e0wV1JDlNOM7WgPs/B+Nlu/893WE3qNaXW1 qDUKerAX22wItkD38qUTMkLw0ZMb6+XvB/ANosDwCX3I2xQz5S1DqkmP70QPqW/tFcw8 zU/m/lkajMswAyHoLJooZw7quvQOj4Dl53EUZJJqFOlqyEn7IlLFUmR4IfR9GRwAG/un gnFgvSCw9/Kqfq/Pj4uci/bF/m4VAyL27YxH+76YrJWmGSqyI3sU6DsOVYIqNHRF8dF+ zqYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dkUjOROG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id f14si22332181plg.232.2022.02.21.21.30.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Feb 2022 21:30:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dkUjOROG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8DD7A89300; Mon, 21 Feb 2022 20:59:25 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238876AbiBVCBs (ORCPT + 99 others); Mon, 21 Feb 2022 21:01:48 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:50628 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229873AbiBVCBn (ORCPT ); Mon, 21 Feb 2022 21:01:43 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A5C481EECA; Mon, 21 Feb 2022 18:01:19 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 53A59B8184E; Tue, 22 Feb 2022 02:01:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EF4C9C340F0; Tue, 22 Feb 2022 02:01:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1645495277; bh=82E44GVnMO3ZiuMUchoEAQGuozP+onbtfSj3aYx1p3k=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=dkUjOROGYgxoaIlIjcoJOBbMvpzAWf5eJq3HoFbDKAFnGMpOFr45Syat6S+hiZ8vS c/iHzeccFya/Coon/R673M43Lz7upMuKVjesq5XF9/cfx0toiptc/4850vTUSxaC4n RNb9yO3Rv0QTnxolO61MZdjIlWinrOAyeIdHsdKF/FIJaEhE+QG95C0vUUARrmtoCz kGB0qlsYrfd74MNkAnMQdS2OjFZXhdyPtTnr/VMOZpj38TRN/yO+qDm35YogScoAIf QZI0RfRelWoxpwqJVCRbxzWbhwwfjotoqw3g6zXl7ZIO1tf0SFxQrGWfLffm2cdKvt 5A5srA7aTXjfw== Received: by mail-yb1-f174.google.com with SMTP id w63so16704191ybe.10; Mon, 21 Feb 2022 18:01:16 -0800 (PST) X-Gm-Message-State: AOAM530mExL97lKojVg8n0j+dB6OFDlsuQdyR0PsMskB8hQcmsMoeQLS e20B1sH2nxEU0uvtx+S0YN9hK94RQoNNGvC8UBg= X-Received: by 2002:a25:d60c:0:b0:610:dc8d:b3bd with SMTP id n12-20020a25d60c000000b00610dc8db3bdmr21529172ybg.561.1645495275984; Mon, 21 Feb 2022 18:01:15 -0800 (PST) MIME-Version: 1.0 References: <1645240502-13398-1-git-send-email-yangtiezhu@loongson.cn> <1645240502-13398-2-git-send-email-yangtiezhu@loongson.cn> In-Reply-To: <1645240502-13398-2-git-send-email-yangtiezhu@loongson.cn> From: Song Liu Date: Mon, 21 Feb 2022 18:01:05 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH bpf-next v2 1/2] bpf: Add some description about BPF_JIT_ALWAYS_ON in Kconfig To: Tiezhu Yang Cc: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Xuefeng Li , Networking , bpf , open list Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 On Fri, Feb 18, 2022 at 7:15 PM Tiezhu Yang wrote: > > 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. nit: "return failure" (no "in"). Other than this, Acked-by: Song Liu > + > 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 >