Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1637705ybl; Thu, 5 Dec 2019 04:46:19 -0800 (PST) X-Google-Smtp-Source: APXvYqzn5pQuT3xp+1hmmwBdBikeFuw7qlLSNjkuTguOwN2afdiVqjSM/q5qAdJTOAGrB0aw6S1g X-Received: by 2002:aca:b588:: with SMTP id e130mr6763060oif.169.1575549979645; Thu, 05 Dec 2019 04:46:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575549979; cv=none; d=google.com; s=arc-20160816; b=IIuC3Xxmc2NCssjBQqht78DUYbyvk/GEcaby7c8hrg+PnoNFpxDjjoyiGkqitkfKrv 5fo4OVFbf91gG+Wlu5cY4x4IOWuCF8f6RPspyrIK+aPPSgDw+qXKPY7IJWlbV6a+crQF 8NOjWG6Ie/4gtTs8lZb6esFt2blnJx9/od7Ef5azwwjhLEAfe3pXaicM8J+tevjLFQTM 4D5QWJgtJ8V6kP8z2gUlQAPe0YqPvVJtHRsoByHdoQoeqTxEHMqEVP6F8y7iAvrt4rjS uUG3WBmPZ8esJbS3lCXde6kbMiJqHPfwD0Q5n6h6GRPD/lTaycyrTDI0x/vBEs+B/vPr c8Kg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:user-agent:subject:cc:to:from :date:content-transfer-encoding:mime-version:dkim-filter :dkim-signature:dkim-filter; bh=/HwG0dFNg/hWKid+bfXzTVGWal/DPp90hVFX4aHbrbc=; b=MFC+yGKsGnPDMkOvTNT/E+k5jOmvSQTAQubHGJ5C3fSsH45BY2Rou0HZsgTgOARlmC z9v+yLA4tgvniWfQLqVlyYTXeLAdA3VMM6WSrSwPIkD9rbFvkYS1GXhcOQoHzven2f8n iaOZvE1CF3aQifwEFN8gYBtuvhYJ55htUyCowCw0tTaKtXwBNn3qfEt9TKe2WlUg+qA5 4zh0Y3eUHHgV/PB7VtqACZZWmKyHeAk3ubzng3JUpOgxGPWQES3V47j8JhKfd5D1RR+2 O9XS2hoiZmwc0WA5RvSov94kYh2m4DDyQJHiyJxx3GZSF+kZ1StVY/beUpoj3qNNPZwx N2wA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dlink.ru header.s=mail header.b=h0qVKVkg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 16si5006772otn.228.2019.12.05.04.46.06; Thu, 05 Dec 2019 04:46:19 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=@dlink.ru header.s=mail header.b=h0qVKVkg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729408AbfLEMph (ORCPT + 99 others); Thu, 5 Dec 2019 07:45:37 -0500 Received: from fd.dlink.ru ([178.170.168.18]:34278 "EHLO fd.dlink.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729096AbfLEMph (ORCPT ); Thu, 5 Dec 2019 07:45:37 -0500 Received: by fd.dlink.ru (Postfix, from userid 5000) id BA9151B2120E; Thu, 5 Dec 2019 15:45:34 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 fd.dlink.ru BA9151B2120E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dlink.ru; s=mail; t=1575549934; bh=/HwG0dFNg/hWKid+bfXzTVGWal/DPp90hVFX4aHbrbc=; h=Date:From:To:Cc:Subject; b=h0qVKVkg/afttyYI0TPqWQxoWE7CX/0o+OlWKNMDa38VoiEfPQIwqQ9gEzuxu3AuI I+1TS9e8R/GXiVI+s2UXnwl76b7/Mugj7pyWAuMN3pdNxAtt2GEPvco0nwCjyd9T6v EEL3gg/GLINRC37K0Zf5KkF1sgD13+VgW4Zzf0Vs= X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail.dlink.ru X-Spam-Level: X-Spam-Status: No, score=-99.2 required=7.5 tests=BAYES_50,USER_IN_WHITELIST autolearn=disabled version=3.4.2 Received: from mail.rzn.dlink.ru (mail.rzn.dlink.ru [178.170.168.13]) by fd.dlink.ru (Postfix) with ESMTP id 31A891B20153; Thu, 5 Dec 2019 15:45:28 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 fd.dlink.ru 31A891B20153 Received: from mail.rzn.dlink.ru (localhost [127.0.0.1]) by mail.rzn.dlink.ru (Postfix) with ESMTP id CB0771B217D8; Thu, 5 Dec 2019 15:45:27 +0300 (MSK) Received: from mail.rzn.dlink.ru (localhost [127.0.0.1]) by mail.rzn.dlink.ru (Postfix) with ESMTPA; Thu, 5 Dec 2019 15:45:27 +0300 (MSK) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Thu, 05 Dec 2019 15:45:27 +0300 From: Alexander Lobakin To: Paul Burton Cc: Hassan Naveed , Ralf Baechle , James Hogan , Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , Andrii Nakryiko , netdev@vger.kernel.org, bpf@vger.kernel.org, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org Subject: MIPS eBPF JIT support on pre-32R2 User-Agent: Roundcube Webmail/1.4.0 Message-ID: <09d713a59665d745e21d021deeaebe0a@dlink.ru> X-Sender: alobakin@dlink.ru Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hey all, I'm writing about lines arch/mips/net/ebpf_jit.c:1806-1807: if (!prog->jit_requested || MIPS_ISA_REV < 2) return prog; Do pre-32R2 architectures (32R1, maybe even R3000-like) actually support this eBPF JIT code? If they do, then the condition 'MIPS_ISA_REV < 2' should be removed as it is always true for them and tells CC to remove JIT completely. If they don't support instructions from this JIT, then the line arch/mips/Kconfig:50: select HAVE_EBPF_JIT if (!CPU_MICROMIPS) should be changed to something like: select HAVE_EBPF_JIT if !CPU_MICROMIPS && TARGET_ISA_REV >= 2 (and then the mentioned 'if' condition would become redundant) At the moment it is possible to build a kernel without both JIT and interpreter, but with CONFIG_BPF_SYSCALL=y (what should not be allowed I suppose?) within the following configuration: - select any pre-32R2 CPU (e.g. CONFIG_CPU_MIPS32_R1); - enable CONFIG_BPF_JIT (CONFIG_MIPS_EBPF_JIT will be autoselected); - enable CONFIG_BPF_JIT_ALWAYS_ON (this removes BPF interpreter from the system). I may prepare a proper patch by myself if needed (after clarification). Thanks. Regards, ᚷ ᛖ ᚢ ᚦ ᚠ ᚱ