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.3 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_MUTT autolearn=ham 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 4053CC169C4 for ; Tue, 29 Jan 2019 08:59:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EF79F2177E for ; Tue, 29 Jan 2019 08:59:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="cRGzNQ4T" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725911AbfA2I70 (ORCPT ); Tue, 29 Jan 2019 03:59:26 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:35482 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725298AbfA2I7Z (ORCPT ); Tue, 29 Jan 2019 03:59:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=O4o2kF88y0puDpvnF+lutimFUa8oVPHDaaf3sPnXZAc=; b=cRGzNQ4TFkxPTOAQ+tkZys7UB LOJ6kqIuokXLnlKI5UMf6qUs7E8KSVWR9MqKnCzKT0U1IL6Cn3SdDb1JUOO6isendF3jiOassDhf6 deicGMsuj/Uf04vdrx33xDMTHaOefy0BoZFqrQgejy7zlwcElTS7kvVYLgQvTXYwHImzQsvqBcGSr NPkM9+qGa74Fj12eBI22hxy+431a9hBvq3QAFKOXB37bZbCpxiK+VVoRiVIAti2YW41/Zvf9BeGsR pOsnhMizvkLCBbixLtcGvHPmLK+GEzmmAqpyuoDQbWjcs1pP0RKGfkmlpn/aMhu2RN5Uts6xnup6S teWOvDh2Q==; Received: from [24.132.217.100] (helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1goPEh-0005Oa-Jq; Tue, 29 Jan 2019 08:59:15 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id D086B20289CC5; Tue, 29 Jan 2019 09:59:03 +0100 (CET) Date: Tue, 29 Jan 2019 09:59:03 +0100 From: Peter Zijlstra To: Alexei Starovoitov Cc: Alexei Starovoitov , davem@davemloft.net, daniel@iogearbox.net, jakub.kicinski@netronome.com, netdev@vger.kernel.org, kernel-team@fb.com, mingo@redhat.com, will.deacon@arm.com, Paul McKenney , jannh@google.com Subject: Re: [PATCH v4 bpf-next 1/9] bpf: introduce bpf_spin_lock Message-ID: <20190129085903.GC28485@hirez.programming.kicks-ass.net> References: <20190124041403.2100609-1-ast@kernel.org> <20190124041403.2100609-2-ast@kernel.org> <20190124180109.GA27771@hirez.programming.kicks-ass.net> <20190124235857.xyb5xx2ufr6x5mbt@ast-mbp.dhcp.thefacebook.com> <20190125091057.GK17749@hirez.programming.kicks-ass.net> <20190125234241.soomtkrgp2i7m7ul@ast-mbp.dhcp.thefacebook.com> <20190128084310.GC28467@hirez.programming.kicks-ass.net> <20190128213710.vjxnc2eq5rsisgfx@ast-mbp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190128213710.vjxnc2eq5rsisgfx@ast-mbp> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Mon, Jan 28, 2019 at 01:37:12PM -0800, Alexei Starovoitov wrote: > On Mon, Jan 28, 2019 at 09:43:10AM +0100, Peter Zijlstra wrote: > > Isn't that still broken? AFAIU networking progs can happen in task > > context (TX) and SoftIRQ context (RX), which can nest. > > Sure. sendmsg side of networking can be interrupted by napi receive. > Both can have bpf progs attached at different points, but napi won't run > when bpf prog is running, because bpf prog disables preemption. Disabling preemption is not sufficient, it needs to have done local_bh_disable(), which isn't unlikely given this is all networking code. Anyway, if you're sure that's all good, I'll trust you on that. It's been a very _very_ long time since I looked at the networking code.