Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp705871ybl; Fri, 10 Jan 2020 05:28:44 -0800 (PST) X-Google-Smtp-Source: APXvYqwyDg6VKJILau6S9oMja+/lIiJ4ME45aosVjhYzEOP881LsodAOq87mcIM74uOZB6XWotca X-Received: by 2002:aca:b1d4:: with SMTP id a203mr2116041oif.150.1578662924705; Fri, 10 Jan 2020 05:28:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578662924; cv=none; d=google.com; s=arc-20160816; b=gfDJo5Jqsqnhh0ULo2ufbYpNO33zBDGCH523V4nYT1IHssCLURB6OYxFAAYL+i2trE oByXHLVu5vuw8NzaVR7LzTgqAqTHZzobjehck4AyqvwD3DcUPhAH6ciMzGrhGjGsRFDa /SyOss6mD1LfA6FvWtccLRN61+y0tXCO6m03O2OWkZnOcBuaBWVED5BrBi5HfWl++0HP 3ir3aEXL6yEIdZzWftecmFezko3QGiDWD2LL4ItDi6GRQt8rgcDI+FlVMgPGa8A9i4Jt gBinu5wuD2phQ8SdvDNp3YBRHFPrqoH84iXOAYt1UAw2Rjc5aIPUdzr5qldemP40Fw+L 67kQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=AUwd8glpr6kfXtb89k6x9PBA9ykDSCHrcjOXwyj5hTA=; b=HzwfcAEnMC7qZobCnugE4tQ/S0ItGVHFd4SKJfMv6ZFFB7VCl1GDLhGBGh/rblB3KM Wf3nOKRCOEKhZgHwdXs66/j0uKzpbu9fT5bukq6A56t1Y6pX0jTsESlYD5qe15TpSAc3 G4l3BDTmLE/Cf8NyiyfRYtGabQ11RrO215LwdqoNNahCJWzT6JlJ80JL1WC5NUliIA7l v1DKAHK2TPSoTXR26uSWgXR0zAMjdGQPzrHZCVduwZV0HI6MVdsAriKShEtN6qNX65bP jiZPtiwKYyiTlpT9aN1dYKNQ4HVbGSmJcNwoFHma2+ooy/rHClfTQZOu764K8rq+yqM0 fQLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cloudflare.com header.s=google header.b=Ua35ReYL; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=cloudflare.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w19si1273844otj.209.2020.01.10.05.28.32; Fri, 10 Jan 2020 05:28:44 -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=@cloudflare.com header.s=google header.b=Ua35ReYL; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=cloudflare.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728213AbgAJN1e (ORCPT + 99 others); Fri, 10 Jan 2020 08:27:34 -0500 Received: from mail-oi1-f170.google.com ([209.85.167.170]:42620 "EHLO mail-oi1-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727831AbgAJN1c (ORCPT ); Fri, 10 Jan 2020 08:27:32 -0500 Received: by mail-oi1-f170.google.com with SMTP id 18so1804794oin.9 for ; Fri, 10 Jan 2020 05:27:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloudflare.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=AUwd8glpr6kfXtb89k6x9PBA9ykDSCHrcjOXwyj5hTA=; b=Ua35ReYLIwp5dAjcfnRe5d717jLPnKQgnOXgwoQa55EKXMOyC62yk19zvYaYTRpOk9 W3EkIJ8KAInm0Gi/SBabPmttucc5vhWdBkJCWmCCM2YFIRGDXIl0x1owC9dTR7zBbJaV WWz4MAs/RlsTY82k3bvZe1mgkRTBbDbwbYdhg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=AUwd8glpr6kfXtb89k6x9PBA9ykDSCHrcjOXwyj5hTA=; b=BqVM0yob9ziHmbQbOcGnWlVrn3e6tpJtfWs2Js9FV4a9WSremtdiqkR9pE202geGs0 UE/sdRIie9LU/pCZ2gwvsvGZVrjStXqNaoJUNIDZmfTGU/naX5X5EHg7edoLdMmeOGjQ QnQD6tUgIWwp7pHB/eq/15cRm2dTuw3LjnUwN8I8c28LZkpcw+F4Rne7x13ntG3LauMi wotoQObRe67yIIYDAw6apVLCEaQu4tRQF/hAbjUgTQQ/EQtA82wDenrJpbs8iA89ixC/ hiIXq3z1dOS4Je4Ou/GJTlMbxXOb7WOZda4/0TQigg/ttinJ4iTamSLD6hqWkeNChoOU k54g== X-Gm-Message-State: APjAAAUMX/lWxUWeuMBIsACUFquPUGGzgTVVJuIJ6YO4jUoNA9MhsBpp Swd5sK7XbvoGJWMgzk/lMUgJBTfSqi530BsQq3fLk2fCHHM= X-Received: by 2002:aca:b60a:: with SMTP id g10mr2064783oif.102.1578662851371; Fri, 10 Jan 2020 05:27:31 -0800 (PST) MIME-Version: 1.0 References: <20200109115749.12283-1-lmb@cloudflare.com> <20200109115749.12283-2-lmb@cloudflare.com> <20200109182335.um72tp73krvvubnl@kafai-mbp.dhcp.thefacebook.com> In-Reply-To: <20200109182335.um72tp73krvvubnl@kafai-mbp.dhcp.thefacebook.com> From: Lorenz Bauer Date: Fri, 10 Jan 2020 13:27:19 +0000 Message-ID: Subject: Re: [PATCH bpf 1/1] net: bpf: don't leak time wait and request sockets To: Martin Lau Cc: Alexei Starovoitov , Daniel Borkmann , "David S. Miller" , Joe Stringer , "netdev@vger.kernel.org" , "bpf@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "kernel-team@cloudflare.com" , "edumazet@google.com" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 9 Jan 2020 at 18:23, Martin Lau wrote: > > Would this work too? > if (!sk_fullsock(sk) || !sock_flag(sk, SOCK_RCU_FREE)) Thank you for the suggestion, this makes the patch much nicer. -- Lorenz Bauer | Systems Engineer 6th Floor, County Hall/The Riverside Building, SE1 7PB, UK www.cloudflare.com