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=-6.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS 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 616F4C63697 for ; Thu, 29 Oct 2020 02:04:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0C53820878 for ; Thu, 29 Oct 2020 02:04:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="bWRA9CAa" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726506AbgJ1Vsu (ORCPT ); Wed, 28 Oct 2020 17:48:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47128 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727323AbgJ1VlO (ORCPT ); Wed, 28 Oct 2020 17:41:14 -0400 Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF698C0613D1; Wed, 28 Oct 2020 14:41:13 -0700 (PDT) Received: by mail-wr1-x441.google.com with SMTP id a9so594229wrg.12; Wed, 28 Oct 2020 14:41:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=150B9TY9v6fV7KS+jxlyPSKb4srW4lcCjnHLKa1uLvo=; b=bWRA9CAagWShk3n4pjpvMARXxKNk02ECjHV3X5ODSIEVnLIJENmuVQauDRDgevRrQY /3ALFRSJKLiuexGDHPUR/4FYGRcNPOCdzy4Xism2WqbGxc01datBkC9LtVyGVxR1SaEA u+5IegqMUyK9QnIYQopdu67LBTQe9EAKisfqX/XYLJivmZccUHdSEcl6EdXaq65snVQ/ yVXIdZvozvdpusCT3n+X7A1JuCq5GzTW7YV7gwlUlyges0H4WMo4b4G82thEp37RYUPR iWNYW+pZznfC5am8DQmPS+I5ko+iZk18BsQ+vJUScnPVJ/aTzJdou40Lbc1Aez/Phb6Q cxdw== 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=150B9TY9v6fV7KS+jxlyPSKb4srW4lcCjnHLKa1uLvo=; b=dP3sJ5Yf2bxDibT6EoYyBsjlyyJ3T63Rdzsx9c/wxspLRNIGyjwPzb8hWgc28gKnwK jfmaa40al9ImU8yFWNjgpLKtczzCcyAm6gMuwL7xk4WCcMHj2pDRskvtCnKUL4YbDUaL IrBB4uehewjYGWiOSokZPWMaNp9x/13LecZx9O7OX960UzaJWw3l8dR3ZUJDC5w2Ol3q BlpUBBEvNPLB2diP14pHqJqWpu4yyq/OdxlMkEfIn5QK+JpxXjOhyCbkaQb5MkdymqLD Rf9H0dL1nC3eSn/MuxrpN02m4ycQXWYZRQECeB7DyDK7IisbEHt8jMhDx1Nhch8zeQmi /TiA== X-Gm-Message-State: AOAM530OCZDzTYuBXxwGisKRf6+S8PcDNBp9XQ6My8jExQY+JJs3nTxA QgK6eZ62SOfk/nANO+WuhKClG9uh7qLW4l/l2bKv+aeq X-Google-Smtp-Source: ABdhPJyXaf251l2zxK1mU6Ob1m4WfUi/fpjxTE2AHRPuKN9tn4RClWrnnxgQVywhnWfx1KxAIoh7JVkx5mhPW3rWFcg= X-Received: by 2002:a17:906:8385:: with SMTP id p5mr872467ejx.538.1603917801870; Wed, 28 Oct 2020 13:43:21 -0700 (PDT) MIME-Version: 1.0 References: <20201028182018.1780842-1-aleksandrnogikh@gmail.com> <20201028182018.1780842-3-aleksandrnogikh@gmail.com> In-Reply-To: <20201028182018.1780842-3-aleksandrnogikh@gmail.com> From: Willem de Bruijn Date: Wed, 28 Oct 2020 16:42:45 -0400 Message-ID: Subject: Re: [PATCH v4 2/3] net: add kcov handle to skb extensions To: Aleksandr Nogikh Cc: David Miller , Jakub Kicinski , Johannes Berg , Eric Dumazet , Andrey Konovalov , Dmitry Vyukov , Marco Elver , LKML , Network Development , linux-wireless , Aleksandr Nogikh Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Wed, Oct 28, 2020 at 2:21 PM 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 kcov remote handle to > skb extensions. Default initialization in __alloc_skb and > __build_skb_around 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 during normal background network > processes or were intentionally injected from the user space. > > Signed-off-by: Aleksandr Nogikh Acked-by: Willem de Bruijn