From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3A52EC00454 for ; Wed, 11 Dec 2019 13:00:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1597E21556 for ; Wed, 11 Dec 2019 13:00:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729346AbfLKNAR (ORCPT ); Wed, 11 Dec 2019 08:00:17 -0500 Received: from www62.your-server.de ([213.133.104.62]:53612 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727402AbfLKNAR (ORCPT ); Wed, 11 Dec 2019 08:00:17 -0500 Received: from [2001:1620:665:0:5795:5b0a:e5d5:5944] (helo=localhost) by www62.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89_1) (envelope-from ) id 1if1b9-0002Hf-CV; Wed, 11 Dec 2019 14:00:11 +0100 Date: Wed, 11 Dec 2019 14:00:10 +0100 From: Daniel Borkmann To: Paul Chaignon Cc: Paul Burton , =?iso-8859-1?Q?Bj=F6rn_T=F6pel?= , Mahshid Khezri , paul.chaignon@gmail.com, bpf@vger.kernel.org, netdev@vger.kernel.org, Alexei Starovoitov , Martin KaFai Lau , Song Liu , Yonghong Song , Andrii Nakryiko Subject: Re: [PATCH bpf 0/2] Limit tail calls to 33 in all JIT compilers Message-ID: <20191211130010.GA23015@linux.fritz.box> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) X-Authenticated-Sender: daniel@iogearbox.net X-Virus-Scanned: Clear (ClamAV 0.101.4/25660/Wed Dec 11 10:47:07 2019) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Mon, Dec 09, 2019 at 07:51:52PM +0100, Paul Chaignon wrote: > The BPF interpreter and all JIT compilers, except RISC-V's and MIPS', > enforce a 33-tail calls limit at runtime. Because of this discrepancy, a > BPF program can have a different behavior and output depending on whether > it is interpreted or JIT compiled, or depending on the underlying > architecture. > > This patchset changes the RISC-V and MIPS JIT compilers to limit tail > calls to 33 instead of 32. I have checked other BPF JIT compilers for the > same discrepancy. > > Paul Chaignon (2): > bpf, riscv: limit to 33 tail calls > bpf, mips: limit to 33 tail calls > > arch/mips/net/ebpf_jit.c | 9 +++++---- > arch/riscv/net/bpf_jit_comp.c | 4 ++-- > 2 files changed, 7 insertions(+), 6 deletions(-) Applied, thanks!