From nobody Tue Feb 10 03:38:06 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1615211699; cv=none; d=zohomail.com; s=zohoarc; b=fbdosw3YhSSrK94ylYtDP+CNkwMce2dGwS680r8THIb9cEqj+uyvq+X+sONsy3tXLtJoSq8/Ygmhcv3Z1G6D2ENE28KmCBrs7usoUtBTMr+dvc0fNE9+t5hrobMQKCPDGBWWWW+qE0D1OUTeyXA7Vl4zVMmCPk56Kbop1lk9sOE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1615211699; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=zvlHmg3Gvm+4PGagR+ylVzZ1n3v00RRhYPBHrbsRAfc=; b=WjKFz+Kr2STFuGvkC1iHuqSInrE0ztcfHaeLbBTVkav0gvOfbXxKkDDs3Qyo7QtZb91dxwd8GvwneD3IFHRqNVlW178MD/wqSsMz1dcW8T89bDUKkzFP2pULz/P4XKwRMXEjdjF2zq1yD87BaBmObwQs3DkdjCNCAK4oe+s9y/g= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1615211699405288.73976862060965; Mon, 8 Mar 2021 05:54:59 -0800 (PST) Received: from localhost ([::1]:49842 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lJGLY-00037R-Tf for importer@patchew.org; Mon, 08 Mar 2021 08:54:56 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:53536) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lJGI3-0006Wr-JH for qemu-devel@nongnu.org; Mon, 08 Mar 2021 08:51:19 -0500 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]:50338) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lJGI0-0001DT-QS for qemu-devel@nongnu.org; Mon, 08 Mar 2021 08:51:19 -0500 Received: by mail-wm1-x335.google.com with SMTP id i9so6045464wml.0 for ; Mon, 08 Mar 2021 05:51:16 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id x6sm19597648wmj.32.2021.03.08.05.51.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Mar 2021 05:51:08 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 71BBF1FF93; Mon, 8 Mar 2021 13:51:05 +0000 (GMT) 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=zvlHmg3Gvm+4PGagR+ylVzZ1n3v00RRhYPBHrbsRAfc=; b=Y0iGh15raylKqeIyeBOGp1/t6Jm+5pqSmFk058L31oVV83GImE83V2BYP3/TlAG1Ig At+UHfxOsPVfIcpbXA0iq3YthJ2L84FSx5phdsxNvqnGHzZVVsAtY7sqbvcThB2OTpp0 Le7hkUDK/NwXd7yRszxkGEuWIEnvaUSG3gmmSpsqsiM/KCsZSYNoxkY07FL3T4IS7lWI vwSTxMhGkOM6aQiJ2NCLcbvedx717nJeP/uYY0BwtmpNJDYywxK3mfmS+L3K9U7XvTCY NMWZC2kpQg/R/O+KbRpV2WFRnql6roqvVILm4xyHxVUchZVRLFx5m9wztys5xSlgNwvH CgfA== 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=zvlHmg3Gvm+4PGagR+ylVzZ1n3v00RRhYPBHrbsRAfc=; b=KmciYwjLzg8MouRDZdeS8Izj7pMAPDVfu0B91ZVIW3V5xhHfewpiwsJ5We1H2ydya4 gRYC7dFGihqQqjdIUouANnLrzCyvhqsb89BBzeRxnOLy6OS/aJ04nI5cdJFMuPfEu2Vw J0rOfJ6wTr2tASUUp01oxpWPxXCXGyYd4PQrfGr4opqxDXtpRA5O6hGobrpy+FIX4ApK Eo+83oxNNOXAfouARMFK6lWFKJSDRY7cjQ7bLrwdCNnVitHXVUnqoqGcOhP3TpzKhcBf eIWuftizlsc++/5KMjk+RQtOn+Wrv0u8KXlJCDgze9ghkphSjRmvuMweX6iLv2wB9sIX w6Lg== X-Gm-Message-State: AOAM533gzQwQ3sHLzIN6fuH0Re8v+LrTxlt6t2z0y7Q06JwMLbe7OAXV ZphpMaBRUsye+Aw89ze0/Tj/6Q== X-Google-Smtp-Source: ABdhPJx5Vntr/Z9/eJo/pl4szopgjnHUTF6KL6ifQHuBqxOxZWSMYJrT8nBbFOsFBkf9vCDKe/05xA== X-Received: by 2002:a05:600c:d1:: with SMTP id u17mr22836010wmm.64.1615211475477; Mon, 08 Mar 2021 05:51:15 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 07/18] gitlab-ci.yml: Add jobs to test CFI flags Date: Mon, 8 Mar 2021 13:50:53 +0000 Message-Id: <20210308135104.24903-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210308135104.24903-1-alex.bennee@linaro.org> References: <20210308135104.24903-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x335.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: Thomas Huth , =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-devel@nongnu.org, Wainer dos Santos Moschetta , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Daniele Buono Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) 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 [AJB: tweak job names to avoid brands] Signed-off-by: Daniele Buono Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20210304030948.9367-3-dbuono@linux.vnet.ibm.com> Message-Id: <20210305092328.31792-9-alex.bennee@linaro.org> 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=3D-fsanitize=3Dundefined --extra-cflags=3D-fno-saniti= ze-recover=3Dundefined MAKE_CHECK_ARGS: check-unit check-tcg =20 +# Set LD_JOBS=3D1 because this requires LTO and ld consumes a large amount= of memory. +# On gitlab runners, default value sometimes end up calling 2 lds concurre= ntly and +# triggers an Out-Of-Memory error +# +# Since slirp callbacks are used in QEMU Timers, slirp needs to be compile= d together +# with QEMU and linked as a static library to avoid false positives in CFI= checks. +# This can be accomplished by using -enable-slirp=3Dgit, which avoids the = use of +# a system-wide version of the library +# +# Split in three sets of build/check/acceptance to limit the execution tim= e 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=3Dclang --cxx=3Dclang++ --enable-cfi --enable-cfi= -debug + --enable-safe-stack --enable-slirp=3Dgit + 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=3Dclang --cxx=3Dclang++ --enable-cfi --enable-cfi= -debug + --enable-safe-stack --enable-slirp=3Dgit + 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=3Dclang --cxx=3Dclang++ --enable-cfi --enable-cfi= -debug + --enable-safe-stack --enable-slirp=3Dgit + 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: --=20 2.20.1