From patchwork Fri Jun 21 19:14:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tamas K Lengyel X-Patchwork-Id: 13708019 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 09E95C2BD05 for ; Fri, 21 Jun 2024 19:15:28 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.745496.1152622 (Exim 4.92) (envelope-from ) id 1sKjiy-0004a5-P6; Fri, 21 Jun 2024 19:15:04 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 745496.1152622; Fri, 21 Jun 2024 19:15:04 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sKjiy-0004Zy-Ls; Fri, 21 Jun 2024 19:15:04 +0000 Received: by outflank-mailman (input) for mailman id 745496; Fri, 21 Jun 2024 19:15:03 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sKjix-0004Zs-8W for xen-devel@lists.xenproject.org; Fri, 21 Jun 2024 19:15:03 +0000 Received: from sender4-op-o15.zoho.com (sender4-op-o15.zoho.com [136.143.188.15]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 8dbed7b9-3002-11ef-90a3-e314d9c70b13; Fri, 21 Jun 2024 21:15:01 +0200 (CEST) Received: by mx.zohomail.com with SMTPS id 1718997295610207.92573120373834; Fri, 21 Jun 2024 12:14:55 -0700 (PDT) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 8dbed7b9-3002-11ef-90a3-e314d9c70b13 ARC-Seal: i=1; a=rsa-sha256; t=1718997297; cv=none; d=zohomail.com; s=zohoarc; b=lmBCt5pBbNYjFmZyPlSRLuMAFEqEphvoDur25CfuXdCjCoFPezjyY+Yh2w+fxHeixaMJ/u1lDuCAg3uBCcdKt6F68EmPCuf70uRXzcaFB+hUey8KvER50Hql2p4bFqANN0TZuBMUu14v3DPla0UFCMkrqOfAPVsJGUMz+8Z6RWI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1718997297; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=az0Awjr8iknR6afX3DlNO8NfaAjpi0YMFq021oOMFmo=; b=IWRfIBJ4pshWHRZQW2gx5RyYOpZTeWdoxmXya1Kl6AQHFC+TrtZDjynbbD+ACXc2lMBzPKEBBuTeJuIkm4sPpz7CUvN+D+2Z7HSDuofK+9CnDh0+fdVDDds9hzkUFrj9fCRFeZoPCp8MTc7A2RHW6b2lUI8YsNzFIpRxPuuH4aQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=tklengyel.com; spf=pass smtp.mailfrom=tamas@tklengyel.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1718997297; s=zmail; d=tklengyel.com; i=tamas@tklengyel.com; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-Id:Message-Id:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Reply-To; bh=az0Awjr8iknR6afX3DlNO8NfaAjpi0YMFq021oOMFmo=; b=FUQ2HeJwKsXuF+TfhMrpOGfdEpQ4hW3axk2sbLvNT6BfDAuETyE2do1XYJ3fJ2yd IcGCPFJK78lQDcAoCXX3ILpgEHYWRpc8NvMX52Iiv6PdYEF/fhNMgFipLINmeB8+3AF wep3QxFr9YRyoap1w2qKCR3TYYyWJu7UKo1mptj4= From: Tamas K Lengyel To: xen-devel@lists.xenproject.org Cc: Tamas K Lengyel , Andrew Cooper , George Dunlap , Jan Beulich , Julien Grall , Stefano Stabellini Subject: [PATCH 2/2] Add scripts/oss-fuzz/build.sh Date: Fri, 21 Jun 2024 15:14:34 -0400 Message-Id: <20240621191434.5046-2-tamas@tklengyel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240621191434.5046-1-tamas@tklengyel.com> References: <20240621191434.5046-1-tamas@tklengyel.com> MIME-Version: 1.0 The build integration script for oss-fuzz targets. Signed-off-by: Tamas K Lengyel --- scripts/oss-fuzz/build.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 scripts/oss-fuzz/build.sh diff --git a/scripts/oss-fuzz/build.sh b/scripts/oss-fuzz/build.sh new file mode 100755 index 0000000000..48528bbfc2 --- /dev/null +++ b/scripts/oss-fuzz/build.sh @@ -0,0 +1,22 @@ +#!/bin/bash -eu +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +################################################################################ + +cd xen +./configure clang=y --disable-stubdom --disable-pvshim --disable-docs --disable-xen +make clang=y -C tools/include +make clang=y -C tools/fuzz/x86_instruction_emulator libfuzzer-harness +cp tools/fuzz/x86_instruction_emulator/libfuzzer-harness $OUT/x86_instruction_emulator