netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Aleksandr Nogikh <a.nogikh@gmail.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: davem@davemloft.net, kuba@kernel.org,
	Eric Dumazet <edumazet@google.com>,
	Andrey Konovalov <andreyknvl@google.com>,
	Dmitry Vyukov <dvyukov@google.com>,
	Marco Elver <elver@google.com>,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	linux-wireless@vger.kernel.org, nogikh@google.com
Subject: Re: [PATCH 1/2] net: store KCOV remote handle in sk_buff
Date: Mon, 12 Oct 2020 13:10:05 +0300	[thread overview]
Message-ID: <CADpXja_PYfwBcigR-D9m7bsJg-fnPN921YeOrJJzYZTM3PftjQ@mail.gmail.com> (raw)
In-Reply-To: <c310818ecec06fe34d535bb61f3a50a1cf669f40.camel@sipsolutions.net>

On Mon, 12 Oct 2020 at 10:12, Johannes Berg <johannes@sipsolutions.net> wrote:
[...]
> > @@ -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());
>
> Btw, you're only setting this here. It seems to me it would make sense
> to copy it when the skb is copied, rather than then having it set to the
> kcov handle of the (interrupted) task that was copying the skb?
>
> johannes
>

The field is added to the part of sk_buff that is between
headers_start and headers_end, therefore skb_copy will copy the field
to the newly created buffer. So in the case of copying it will be
initialized, and then overwritten. Probably, it's not the most
efficient way, but it seems to be the same for some other
fields that are initialized in __alloc_skb.

  reply	other threads:[~2020-10-12 10:10 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-07 10:17 [PATCH 0/2] net, mac80211: enable KCOV remote coverage collection for 802.11 frame handling Aleksandr Nogikh
2020-10-07 10:17 ` [PATCH 1/2] net: store KCOV remote handle in sk_buff Aleksandr Nogikh
2020-10-09 23:15   ` Jakub Kicinski
2020-10-10  7:54     ` Dmitry Vyukov
2020-10-10 15:14       ` Jakub Kicinski
2020-10-12  6:04         ` Dmitry Vyukov
2020-10-13 15:59           ` Aleksandr Nogikh
2020-10-13 16:50             ` Jakub Kicinski
2020-10-15 19:04               ` Willem de Bruijn
2020-10-16 14:20                 ` Aleksandr Nogikh
2020-10-12  7:12   ` Johannes Berg
2020-10-12 10:10     ` Aleksandr Nogikh [this message]
2020-10-07 10:17 ` [PATCH 2/2] mac80211: add KCOV remote annotations to incoming frame processing Aleksandr Nogikh
2020-10-07 11:48 ` [PATCH 0/2] net, mac80211: enable KCOV remote coverage collection for 802.11 frame handling Johannes Berg
2020-10-07 14:40   ` Aleksandr Nogikh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CADpXja_PYfwBcigR-D9m7bsJg-fnPN921YeOrJJzYZTM3PftjQ@mail.gmail.com \
    --to=a.nogikh@gmail.com \
    --cc=andreyknvl@google.com \
    --cc=davem@davemloft.net \
    --cc=dvyukov@google.com \
    --cc=edumazet@google.com \
    --cc=elver@google.com \
    --cc=johannes@sipsolutions.net \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nogikh@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).