Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp5419400pxb; Sun, 13 Feb 2022 21:02:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJxjmZgRXajGUcj/Fw2EF6ubwqr71WqYYWseWmbc6ICjQDIlAHQkxewKeioMltDPJ4Gi1Gnd X-Received: by 2002:a17:902:74c2:: with SMTP id f2mr6616694plt.165.1644814934044; Sun, 13 Feb 2022 21:02:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644814934; cv=none; d=google.com; s=arc-20160816; b=Qg9hH3SuML9zwNahsz1E9ma/DOyhDyEXfXW4TGkL4BpDfqmyoLbfwm6alO0hzpX0yN SSwqqr4nxi6teJ4S9NklfIx3+r3ClNaAKqavxy765L1wiLLtHDX0JMBnnCZypdnbyyQg PUUaxhiOJqcEeasWzf0aY27aOaYvXwcQdS1gevh5yMiIH6nD7sPzUYx98syZ46AB2SYb ng18e4BSIOSXVeHXWbc3QJwjTRuSTfLXcAzjw0I9gzDBwxNjoDBISn7r9ZUE9Sut8d14 rWF88JjKdQUfpwQimSNsR4VwqIMq2w5z02zDRFAcvuGSRSwgKi0NTdQp2jfYGUunGo8b Ghng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject; bh=EPiP3FdutSN6IJdPfr98KRcCZ1ZWz6q5lOdPSp6E7QQ=; b=QDs7305pNyQWOFwE0gJ2t3W77rNukVfhjw0PTXUxLw93YLX8DsP91+OZQU+f2IrxM+ rBIGKkiaSw9t33SRhaDvP1VTyYnjRBdtJ6LYigk81LUPxpLwoCPDI8wU6RERdH14XSys bVMZMmX257a4s2JN0USNXWep1+M7JFu6PnnmyJe1PKvnTYDBo+uMAls4CODXrooe8cb2 7EFlVBC9bA7n7vTzet7AF2JhVIftk7A7chRJrqnK2qmwcmM9zbD1oHfNLwqNPUij/dKc vkCutzyT+bfXjuMqaEvqTVmvRveaFz1y3fl04mH/Qj/wvQ76WjCQPjWP/FaItbpVrAwS ZH1A== 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 b5si30896831pfm.93.2022.02.13.21.02.00; Sun, 13 Feb 2022 21:02:13 -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 S230244AbiBLCkk (ORCPT + 93 others); Fri, 11 Feb 2022 21:40:40 -0500 Received: from gmail-smtp-in.l.google.com ([23.128.96.19]:50348 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229541AbiBLCkj (ORCPT ); Fri, 11 Feb 2022 21:40:39 -0500 Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 68E522DABD; Fri, 11 Feb 2022 18:40:34 -0800 (PST) Received: from [10.130.0.135] (unknown [113.200.148.30]) by mail.loongson.cn (Coremail) with SMTP id AQAAf9CxDuEaHgdi9rwAAA--.3561S3; Sat, 12 Feb 2022 10:40:27 +0800 (CST) Subject: Re: [PATCH bpf-next 2/2] bpf: Make BPF_JIT_DEFAULT_ON selectable in Kconfig To: Daniel Borkmann , Alexei Starovoitov , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh References: <1644569851-20859-1-git-send-email-yangtiezhu@loongson.cn> <1644569851-20859-3-git-send-email-yangtiezhu@loongson.cn> Cc: Xuefeng Li , netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org From: Tiezhu Yang Message-ID: <65323db1-5fcb-21b3-2197-9bd6935bd96c@loongson.cn> Date: Sat, 12 Feb 2022 10:40:26 +0800 User-Agent: Mozilla/5.0 (X11; Linux mips64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-CM-TRANSID: AQAAf9CxDuEaHgdi9rwAAA--.3561S3 X-Coremail-Antispam: 1UD129KBjvJXoW7ury3Wr1fAF4xZr43KrWkCrg_yoW8GFyUpw 4Yq34Syrs7Krs3KFs7u3W7JF48Ww48Wr1UXFs8GrWUZas7CF92kr18K3Wqqa47Z34kX3Wj yFZ5ZFyDXa1Uu37anT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUB014x267AKxVW8JVW5JwAFc2x0x2IEx4CE42xK8VAvwI8IcIk0 rVWrJVCq3wAFIxvE14AKwVWUJVWUGwA2ocxC64kIII0Yj41l84x0c7CEw4AK67xGY2AK02 1l84ACjcxK6xIIjxv20xvE14v26r1j6r1xM28EF7xvwVC0I7IYx2IY6xkF7I0E14v26r4j 6F4UM28EF7xvwVC2z280aVAFwI0_Cr0_Gr1UM28EF7xvwVC2z280aVCY1x0267AKxVW8Jr 0_Cr1UM2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj 6xIIjxv20xvE14v26r1j6r18McIj6I8E87Iv67AKxVWUJVW8JwAm72CE4IkC6x0Yz7v_Jr 0_Gr1lF7xvr2IY64vIr41lF7I21c0EjII2zVCS5cI20VAGYxC7M4IIrI8v6xkF7I0E8cxa n2IY04v7Mxk0xIA0c2IEe2xFo4CEbIxvr21lc2xSY4AK67AK6r4UMxAIw28IcxkI7VAKI4 8JMxC20s026xCaFVCjc4AY6r1j6r4UMI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2IqxVCjr7xv wVAFwI0_JrI_JrWlx4CE17CEb7AF67AKxVWUtVW8ZwCIc40Y0x0EwIxGrwCI42IY6xIIjx v20xvE14v26r1j6r1xMIIF0xvE2Ix0cI8IcVCY1x0267AKxVW8JVWxJwCI42IY6xAIw20E Y4v20xvaj40_WFyUJVCq3wCI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I 0E14v26r4j6r4UJbIYCTnIWIevJa73UjIFyTuYvjfUO_MaUUUUU X-CM-SenderInfo: p1dqw3xlh2x3gn0dqz5rrqw2lrqou0/ X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,NICE_REPLY_A, 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 On 02/11/2022 06:23 PM, Daniel Borkmann wrote: > On 2/11/22 9:57 AM, Tiezhu Yang wrote: >> Currently, it is not possible to set bpf_jit_enable to 1 by default >> and the users can change it to 0 or 2, it seems bad for some users, >> make BPF_JIT_DEFAULT_ON selectable to give them a chance. > > I'm not fully sure I follow the above, so you are saying that a kconfig of > !BPF_JIT_ALWAYS_ON and ARCH_WANT_DEFAULT_BPF_JIT, enables > BPF_JIT_DEFAULT_ON > however in such setting you are not able to reset bpf_jit_enable back to > 0 at > runtime? Oh, no. Sorry for the unclear description. currently, only x86, arm64 and s390 select ARCH_WANT_DEFAULT_BPF_JIT, the other archs do not select ARCH_WANT_DEFAULT_BPF_JIT. On the archs without ARCH_WANT_DEFAULT_BPF_JIT, if we want to set bpf_jit_enable to 1 by default, the only way is to enable CONFIG_BPF_JIT_ALWAYS_ON, then the users can not change it to 0 or 2, it seems bad for some users, we can select ARCH_WANT_DEFAULT_BPF_JIT for those archs if it is proper, but at least for now, make BPF_JIT_DEFAULT_ON selectable can give them a chance. Additionaly, with this patch, under !BPF_JIT_ALWAYS_ON, we can disable BPF_JIT_DEFAULT_ON on the archs with ARCH_WANT_DEFAULT_BPF_JIT when make menuconfig, it seems flexible for some developers. If you are OK, I will update the commit message and then send v2. Thanks, Tiezhu > > Thanks, > Daniel