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=-20.1 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham 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 75B5BC433DB for ; Thu, 4 Mar 2021 11:59:07 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 178B760C3D for ; Thu, 4 Mar 2021 11:59:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 178B760C3D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:51092 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lHmdG-0000qD-7d for qemu-devel@archiver.kernel.org; Thu, 04 Mar 2021 06:59:06 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:44512) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lHmce-0000Iy-AH for qemu-devel@nongnu.org; Thu, 04 Mar 2021 06:58:28 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:51602) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1lHmca-0006Mg-Sq for qemu-devel@nongnu.org; Thu, 04 Mar 2021 06:58:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1614859103; h=from:from:reply-to: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=5XXnhfCYsHlii2NLOEhacgVMqwDmOP4ARhnraN8QhhA=; b=X3Y9kExjNScrGu9Jzof+Q45/MIex16cLRBxQHlstOPiWZeL6+flo3QmQa/aY9SzytU1jAV uZEIpOk7cWWEl5eF8/iP3enV2c/fIiYEBwd1viToYC+92vQ0pcqkNPu1wAL4OkhJfCXYD/ ryhtFKgdPuDxUmO8/kdV7Cct89CNksw= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-430-7aiCE35KMSiXMtRzhKx9gA-1; Thu, 04 Mar 2021 06:58:22 -0500 X-MC-Unique: 7aiCE35KMSiXMtRzhKx9gA-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E825CE4961; Thu, 4 Mar 2021 11:58:20 +0000 (UTC) Received: from redhat.com (ovpn-115-33.ams2.redhat.com [10.36.115.33]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 379D919C46; Thu, 4 Mar 2021 11:58:14 +0000 (UTC) Date: Thu, 4 Mar 2021 11:58:11 +0000 From: Daniel =?utf-8?B?UC4gQmVycmFuZ8Op?= To: Thomas Huth Subject: Re: [PATCH v3 2/2] gitlab-ci.yml: Add jobs to test CFI flags Message-ID: References: <20210304030948.9367-1-dbuono@linux.vnet.ibm.com> <20210304030948.9367-3-dbuono@linux.vnet.ibm.com> <571c0872-3755-3877-f284-01698264f4b7@redhat.com> MIME-Version: 1.0 In-Reply-To: <571c0872-3755-3877-f284-01698264f4b7@redhat.com> User-Agent: Mutt/2.0.5 (2021-01-21) X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=berrange@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=63.128.21.124; envelope-from=berrange@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Daniel =?utf-8?B?UC4gQmVycmFuZ8Op?= Cc: Philippe =?utf-8?Q?Mathieu-Daud=C3=A9?= , qemu-devel@nongnu.org, Wainer dos Santos Moschetta , Paolo Bonzini , Alex =?utf-8?Q?Benn=C3=A9e?= , Daniele Buono Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On Thu, Mar 04, 2021 at 12:21:16PM +0100, Thomas Huth wrote: > On 04/03/2021 11.39, Daniel P. Berrangé wrote: > > On Wed, Mar 03, 2021 at 10:09:48PM -0500, Daniele Buono wrote: > > > QEMU has had options to enable control-flow integrity features > > > for a few months now. Add two sets of build/check/acceptance > > > jobs to ensure the binary produced is working fine. > > > > > > The three sets allow testing of x86_64 binaries for x86_64, s390x, > > > ppc64 and aarch64 targets > > > > > > Signed-off-by: Daniele Buono > > > --- > > > .gitlab-ci.yml | 119 +++++++++++++++++++++++++++++++++++++++++++++++++ > > > 1 file changed, 119 insertions(+) > > > > > > diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml > > > index 814f51873f..7b1f25c92e 100644 > > > --- a/.gitlab-ci.yml > > > +++ b/.gitlab-ci.yml > > > @@ -483,6 +483,125 @@ clang-user: > > > --extra-cflags=-fsanitize=undefined --extra-cflags=-fno-sanitize-recover=undefined > > > MAKE_CHECK_ARGS: check-unit check-tcg > > > +# Set LD_JOBS=1 because this requires LTO and ld consumes a large amount of memory. > > > +# On gitlab runners, default value sometimes end up calling 2 lds concurrently and > > > +# triggers an Out-Of-Memory error > > > +# > > > +# Since slirp callbacks are used in QEMU Timers, slirp needs to be compiled together > > > +# with QEMU and linked as a static library to avoid false positives in CFI checks. > > > +# This can be accomplished by using -enable-slirp=git, which avoids the use of > > > +# a system-wide version of the library > > > +# > > > +# Split in three sets of build/check/acceptance to limit the execution time of each > > > +# job > > > +build-cfi-arm: > > > > s/arm/aarch64/ > > > > > + <<: *native_build_job_definition > > > + needs: > > > + - job: amd64-fedora-container > > > + variables: > > > + LD_JOBS: 1 > > > + AR: llvm-ar > > > + IMAGE: fedora > > > + CONFIGURE_ARGS: --cc=clang --cxx=clang++ --enable-cfi --enable-cfi-debug > > > + --enable-safe-stack --enable-slirp=git > > > + TARGETS: aarch64-softmmu > > > + MAKE_CHECK_ARGS: check-build > > > + artifacts: > > > + expire_in: 2 days > > > + paths: > > > + - build > > > + > > > +check-cfi-arm: > > > + <<: *native_test_job_definition > > > + needs: > > > + - job: build-cfi-arm > > > + artifacts: true > > > + variables: > > > + IMAGE: fedora > > > + MAKE_CHECK_ARGS: check > > > + > > > +acceptance-cfi-arm: > > > + <<: *native_test_job_definition > > > + needs: > > > + - job: build-cfi-arm > > > + artifacts: true > > > + variables: > > > + IMAGE: fedora > > > + MAKE_CHECK_ARGS: check-acceptance > > > + <<: *acceptance_definition > > > + > > > +build-cfi-ibm: > > > > Lets not use vendor names here - keep the target names. ie > > > > build-cfi-s390x-ppc64 > > > > and equivalent for the rest of the jobs below.... > > I agree for not using vendor names here ... but I've got a different > suggestion instead: Since our list of jobs has grown very big already, I > think it would be nicer to group the jobs, see: > https://docs.gitlab.com/ee/ci/jobs/#group-jobs-in-a-pipeline > > That means, use "build-cfi 1/3", "build-cfi 2/3" and "build-cfi 3/3" (and do > the same numbering for the check- and acceptance- jobs, too). Oooh, that's an interesting feature. We could certainly benefit from that in our existing jobs too Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|