Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp2639367pxu; Sat, 10 Oct 2020 02:25:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzOCEo9jNocF/D6qRDKzGpf2o30cU84VFIW+pFVUlUsfEmK8Aj5pVczWsIfdS/G9kXoe0sT X-Received: by 2002:a50:f389:: with SMTP id g9mr3682516edm.367.1602321930338; Sat, 10 Oct 2020 02:25:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602321930; cv=none; d=google.com; s=arc-20160816; b=PNTSBhXwM6Duf0sh5ME16bD3C70yLnodY+dP6YFvbFRvnyc8XGWIxTkf8u6K0F19FA D1/2O2kLSwt2R+UhtH7Ms+H/Q4M4DjY6y133gnL0Uzn9Cdl5vhjn8aQ4SsFzMv6MpiOO 24VSomfiaJ6b5lVquMWEGLOUu1N4mXwX6saQ6AjHAQWS2+T7PLb0vGEF6CQY1KX+0it+ hzWi/rEkuxV4mh94TCQGpP9G1OqU9M4eNiij3QU0m8TBIXPDVTfv0O1Xkmx4bzX+WwJd qpQnfO3YnZxXlBz/c97mTa1IJHXHZ//vsXb9vIxF91UkYru9u2FG0vbtS36lBA+6SpsD 4IvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=FIbfa8CnKY7IkW3rParF9jXfx9AUSNx+WkfiE3ixDLU=; b=FiEC/1A1ZQvRFFY8QcauM9gDiKX+6uVfwGshoq+0bNUkB9kdM1ixxko5ckU+mFDueC kJC66Ksyg8fbuBYx7VNP/rh6QWxzkjY/30rjDqiwbSHIIQT071dalEP/gdJ5a3Ke7oZw TFexROEO03s2EGXwZTcGPjs9hH/PT8pIO8U085pbBbYFvK6CLjnrnbMjCX9hxcPx99WJ vaQsd1R1b4nNTF5UYChyBg+OPqFeI/Fa/LmXebqeTKzGN8YyIxD0xLAeEKvSMATEYRTD 6CUoNVo70mCm+iIHgFz1tk9VogM5hZ/9DB1KMGBW0pM7o2I+qQWdkS2HP0CW7aZNW6W7 wGdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=K74AqtWT; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c9si8324958edl.424.2020.10.10.02.24.53; Sat, 10 Oct 2020 02:25:30 -0700 (PDT) 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=@google.com header.s=20161025 header.b=K74AqtWT; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729627AbgJJHza (ORCPT + 99 others); Sat, 10 Oct 2020 03:55:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45018 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729571AbgJJHzM (ORCPT ); Sat, 10 Oct 2020 03:55:12 -0400 Received: from mail-qk1-x744.google.com (mail-qk1-x744.google.com [IPv6:2607:f8b0:4864:20::744]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BFB79C0613D2 for ; Sat, 10 Oct 2020 00:55:10 -0700 (PDT) Received: by mail-qk1-x744.google.com with SMTP id y198so13140474qka.0 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=AdAbTOuLLOvjjDEZe/TRr8+Dpehynki09cwc9QjjJnsT3hoUG6PBCnyd+lvHQzisvh oe3PdavDdPdx4crVKu9Xj9X9uDtSwuagQ3dzdXHCLPrHDe3cvlQNxZPbu166ESE5KNUa wx6AyPgV74VTTjK/YJWCk6ViM1PdxREVOfdUEGqnosTr/a3LctxSzaZzwNAdzVYgTqeM 45WIQiOvKisN80i2QhS8A5A/S1wIQGKrccK6tkYoGW+DQK9jmPqButx8slpQzE8mrtrU acSiZ0ji6RLC2+7nO15U8JHzHCjngHoRrHoc+vFpv9dbZtaNlk/aMNsoQ5OWz8SaKW2P UfsA== X-Gm-Message-State: AOAM532DuYaHXN7mR/hKUzpxwUydDD8mEloXa/qXOGkBLWsPFrs5c2aF lbiI/bafA1kniZX6FOBO7OuGY6go1KF5k9jWh2ShuQ== 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: linux-wireless@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.