X-Received: by 2002:a05:6402:4491:b0:413:162a:fc85 with SMTP id er17-20020a056402449100b00413162afc85mr176538edb.115.1645633540116; Wed, 23 Feb 2022 08:25:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645633540; cv=none; d=google.com; s=arc-20160816; b=Quj2lGSSx+uWDyoNTnQgkg+C84ghlvQvZW1qUgz4oDh/Q+KTQVg5pCxNRvKsYNsoSv w6IFYyVOTufM/L/XxbxwQ1N1FBTZuGFJG4TCFEmI+owlMroiqKIkW4hQQMoR9h+8AD0f +I6h7joFM10kv7Q6K7Q/Kg5sqM2lnjlZML+qoksKkRqGCXR/nuOgjjjfFENzYUs1uXRZ uaoJYTZdCFZ+EYdG3y0A9B67rhdBeIa6OFwVI2d1SHjeUOkVqUQcK8v3oiq8hcGaz7HZ vbhBFgC9gWssZJvS5sU4QwyX5ul+I0NrfosvZjZ5/aoPkMndFNZvK7hh0b8cTzXQsswI aWtw== 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=RpQ+yXG3WFaffUN6V0S3i2gI2RX67GakuK4ftCRhl4U=; b=awy+KgBGzt0+ixO2MbZVmv/DyBnNmk0D/hVvgjPceKLNaSOULfzwF28GsVoh+z7Sfp d06k2YgZpEteAYLvRV4Dx9ZqpkP5uR4qsUMI8ssKytLoYsFuwKDo+0VwLegtGvmmu36H rdEx81R5kb+C5StE8nSB00ZkWNRAkAOJALmZpLVfyL5gPvRJRVskRzJahE3/MtAGigZD 2qMYuI4trF+VYQKyZQDGysAUY2RgKaNNFTt+oklIWKHAl9Zdh6UkenV/ymqF0/HN0XTK j6FLHlQWJDKyV7BdPVb4opZYSGRFabf+xxv4hc5t9g9z5Yas4iZ1WeOj4ltNfxDs1obp A4Yw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Fpa7IScX; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hc43si11163ejc.542.2022.02.23.08.25.14; Wed, 23 Feb 2022 08:25:40 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Fpa7IScX; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234547AbiBWFhA (ORCPT + 99 others); Wed, 23 Feb 2022 00:37:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51090 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235021AbiBWFg4 (ORCPT ); Wed, 23 Feb 2022 00:36:56 -0500 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E02C3AA4A; Tue, 22 Feb 2022 21:27:04 -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 sin.source.kernel.org (Postfix) with ESMTPS id 2EDA9CE13B5; Wed, 23 Feb 2022 05:26:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9BC17C340F8; Wed, 23 Feb 2022 05:26:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1645594011; bh=RpQ+yXG3WFaffUN6V0S3i2gI2RX67GakuK4ftCRhl4U=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=Fpa7IScXDsqk4ECKhcoTOYPxb0jIoj+13R+KevQRg78oaEY9jTJGymNzCAv2JRrSa +7FWqta9tHZ5T7PmpBlQcbu/c1JZFx4LbwsYA/5ZM6fbyUyeZh3EdWg1M6yZ/fyozF G/aBkk2/QuLR6aeVxxBKrwx0OmYuUSeCXV2i1vjEOxatqRcWNqyv0y0i4kDSDfydKP PFrCbq1B2NzdboETdiCwYYTlwrfYsaX0J62cUmo5yCdnU4oi6L8rDifiW+G1jyMdQL bz1f0DIJaD7N3ODopsDhucvNFAr97h+0ZcjBsa2ggKEfE+cPLcuwAvxmL45KZD1ojh qpIdpilxoOtrw== Received: by mail-yw1-f182.google.com with SMTP id 00721157ae682-2d625082ae2so198333347b3.1; Tue, 22 Feb 2022 21:26:51 -0800 (PST) X-Gm-Message-State: AOAM533tQIaIoJii/On3HMzc3/e/zg9hQSIsQxv/i9ukljZqkEHrldKr 2vaKLX8owWWZOnevzw869iyIIkXcp8m45jdaC5U= X-Received: by 2002:a81:c47:0:b0:2d6:beec:b381 with SMTP id 68-20020a810c47000000b002d6beecb381mr22698552ywm.148.1645594010676; Tue, 22 Feb 2022 21:26:50 -0800 (PST) MIME-Version: 1.0 References: <1645523826-18149-1-git-send-email-yangtiezhu@loongson.cn> <1645523826-18149-3-git-send-email-yangtiezhu@loongson.cn> In-Reply-To: <1645523826-18149-3-git-send-email-yangtiezhu@loongson.cn> From: Song Liu Date: Tue, 22 Feb 2022 21:26:39 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH bpf-next v3 2/2] bpf: Make BPF_JIT_DEFAULT_ON selectable 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=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,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 Tue, Feb 22, 2022 at 1:57 AM Tiezhu Yang wrote: > > 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. > > Additionally, 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. > > Signed-off-by: Tiezhu Yang Acked-by: Song Liu