Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3153714pxb; Mon, 1 Nov 2021 08:47:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzeUtxbb1PSKKuk+Kk1euhWMIg3zleczzTuj2NTLehJKZj9yqyUI9i6vjwuHxtT3B6zYzkV X-Received: by 2002:a05:6402:1911:: with SMTP id e17mr40792291edz.62.1635781644898; Mon, 01 Nov 2021 08:47:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635781644; cv=none; d=google.com; s=arc-20160816; b=yWPnWHJoiq2t+clJTRp9pv3O9rn97nusOfZNp6s54ZGQxwWzX2gGjwvzLYibWEI6me HwOnRo1KeWMF5vZQoPTsLv7aKtOMbGWJn+AVLPFsuXjUV0dPOoGARIgdyK24a55JFcTk ilkEcLH3ahtMHuXio4opFaLXbtPSW2Z1hSdftCteh1g1WwMSfBjIKcd70i6+mWtG2MY4 AJ8eNl2VJLs5JzssRPMcullDLtxtpEGvjs1ShfpXjqMp/Gv4k2SDZ8F32Y9GCZ/E+W/g ZTgEXEn3buDGJ1H1sLaurIwPCjBfB8Gg9CuST88E0BkhUElAmpNrG+NeDsTKBbriGhpm Ntjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=SvrByuHTySHFpZ4DkTyZLijGb+ZtRH1wXpGVN2BTKs8=; b=aGg5aN3YMlZFvkwEkt/Q/xhj4/povVvxoEa+T8DWhqs4XhjMAyLkqWnGKPbe7XGrMP IgzcXOcgFZfbN5ZABbC8IY0K1SrAaF8F0U3iSkgYenAaAanQ9xMDdwBQQqQs64rep64X 7AltyRnVI438BPb8EymdT6eKh49zAA9GBBwnQXR/NewMYIN3H14kSKZlIvYR8LL4lL/x D+N4dLokWMuGXYqBymjfcdejGQutkRPXa13Ko4SGx1ttMDd0y3EzNXjZwi+r7u00/Kv1 rFvBKXG+H0bnk9Mvy6kvhbbZiamu/4D+IZikoxkQQq0QNy/xOXj5YTtEe89YNsli1p0t 80Gg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r16si5955326edc.216.2021.11.01.08.46.57; Mon, 01 Nov 2021 08:47:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232626AbhKAPrd (ORCPT + 99 others); Mon, 1 Nov 2021 11:47:33 -0400 Received: from www62.your-server.de ([213.133.104.62]:41768 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229658AbhKAPrc (ORCPT ); Mon, 1 Nov 2021 11:47:32 -0400 Received: from sslproxy02.your-server.de ([78.47.166.47]) by www62.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92.3) (envelope-from ) id 1mhZUS-000Eo3-QG; Mon, 01 Nov 2021 16:44:52 +0100 Received: from [85.1.206.226] (helo=linux.home) by sslproxy02.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mhZUS-0002JX-DH; Mon, 01 Nov 2021 16:44:52 +0100 Subject: Re: [PATCH bpf-next v3] bpf: Change value of MAX_TAIL_CALL_CNT from 32 to 33 To: Tiezhu Yang , Alexei Starovoitov , Andrii Nakryiko Cc: netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org, Xuefeng Li , Johan Almbladh , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , illusionist.neo@gmail.com, zlim.lnx@gmail.com, naveen.n.rao@linux.ibm.com, luke.r.nels@gmail.com, xi.wang@gmail.com, bjorn@kernel.org, iii@linux.ibm.com, hca@linux.ibm.com, gor@linux.ibm.com, udknight@gmail.com, davem@davemloft.net References: <1635508430-2918-1-git-send-email-yangtiezhu@loongson.cn> From: Daniel Borkmann Message-ID: Date: Mon, 1 Nov 2021 16:44:51 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <1635508430-2918-1-git-send-email-yangtiezhu@loongson.cn> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Authenticated-Sender: daniel@iogearbox.net X-Virus-Scanned: Clear (ClamAV 0.103.3/26340/Mon Nov 1 09:21:46 2021) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/29/21 1:53 PM, Tiezhu Yang wrote: [...] > diff --git a/kernel/bpf/core.c b/kernel/bpf/core.c > index b6c72af..6d10292 100644 > --- a/kernel/bpf/core.c > +++ b/kernel/bpf/core.c > @@ -1565,7 +1565,8 @@ static u64 ___bpf_prog_run(u64 *regs, const struct bpf_insn *insn) > > if (unlikely(index >= array->map.max_entries)) > goto out; > - if (unlikely(tail_call_cnt > MAX_TAIL_CALL_CNT)) > + > + if (unlikely(tail_call_cnt == MAX_TAIL_CALL_CNT)) > goto out; > Why making it less robust by going with == rather than >= ?