From: Dmitry Vyukov <firstname.lastname@example.org> To: Jakub Kicinski <email@example.com> Cc: Aleksandr Nogikh <firstname.lastname@example.org>, David Miller <email@example.com>, Johannes Berg <firstname.lastname@example.org>, Eric Dumazet <email@example.com>, Andrey Konovalov <firstname.lastname@example.org>, Marco Elver <email@example.com>, LKML <firstname.lastname@example.org>, netdev <email@example.com>, linux-wireless <firstname.lastname@example.org>, Aleksandr Nogikh <email@example.com> Subject: Re: [PATCH 1/2] net: store KCOV remote handle in sk_buff Date: Mon, 12 Oct 2020 08:04:33 +0200 [thread overview] Message-ID: <CACT4Y+aEQoRMO6eA7iQZf4dhOu2cD1ZbbH6TT4Rs_uQwG0PWYg@mail.gmail.com> (raw) In-Reply-To: <firstname.lastname@example.org> On Sat, Oct 10, 2020 at 5:14 PM Jakub Kicinski <email@example.com> wrote: > > On Sat, 10 Oct 2020 09:54:57 +0200 Dmitry Vyukov wrote: > > On Sat, Oct 10, 2020 at 1:16 AM Jakub Kicinski <firstname.lastname@example.org> wrote: > > > On Wed, 7 Oct 2020 10:17:25 +0000 Aleksandr Nogikh wrote: > > > > From: Aleksandr Nogikh <email@example.com> > > > > > > > > Remote KCOV coverage collection enables coverage-guided fuzzing of the > > > > code that is not reachable during normal system call execution. It is > > > > especially helpful for fuzzing networking subsystems, where it is > > > > common to perform packet handling in separate work queues even for the > > > > packets that originated directly from the user space. > > > > > > > > Enable coverage-guided frame injection by adding a kcov_handle > > > > parameter to sk_buff structure. Initialization in __alloc_skb ensures > > > > that no socket buffer that was generated during a system call will be > > > > missed. > > > > > > > > Code that is of interest and that performs packet processing should be > > > > annotated with kcov_remote_start()/kcov_remote_stop(). > > > > > > > > An alternative approach is to determine kcov_handle solely on the > > > > basis of the device/interface that received the specific socket > > > > buffer. However, in this case it would be impossible to distinguish > > > > between packets that originated from normal background network > > > > processes and those that were intentionally injected from the user > > > > space. > > > > > > > > Signed-off-by: Aleksandr Nogikh <firstname.lastname@example.org> > > > > > > Could you use skb_extensions for this? > > > > Why? If for space, this is already under a non-production ifdef. > > I understand, but the skb_ext infra is there for uncommon use cases > like this one. Any particular reason you don't want to use it? > The slight LoC increase? > > Is there any precedent for adding the kcov field to other performance > critical structures? I see. Yes, increase in complexity for no gain. No, KCOV context wasn't added to anything as critical as sk_buff. It seems there is no established practice both ways -- I don't see anything debug-related in sk_buff nor in skb_ext_id...
next prev parent reply other threads:[~2020-10-12 6:04 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 [this message] 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 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=CACT4Y+aEQoRMO6eA7iQZf4dhOu2cD1ZbbH6TT4Rs_uQwG0PWYg@mail.gmail.com \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --subject='Re: [PATCH 1/2] net: store KCOV remote handle in sk_buff' \ /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
This is a public inbox, see mirroring instructions on how to clone and mirror all data and code used for this inbox