Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp2141539pxb; Sat, 21 Nov 2020 10:13:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJwCj0pA8P7mCBeku871lVRdi24CMm3NDanEBO1dnJaxDT4YFz+LXwFExbuJeYcnhU/gECsb X-Received: by 2002:a50:ab15:: with SMTP id s21mr40212889edc.88.1605982426279; Sat, 21 Nov 2020 10:13:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605982426; cv=none; d=google.com; s=arc-20160816; b=blRMNq0SdJgQ6XLRzhiiB8q20mUmcTlLbovMbic/HVPf2572QH9cVFO6bN3HZ/x29t Bt9BcBl20scprLn1WSPrDfA+xxTheZG4OdKrUm1vhsWBFB1tDf3vTQ5y63BqCW3UpBGO iE/dCG94+i4nAZ7r6gg3NJOw3QaP2fjHSgEoEq4aXf4iaUQPq006HNo9XxQyqf4Q5JWY TC9wDn8gvXRQG6lQQ8dPAw4+mAV57Rw6jRJ3FI+d/+IiO6TGxXUAJ3oeE+3Uj/gkKbHM /iiM9sj0Cq0DcGHmIATARe7HDq6Oi86+O3XtO2MCayMuC2Cq7HD/7daNg23/NLSAZxdL UQ9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=ZfQjcw265pSfElCT5tlAJu4hgo9jD1sFYbYdGHJnxfo=; b=lZuQntHvmu17tb23+gsl6FhWp+TwpazOLyDoLBiNYxiir4AtmOuisjez9FhTPu5IYe gj7zmj8HdL2limO/odBxbSpx9qW6lkr1dsOc/SomoVgzM4Ibuzi4iR+W66IKgEnZWWk+ lyjdsNeu3ZgzO9yHRovVOitAIeVs5CupCxmB09s43UJwdQk9fbOlA45gRi/W57bfx7uq RqL+jZEHu542q91O9E//MoJVz8K20i8f+zsRZ4cs12WeH0hjSdMheCyTkeEva+jYiyqv Hc/eMTKUxG/CW8nTOVcJ+dfgoQjbMB0sVtvSj1kTLmGY0NFIXOzD2y8xwnLUs8NtN6u8 edpg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-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 t12si5112119edc.181.2020.11.21.10.13.22; Sat, 21 Nov 2020 10:13:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-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-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727215AbgKUSMa (ORCPT + 99 others); Sat, 21 Nov 2020 13:12:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34146 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726305AbgKUSMa (ORCPT ); Sat, 21 Nov 2020 13:12:30 -0500 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CFCC8C0613CF; Sat, 21 Nov 2020 10:12:29 -0800 (PST) Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.94) (envelope-from ) id 1kgXN0-00C6P4-DV; Sat, 21 Nov 2020 19:12:22 +0100 Message-ID: Subject: Re: [PATCH v5 2/3] net: add kcov handle to skb extensions From: Johannes Berg To: Jakub Kicinski , Florian Westphal Cc: Ido Schimmel , Aleksandr Nogikh , davem@davemloft.net, edumazet@google.com, andreyknvl@google.com, dvyukov@google.com, elver@google.com, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-wireless@vger.kernel.org, willemdebruijn.kernel@gmail.com, Aleksandr Nogikh , Willem de Bruijn Date: Sat, 21 Nov 2020 19:12:21 +0100 In-Reply-To: <20201121100636.26aaaf8a@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> References: <20201029173620.2121359-1-aleksandrnogikh@gmail.com> <20201029173620.2121359-3-aleksandrnogikh@gmail.com> <20201121160941.GA485907@shredder.lan> <20201121165227.GT15137@breakpoint.cc> <20201121100636.26aaaf8a@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.5 (3.36.5-1.fc32) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-malware-bazaar: not-scanned Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Sat, 2020-11-21 at 10:06 -0800, Jakub Kicinski wrote: > On Sat, 21 Nov 2020 17:52:27 +0100 Florian Westphal wrote: > > Ido Schimmel wrote: > > > Other suggestions? > > > > Aleksandr, why was this made into an skb extension in the first place? > > > > AFAIU this feature is usually always disabled at build time. > > For debug builds (test farm /debug kernel etc) its always needed. > > > > If thats the case this u64 should be an sk_buff member, not an > > extension. > > Yeah, in hindsight I should have looked at how it's used. Not a great > fit for extensions. We can go back, but... > > In general I'm not very happy at how this is going. First of all just > setting the handle in a couple of allocs seems to not be enough, skbs > get cloned, reused etc. There were also build problems caused by this > patch and Aleksandr & co where nowhere to be found. Now we find out > this causes leaks, how was that not caught by the syzbot it's supposed > to serve?! Heh. > So I'm leaning towards reverting the whole thing. You can attach > kretprobes and record the information you need in BPF maps. I'm not going to object to reverting it (and perhaps redoing it better later), but I will point out that kretprobe isn't going to work, you eventually need kcov_remote_start() to be called in strategic points before processing the skb after it bounced through the system. IOW, it's not really about serving userland, it's about enabling (and later disabling) coverage collection for the bits of code it cares about, mostly because collecting it for _everything_ is going to be too slow and will mess up the data since for coverage guided fuzzing you really need the reported coverage data to be only about the injected fuzz data... johannes