From patchwork Wed Apr 25 08:18:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Yan X-Patchwork-Id: 134239 Delivered-To: patch@linaro.org Received: by 10.46.151.6 with SMTP id r6csp563541lji; Wed, 25 Apr 2018 01:19:50 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpuAOzL6q0vH3mOvZo9iUVJ4UHq++WByp4m0YA3qOe9XXG2s4igHXVzWrrqanwZdceuua5t X-Received: by 2002:a17:902:b709:: with SMTP id d9-v6mr1239936pls.188.1524644389982; Wed, 25 Apr 2018 01:19:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524644389; cv=none; d=google.com; s=arc-20160816; b=r5bNvmcxqFMbD7yQLNnpVSb0EspWxkmsZXtD3a5J7G7M07A0wr2qvKFVf3NTyetsCH X1lLT00Muu+akmyjqNgwrn9Pp8IEPculF1RFwhUHPEze5Urwv8Nxhzi8Aq7WW9wAwdis VDKlzE5fmJNapxqtH4fF5NwHC/0MfPYQ7Xa3cYeSE7JVUMhl7xV7W17Ro1PblyRW4H+L ZRivRGl9JlXdwz9uJ5WBsMvTH3lZgG69rConvyt+Zij7G9c0XFcm29jSE3+n3dih03DV v7OZlwDNUxw7ecHAPxuZeMU4FQ+pQvlq7+YSTfSfJ7/U50yPM4OFs4uGp7BmATrjK33Y pa4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=VqLjLtSzlszwdY0QbaK1fEQXDYdzjTwmx2ks8MNq5jc=; b=J/s2KNEGarQDjgohyTKsYQ5dZhNlQRKLynHSru60ohlvvlzMIXIY+KMTfxTPirP5bx 2MOFlzHQjw0jP1+igGj7Zu2itPJ3wm2GjtkXPz/pqD28Tw1ugL4GAedeuVp/W+Bw2w53 q8/yyuGK60Ur3M7kdYaCdy9eKU8L6F4rTX1gHPfTKiwhThrvWSBHe1YIYB1zfAj1SYxC zFpLvNK5bnwtwfu7X1b6HTyubpl76BlqaKIeSVDdLnTYUpYL8ngNQOu4wHdMEKWBkiML ujbinZsfGehmBeyL0Pyt38ZiWP7INVZTU7j25eOjRGscclXAAXH1qR8ukl6avICAhr3x vI+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FBvPL+2U; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u6-v6si14747022pls.11.2018.04.25.01.19.49; Wed, 25 Apr 2018 01:19:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FBvPL+2U; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751323AbeDYITq (ORCPT + 9 others); Wed, 25 Apr 2018 04:19:46 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:40289 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750945AbeDYITm (ORCPT ); Wed, 25 Apr 2018 04:19:42 -0400 Received: by mail-pf0-f195.google.com with SMTP id f189so5436238pfa.7 for ; Wed, 25 Apr 2018 01:19:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=VqLjLtSzlszwdY0QbaK1fEQXDYdzjTwmx2ks8MNq5jc=; b=FBvPL+2UqeFKmQUppkxf+JYS3nK3CuPv30XxVkgI/mJnLuahc7rzCYsj7quECiuHry VM4TN9LFVCXdv9MoF3wJB6Ls9qALGSXYifzIYJ7ICQrSeN7E+AztUs84X1giENscW0QR nJgSw/dTWVudLYi3Prwlhv6N51ZDCMiWYdAPw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=VqLjLtSzlszwdY0QbaK1fEQXDYdzjTwmx2ks8MNq5jc=; b=jPoPahOEqqmVJeHtDurezc6dgRp6veNzYdxxjsoY83rIsn6wmO29j2uKXbHEtHDjyx nfwaBfqHw8nVMLOMMCttKv1QJbkdcizHaAZU4CcL3yR0Li/7WJOw2UkWne396NRUogND jxCim9jfqDHF419zfJHAEG6Kwgj0b0nCgLIC0wjbrUNSNq5Y3tHvvQfnp0ejrE7MvrL+ +JkcKP98AjUvBd3ysxOZXnURqLt3BCIF+8WEur9qFJUHCuwkny95c2EWfl5A9fclTUBx 8A38OL276l/4+RVDLfRTAxaCLjtgJzQxjIO0kE+nvGvY/Fbf92nzxBF5DJyiC7nka/zz aKtw== X-Gm-Message-State: ALQs6tC1n78wifjTVZZMnk8d7WwaK/QLIG48FQfizraSyuzH3ZsOuyNf ngGF+QX2JlLMXbX3lATqx6T+6Q== X-Received: by 2002:a17:902:6c0b:: with SMTP id q11-v6mr17146530plk.135.1524644382283; Wed, 25 Apr 2018 01:19:42 -0700 (PDT) Received: from localhost.localdomain (li1168-94.members.linode.com. [45.79.69.94]) by smtp.gmail.com with ESMTPSA id e87sm29371491pfl.65.2018.04.25.01.19.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 25 Apr 2018 01:19:41 -0700 (PDT) From: Leo Yan To: "David S. Miller" , Alexei Starovoitov , Daniel Borkmann , Kirill Tkhai , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Leo Yan Subject: [PATCH bpf-next] bpf: Allow bpf_jit_enable = 2 with BPF_JIT_ALWAYS_ON config Date: Wed, 25 Apr 2018 16:18:42 +0800 Message-Id: <1524644322-9263-1-git-send-email-leo.yan@linaro.org> X-Mailer: git-send-email 1.9.1 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org After enabled BPF_JIT_ALWAYS_ON config, bpf_jit_enable always equals to 1; it is impossible to set 'bpf_jit_enable = 2' and the kernel has no chance to call bpf_jit_dump(). This patch relaxes bpf_jit_enable range to [1..2] when kernel config BPF_JIT_ALWAYS_ON is enabled so can invoke jit dump. Signed-off-by: Leo Yan --- net/core/sysctl_net_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 1.9.1 diff --git a/net/core/sysctl_net_core.c b/net/core/sysctl_net_core.c index b1a2c5e..6a39b22 100644 --- a/net/core/sysctl_net_core.c +++ b/net/core/sysctl_net_core.c @@ -371,7 +371,7 @@ static int proc_dointvec_minmax_bpf_enable(struct ctl_table *table, int write, .proc_handler = proc_dointvec_minmax_bpf_enable, # ifdef CONFIG_BPF_JIT_ALWAYS_ON .extra1 = &one, - .extra2 = &one, + .extra2 = &two, # else .extra1 = &zero, .extra2 = &two,