From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by passt.top (Postfix) with ESMTP id DB90B5A005E for ; Thu, 17 Nov 2022 16:35:17 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1668699316; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lPgOe8irdieg+JBnWMsTSiRZemD7zTbhfumfiNaDa6k=; b=OQwobGe+KcY5NbXpuAY1tZ4KS/Z6pOBLSX4bbsNUPNJCpngSEcqJCsNHxC+aoJ9jPrhz75 jB8ROmUyNZGE9zCV/CYiCd3GV8Bt9XuPVfDzuMga+sZ226g/bb3zVZJwp0QrXISXDaPH0B rhhxqRFOW/uQg8F29DwCYTYPBR8Oy1k= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-495-lMGDrNxiNxamjVKkDnCaVQ-1; Thu, 17 Nov 2022 10:35:15 -0500 X-MC-Unique: lMGDrNxiNxamjVKkDnCaVQ-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 3722D94AB06 for ; Thu, 17 Nov 2022 15:35:12 +0000 (UTC) Received: from maya.cloud.tilaa.com (ovpn-208-8.brq.redhat.com [10.40.208.8]) by smtp.corp.redhat.com (Postfix) with ESMTPS id F26C44B3FCD; Thu, 17 Nov 2022 15:35:11 +0000 (UTC) Date: Thu, 17 Nov 2022 16:35:09 +0100 From: Stefano Brivio To: "Richard W.M. Jones" Subject: Re: [PATCH passt 5/5] Import fuzzing wrapper from libnbd Message-ID: <20221117163509.497ef507@elisabeth> In-Reply-To: <20221117122614.1269214-6-rjones@redhat.com> References: <20221117122614.1269214-1-rjones@redhat.com> <20221117122614.1269214-6-rjones@redhat.com> Organization: Red Hat MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: EF2UO4RMJFIP5EQFSNFAYHA2Q3JIVYKG X-Message-ID-Hash: EF2UO4RMJFIP5EQFSNFAYHA2Q3JIVYKG X-MailFrom: sbrivio@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: passt-dev@passt.top X-Mailman-Version: 3.3.3 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Not an actual review, just two things I noticed while trying this: On Thu, 17 Nov 2022 12:26:14 +0000 "Richard W.M. Jones" wrote: > diff --git a/fuzzing/README.fuzzing.md b/fuzzing/README.fuzzing.md > new file mode 100644 > index 0000000..4d86b2f > --- /dev/null > +++ b/fuzzing/README.fuzzing.md > @@ -0,0 +1,36 @@ > +## Fuzzing with AFL++ (https://aflplus.plus/) > + > +1. In the top directory rebuild passt with AFL instrumentation, Clang > + and ASAN: > + > +``` > +make clean > +AFL_USE_ASAN=1 make CC=/usr/bin/afl-clang-lto passt I don't have afl-clang-lto, I used afl-clang-fast instead (there's also afl-clang, not sure which one is the most appropriate). > [...] > > +++ b/fuzzing/fuzz-wrapper.c > @@ -0,0 +1,173 @@ > +/* Fuzzing wrapper > + * Derived from libnbd fuzzing wrapper > + * Copyright (C) 2013-2022 Red Hat Inc. > + * > + * This library is free software; you can redistribute it and/or > + * modify it under the terms of the GNU Lesser General Public > + * License as published by the Free Software Foundation; either > + * version 2 of the License, or (at your option) any later version. > + * > + * This library is distributed in the hope that it will be useful, > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > + * Lesser General Public License for more details. > + * > + * You should have received a copy of the GNU Lesser General Public > + * License along with this library; if not, write to the Free Software > + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA > + */ > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +#include This can probably be dropped (noticed because I didn't have libnbd-dev installed). -- Stefano