Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp123522pxu; Wed, 25 Nov 2020 15:04:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJxYuK1Qn8hbofnaVNwzHX6m0lR2lnkUc76iQVndowzNut7iwdbHGrgCPLh+aVfWz7tGLSZf X-Received: by 2002:aa7:cb58:: with SMTP id w24mr5711739edt.35.1606345483893; Wed, 25 Nov 2020 15:04:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606345483; cv=none; d=google.com; s=arc-20160816; b=l96o43sNXRPfaw4rmVBNjynVbVrxkmgxl6zPsguLad5Hxt/cSd+fj3HE1mzmAbQ4v0 nm038kOGN2Q92nqIAxE0XDsZnuveHhw5dsS5nVG9qH3nKRPFeLgQqqWM4U4vH2yoKnz9 bq0n8EThqvDOSmi/pKUhrX6uwz47hdAgIVDof51LhZLz3A+LYXyKjXw8gz5y3uhYwOKk SGXzMdDmbb4mh76UThFENbEmgxDpQslJldhYSPKxMTaovpvuoEsHt9shYC/Q95zsPnEx rPZsS4jxP3oizXbGCls1XI9Iv8ynHxXIKPggr/rmnkwxykaA2Kiv+yyjRE1co0Ht2mSz pM1A== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=7601thnHkntpNIOwi9/ztYVqwkzPWAcJD2bE33sJZNE=; b=SW0YenD/zinj0x9leTjz0tOrfi1R6oliLWNjmL8PB+pkEaOleFYv2e3ziuimFxcve7 i18Puo0OsJXu16bevLEvEeHyp/TCPt8CgHZDeXiiw3Uwrda155UJcyfZ9lKAu7u9KiSq 6KR4R5tKe0dRoyG7o9hku+i+mYV68Q/8Ly8pXCkSA2uv6sTS48/PYaFkt71SMXkdIkav cMBHDTr03HtQxgztNejxZSTRaNECkKDG5JBkSN4H9+tq0FC7hjFMBaxQGI/wWH+FEmEB AaIImrV/t1/gm+rOBC1v3b9tgHZclRd8aXOJLxbhKOzD+IGvKNNvjmpiUh2EexHCPnfx 5j6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="t/ziLLWQ"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cm4si1983387edb.294.2020.11.25.15.04.12; Wed, 25 Nov 2020 15:04:43 -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; dkim=pass header.i=@kernel.org header.s=default header.b="t/ziLLWQ"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730073AbgKYUnQ (ORCPT + 99 others); Wed, 25 Nov 2020 15:43:16 -0500 Received: from mail.kernel.org ([198.145.29.99]:36830 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729111AbgKYUnP (ORCPT ); Wed, 25 Nov 2020 15:43:15 -0500 Received: from kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com (unknown [163.114.132.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D07E1206F9; Wed, 25 Nov 2020 20:43:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1606336995; bh=19NyyXgzTkJppECGsDPkjrBwfFr4gigQN43AMQEHkwI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=t/ziLLWQZO4jn6MUI5afmp+MWnpyeMeZ8FMU0LGxlgXRswHLR18PwO9/aG/+wS/dY DyulRRr4DagfIKuhMiMQirzHe+3BmEPn25yt+7fpD6evotDAisJr7dL+q6jiDAvGR9 tmvy2k0TsCMNusTCXRjUNpz93c1gUcgRnbM1Tz9A= Date: Wed, 25 Nov 2020 12:43:13 -0800 From: Jakub Kicinski To: Marco Elver Cc: davem@davemloft.net, johannes@sipsolutions.net, a.nogikh@gmail.com, andreyknvl@google.com, dvyukov@google.com, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-wireless@vger.kernel.org, idosch@idosch.org, fw@strlen.de, willemb@google.com Subject: Re: [PATCH net-next] net: switch to storing KCOV handle directly in sk_buff Message-ID: <20201125124313.593fc2b5@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> In-Reply-To: <20201125173436.1894624-1-elver@google.com> References: <20201125173436.1894624-1-elver@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Wed, 25 Nov 2020 18:34:36 +0100 Marco Elver wrote: > diff --git a/net/core/skbuff.c b/net/core/skbuff.c > index ffe3dcc0ebea..070b1077d976 100644 > --- a/net/core/skbuff.c > +++ b/net/core/skbuff.c > @@ -233,6 +233,7 @@ struct sk_buff *__alloc_skb(unsigned int size, gfp_t gfp_mask, > skb->end = skb->tail + size; > skb->mac_header = (typeof(skb->mac_header))~0U; > skb->transport_header = (typeof(skb->transport_header))~0U; > + skb_set_kcov_handle(skb, kcov_common_handle()); > > /* make sure we initialize shinfo sequentially */ > shinfo = skb_shinfo(skb); > @@ -249,9 +250,6 @@ struct sk_buff *__alloc_skb(unsigned int size, gfp_t gfp_mask, > > fclones->skb2.fclone = SKB_FCLONE_CLONE; > } > - > - skb_set_kcov_handle(skb, kcov_common_handle()); Why the move? > out: > return skb; > nodata: > @@ -285,8 +283,6 @@ static struct sk_buff *__build_skb_around(struct sk_buff *skb, > memset(shinfo, 0, offsetof(struct skb_shared_info, dataref)); > atomic_set(&shinfo->dataref, 1); > > - skb_set_kcov_handle(skb, kcov_common_handle()); > - > return skb; > } And why are we dropping this? If this was omitted in earlier versions it's just a independent bug, I don't think build_skb() will call __alloc_skb(), so we need a to set the handle here.