From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.4 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0EEA0C433E7 for ; Sat, 10 Oct 2020 07:56:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id ADB5D2078B for ; Sat, 10 Oct 2020 07:56:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="K74AqtWT" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729645AbgJJHzc (ORCPT ); Sat, 10 Oct 2020 03:55:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728994AbgJJHzK (ORCPT ); Sat, 10 Oct 2020 03:55:10 -0400 Received: from mail-qk1-x742.google.com (mail-qk1-x742.google.com [IPv6:2607:f8b0:4864:20::742]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6DBA6C0613CF for ; Sat, 10 Oct 2020 00:55:10 -0700 (PDT) Received: by mail-qk1-x742.google.com with SMTP id z6so13131257qkz.4 for ; Sat, 10 Oct 2020 00:55:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=FIbfa8CnKY7IkW3rParF9jXfx9AUSNx+WkfiE3ixDLU=; b=K74AqtWTCzeJ3fHFsLhU28oHxZJ+TBfWXN0ajy3/k79H47kIb6MQDZ9nJQCyC7X1FQ tr6uLNZQBBPRT+S6uqbkjrpuJdO3XjwIxeDqOGwnGiO7ZtFx3PGlnbSpe/ewrpp7dpmA 6yM6plNwn4lhupl/UBahvQezEoGzNs3DkYzamN5bJXG5KgZ3aRevOBWopKO2nKx5gcdh wrxutUi4qd2RDt9iHtSgJIroiijkuyHseBKYyMkxv2dBGNmX45+SzDmE+11usmet2Y3C B9ycpdjwSsWETinivuhVzm/zmT56SoTeMaLwEoQRLw8++vWysmVZQwgYvmFoF0KUJnBc IhwQ== 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=FIbfa8CnKY7IkW3rParF9jXfx9AUSNx+WkfiE3ixDLU=; b=V0oG61yn9b+/RwK0ndNEmMIJqBUgSUeDUKdwSITxAJJq+eVwF1jemxLrNRO8bIwTjL G4HrAOdBaZUfdqZ4X4Ccksg8ntXRebSewLh1lqAPH27ubH7AkN3h3EJ5TFHKGjHtLLWN qoLL+moduVf6RbbGOZGEAvUnp7u1xzq5qVOfj8SlzpRmErGXFurnvuIf1ledE7WwJzbs SWom0uEtk+8imQOy5iq4UzsFk76Yc50E+E2a67dUZSREzcoUhfFr/ohufKkVWX1oEJ7M 9RXEDEeieV7n2kiEk6YH4hoqQyaE2s1gO3msUa4etT2GQPSAiUU2Ib5Mip7ZTpYJH9sg xysA== X-Gm-Message-State: AOAM532Tkn4vs7QFdpBEAiu9oOuaWJWSIzvkN0tin7pTATUhi8IL3SNB cfcIGDufZyU+AD5acIzJJrOUiJUhZjnCYCTzaRCrRg== X-Google-Smtp-Source: ABdhPJyGZIeP/r5j1IxcIHRQMZhGLZo7w7MDc8zflXTalRA5Cb9Of04dAcnojeKE3/QoqUcIaXbsjr/CPBqlOjWL7RA= X-Received: by 2002:a37:5684:: with SMTP id k126mr1356621qkb.43.1602316509213; Sat, 10 Oct 2020 00:55:09 -0700 (PDT) MIME-Version: 1.0 References: <20201007101726.3149375-1-a.nogikh@gmail.com> <20201007101726.3149375-2-a.nogikh@gmail.com> <20201009161558.57792e1a@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> In-Reply-To: <20201009161558.57792e1a@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> From: Dmitry Vyukov Date: Sat, 10 Oct 2020 09:54:57 +0200 Message-ID: Subject: Re: [PATCH 1/2] net: store KCOV remote handle in sk_buff To: Jakub Kicinski Cc: Aleksandr Nogikh , David Miller , Johannes Berg , Eric Dumazet , Andrey Konovalov , Marco Elver , LKML , netdev , linux-wireless , Aleksandr Nogikh Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Sat, Oct 10, 2020 at 1:16 AM Jakub Kicinski wrote: > > On Wed, 7 Oct 2020 10:17:25 +0000 Aleksandr Nogikh wrote: > > From: Aleksandr Nogikh > > > > 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 > > Could you use skb_extensions for this? Why? If for space, this is already under a non-production ifdef.