Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp3391206ybn; Fri, 27 Sep 2019 05:48:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqyjOfHewe9GfT2u48QgmWjk3kpct0qemZnHftnSfCspqOJJwQt/XubeyUSuUuo1w9PGN9Oj X-Received: by 2002:a17:906:5644:: with SMTP id v4mr7543039ejr.52.1569588491850; Fri, 27 Sep 2019 05:48:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569588491; cv=none; d=google.com; s=arc-20160816; b=PFyDUMZ0CuAF2MlSr3fd91rpTY4Q+UXJRFt8owdiGUyBmvrU1Xl4nAzs4mqmB+q/0N 5NSjSIinPImJXo4n9a6odn1uRBgHEjb8LrTex8cagMB51WaPLF5BWYfa7jY4RdEoJGqV CBq72mSdaDI3xIDX7eOn9ZdJeE4pnjyiP2BJMr1HahDwwE+7DC81WCPkwrCAIi6GwvfC kh26oH2XO8aU6xxH+NEPVV4Xa/ohVghnmg00drIHGH2A83/1xYtw5Ut3qnh+keiq4G9E VMCkfGaBHd4I2+jyvUSFhtM4xz4Sivzq1uYlMYr/sWUuEIfhBD7xMdu1vWSsEy11kwmJ ysCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=FWIZKilA/4wh4LLl8aJ2jifYv11EByWxSZ/77gxjPDM=; b=GC+Vv29W/Vc7Jatuxnvx0qr5KgIFLJ01FlXEtGs4n9ZZlUyNk4d6GWSB8N7TLMm73C +vw2rE8T3agHzNh0Eip4yCAH+r2h4fkwOeAbShLC1tpDoJKMernRXdClxuBxn3QqxL3T ZOxw3DgH5wiWo9n7qU9ICdkRE7InRtTeYlm2G7hNBYbIVszZMYtWxS3Y5wFR+kWKC03J SeD1geYahNnX4d0mjHET3XW/ViTXtAVcuXrmBnEXip+sUx+vt5JRTAEpm5chRYrKANyU EPHOpX3ENt4IB3cAB+RCCeRcLZS6YLjrpCcaFeVyJt9TvZLtM7HOtYspbYiPqpLuhtVH bQWg== ARC-Authentication-Results: i=1; mx.google.com; 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 20si2638277ejv.342.2019.09.27.05.47.47; Fri, 27 Sep 2019 05:48:11 -0700 (PDT) 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; 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 S1727573AbfI0Mov (ORCPT + 99 others); Fri, 27 Sep 2019 08:44:51 -0400 Received: from www62.your-server.de ([213.133.104.62]:43326 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725890AbfI0Mov (ORCPT ); Fri, 27 Sep 2019 08:44:51 -0400 Received: from [2a02:120b:2c12:c120:71a0:62dd:894c:fd0e] (helo=localhost) by www62.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89_1) (envelope-from ) id 1iDpc8-0004dT-ND; Fri, 27 Sep 2019 14:44:48 +0200 Date: Fri, 27 Sep 2019 14:44:48 +0200 From: Daniel Borkmann To: Allan Zhang Cc: songliubraving@fb.com, netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org, Stanislav Fomichev , Eric Dumazet Subject: Re: [PATCH 1/1] bpf: Fix bpf_event_output re-entry issue Message-ID: <20190927124448.GA22184@pc-66.home> References: <20190925234312.94063-1-allanzhang@google.com> <20190925234312.94063-2-allanzhang@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190925234312.94063-2-allanzhang@google.com> User-Agent: Mutt/1.12.1 (2019-06-15) X-Authenticated-Sender: daniel@iogearbox.net X-Virus-Scanned: Clear (ClamAV 0.101.4/25585/Fri Sep 27 10:25:33 2019) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 25, 2019 at 04:43:12PM -0700, Allan Zhang wrote: > BPF_PROG_TYPE_SOCK_OPS program can reenter bpf_event_output because it can > be called from atomic and non-atomic contexts since we don't have > bpf_prog_active to prevent it happen. > > This patch enables 3 level of nesting to support normal, irq and nmi > context. > > We can easily reproduce the issue by running neper crr mode with 100 flows > and 10 threads from neper client side. > > Here is the whole stack dump: [...] > > Fixes: a5a3a828cd00 ("bpf: add perf event notificaton support for sock_ops") > > Effort: BPF > Signed-off-by: Allan Zhang > Reviewed-by: Stanislav Fomichev > Reviewed-by: Eric Dumazet Applied, thanks!