From patchwork Fri Mar 5 09:23:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 393474 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp263613jai; Fri, 5 Mar 2021 01:25:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJyM3u4fniMfKZGIqzldZ3fuSe89cCY3ou7b6aIFz6Gms3+Oz6SaLfgBUe1BLQUpoH8DKt/S X-Received: by 2002:a02:9003:: with SMTP id w3mr8743483jaf.31.1614936301334; Fri, 05 Mar 2021 01:25:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614936301; cv=none; d=google.com; s=arc-20160816; b=BL0R//LamMEoILkOGwhU+5a97d7fx5aksBipoF/9rzQAxvzXsy3f+lSJXCCHfIuJbM K7CyCcx6unAHSAtlgDHjRNgV+Nyk1vdBvxFJl+xGEJA3OOIRQyfZnY/366ou6CgAtKSb xWU6pxyt0NAa9OzkYsG1UWbwKFBY3YBWlPqKYtynRViGZlRfqoLdaLbVWz85cgl7mlYT 2wgrhBBRc8c4nuNlGvdF2ykyYGuQ/kE3TBU+nKtZdBA4q169vCaUp90yxXRMmy2L7jYD TCzYQ5iAsRBsQ82cTyOu0Ze0S5jUCZ2J3etCWp2phOQnQImQK2lGeQWTcUcEhWXoGjfC v+LQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=72D9Jy5CJJNVD1AtWucx1rIrJFM00v3oHS4BU4E4eAs=; b=kC/ryBmZROAG34cIHKw+62GJaBEpZDA+ncChk+a6PvZnxVXhPLsvORl/1Eoa+evG6b B0yrL+1R2OgLQLFATfTkXyNCyiSvlKI89G/A62A54LgKfdvUEzwqGVCuSKFD7A77rm2S 6du7DElaY8FPuVqxrQ4MicVjFbqgRcsL15hYEpXmg9p3+MysQMN31aIQp9SDcNTMUVCm Eqz3bbyzd74ed0dV7wJvAxao9TwdMh1DV9Mu0lELXOla2GtEkiyFoOiKB1UeFEGehJwf p9Q4HLrv/1hgK3glhxKkHMPvI+/ehOSQN8prehF+PcIl5/iF9B425bGPtH9/8yxhPW35 Fl5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ZCawgAsp; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id t31si2211216jal.89.2021.03.05.01.25.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 Mar 2021 01:25:01 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ZCawgAsp; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:58468 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lI6hg-00017q-Ef for patch@linaro.org; Fri, 05 Mar 2021 04:25:00 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:33736) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lI6gP-00015N-P8 for qemu-devel@nongnu.org; Fri, 05 Mar 2021 04:23:41 -0500 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]:46141) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lI6gN-0004KU-8o for qemu-devel@nongnu.org; Fri, 05 Mar 2021 04:23:41 -0500 Received: by mail-wr1-x431.google.com with SMTP id a18so1249566wrc.13 for ; Fri, 05 Mar 2021 01:23:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=72D9Jy5CJJNVD1AtWucx1rIrJFM00v3oHS4BU4E4eAs=; b=ZCawgAspMWtMT53fQFPXd4QoSfYht2qf3zxrdJ42eNSwXXGn2gRfoqOInX8Ck0cUwg HnWqWDWPeoiWtCCxov1Rc5Py9Xir9GnYx1oxwr/8vNwfQGQWjX2557wTXqxQnjzUfF9K uZe+UOsRxqzK10UEGbBiYazE7VcgUbbzTBbQTdBDoXRUaL6qNBlHGnhvOjGhQrtDQMJZ f6VeJTeh1lF8AlLnZGzvWrhmt6KcpYVoLe1x72f0i5SKY+dJFzQ2O+RAboECxeoL/WFp pbTEVXae5yJRHRfHr2UfG6wWE/RE1aoCuNrZ6WgCzskLmiIu90gfmRKtz1vL7nvs+Ue9 RcCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=72D9Jy5CJJNVD1AtWucx1rIrJFM00v3oHS4BU4E4eAs=; b=H442lG2+86JHWmxjKinHH8G0BYjL/gAT8tT/+qzhWO0v81onKg2HTMNF0lAcgO41s0 yv15RBGaERv11mQ9iIrzMaSyzJBMEjIfvR+8EzBE7nlxs5poxUbv/edkSAVIKHjnnJBs EUR1aW832ig15IgxQfozxAJElq6NtWKNjrtS9C+ade173dn+rF86Gva0Ki7nSKTbaO8H oDODq+O9AVnVPGh6T2U8VoSPQtnlEh/ON0P+3/oaKPxrkfHROAYMuWG43nPoZVcHNjHd rDzQ4i0mRYqf91eSI/neE/kM7BczjNH4AG15k5DAOoSzmUH4JPsf8tcLvj2cW8oyUp2G l6jw== X-Gm-Message-State: AOAM532vGmInyw4ResvX1i0rCmSkQZKZnSag2oVvlnw1QUAc6hUjf2Cq SfpiaZ6yS8zq13MPvJ6uXh7ALw== X-Received: by 2002:a5d:4ac6:: with SMTP id y6mr8200484wrs.160.1614936217860; Fri, 05 Mar 2021 01:23:37 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id v5sm3642019wmh.2.2021.03.05.01.23.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Mar 2021 01:23:35 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id ADD7D1FF96; Fri, 5 Mar 2021 09:23:29 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 8/9] gitlab-ci.yml: Add jobs to test CFI flags Date: Fri, 5 Mar 2021 09:23:27 +0000 Message-Id: <20210305092328.31792-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210305092328.31792-1-alex.bennee@linaro.org> References: <20210305092328.31792-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x431.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, 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: , Cc: fam@euphon.net, Thomas Huth , berrange@redhat.com, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , f4bug@amsat.org, Wainer dos Santos Moschetta , Daniele Buono , stefanha@redhat.com, crosa@redhat.com, pbonzini@redhat.com, =?utf-8?q?Alex_Benn=C3=A9e?= , aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Daniele Buono 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 Message-Id: <20210304030948.9367-3-dbuono@linux.vnet.ibm.com> [AJB: tweak job names to avoid brands] Signed-off-by: Alex Bennée --- .gitlab-ci.yml | 119 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 119 insertions(+) -- 2.20.1 Reviewed-by: Philippe Mathieu-Daudé diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1ea944eb91..5625265ef8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -494,6 +494,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-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-aarch64: + <<: *native_test_job_definition + needs: + - job: build-cfi-aarch64 + artifacts: true + variables: + IMAGE: fedora + MAKE_CHECK_ARGS: check + +acceptance-cfi-aarch64: + <<: *native_test_job_definition + needs: + - job: build-cfi-aarch64 + artifacts: true + variables: + IMAGE: fedora + MAKE_CHECK_ARGS: check-acceptance + <<: *acceptance_definition + +build-cfi-ppc64-s390x: + <<: *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: ppc64-softmmu s390x-softmmu + MAKE_CHECK_ARGS: check-build + artifacts: + expire_in: 2 days + paths: + - build + +check-cfi-ppc64-s390x: + <<: *native_test_job_definition + needs: + - job: build-cfi-ppc64-s390x + artifacts: true + variables: + IMAGE: fedora + MAKE_CHECK_ARGS: check + +acceptance-cfi-ppc64-s390x: + <<: *native_test_job_definition + needs: + - job: build-cfi-ppc64-s390x + artifacts: true + variables: + IMAGE: fedora + MAKE_CHECK_ARGS: check-acceptance + <<: *acceptance_definition + +build-cfi-x86_64: + <<: *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: x86_64-softmmu + MAKE_CHECK_ARGS: check-build + artifacts: + expire_in: 2 days + paths: + - build + +check-cfi-x86_64: + <<: *native_test_job_definition + needs: + - job: build-cfi-x86_64 + artifacts: true + variables: + IMAGE: fedora + MAKE_CHECK_ARGS: check + +acceptance-cfi-x86_64: + <<: *native_test_job_definition + needs: + - job: build-cfi-x86_64 + artifacts: true + variables: + IMAGE: fedora + MAKE_CHECK_ARGS: check-acceptance + <<: *acceptance_definition + tsan-build: <<: *native_build_job_definition variables: