From nobody Thu Dec 18 19:30:36 2025 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1592993245; cv=none; d=zohomail.com; s=zohoarc; b=nx0pHyVe3FgLybKQpPn/uirecv3ZyFqNKczSgLPlMCbeewht0sEpalHkeOy9sHCmM6Nq4FhiRTsHkFomF+aj3/S1UEf/2ds8aOer/PJMXdSVJVh0LXDmlg3HQQnX7vcIIwCnBvKOV4vEmuQ5WdGtV05VRNMkjF1DU2JCeBC+GWY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1592993245; 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=dVpMD9A8TEZKeHH5TOKBr7wEiFBE4Ujs5DlSnNOvwCg=; b=eJs42L+7v0qUeLKyDr6BCW+YzVKDW32rPE7z6iMf9cRwblXBFatErccA3jXxNTeFdzO4az1G8ig6Fv9vCo7BvHyQ5G0cb+45E6nENhCGcewkKv9F4PzgeA4Ms7bkwmFTsML73PSvbJJzXvjMfTRu9XYYRaDnM6PRf85h696nYjU= 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 1592993245377915.8729805050399; Wed, 24 Jun 2020 03:07:25 -0700 (PDT) Received: from localhost ([::1]:57520 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jo2JP-0002qd-V4 for importer@patchew.org; Wed, 24 Jun 2020 06:07:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43480) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jo2Eu-0001dE-NT for qemu-devel@nongnu.org; Wed, 24 Jun 2020 06:02:44 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:60258 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jo2Es-0003b1-Qc for qemu-devel@nongnu.org; Wed, 24 Jun 2020 06:02:44 -0400 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-458-f98Tg0ikMYWH5dLfYM-nIw-1; Wed, 24 Jun 2020 06:02:39 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B3C3B800D5C; Wed, 24 Jun 2020 10:02:38 +0000 (UTC) Received: from localhost (ovpn-114-150.ams2.redhat.com [10.36.114.150]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4AE3F12CB4; Wed, 24 Jun 2020 10:02:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1592992962; 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=dVpMD9A8TEZKeHH5TOKBr7wEiFBE4Ujs5DlSnNOvwCg=; b=WfpfalfEh3NMEdtHcfygsHK5YvPKFCecF/WkPCYz0eAFg0v8DTBQezgQ8RQolS3iR7/5My HnVFhB5dj0M96cKwnbBCZ3qK0ZhVWAR8swJad/NvZXt+0ysoU+2TQN4v4zIA1zZVO+Sc76 blrOpfNOtPBLkUSy86SaihE4hLJqyaE= X-MC-Unique: f98Tg0ikMYWH5dLfYM-nIw-1 From: Stefan Hajnoczi To: qemu-devel@nongnu.org, Peter Maydell Subject: [PULL 05/12] check-block: enable iotests with SafeStack Date: Wed, 24 Jun 2020 11:02:03 +0100 Message-Id: <20200624100210.59975-6-stefanha@redhat.com> In-Reply-To: <20200624100210.59975-1-stefanha@redhat.com> References: <20200624100210.59975-1-stefanha@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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=205.139.110.120; envelope-from=stefanha@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/24 03:27:53 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MIME_BASE64_TEXT=1.741, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN 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: Kevin Wolf , Fam Zheng , Eduardo Habkost , qemu-block@nongnu.org, Max Reitz , Stefan Hajnoczi , Cleber Rosa , Daniele Buono Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Daniele Buono SafeStack is a stack protection technique implemented in llvm. It is enabled with a -fsanitize flag. iotests are currently disabled when any -fsanitize option is used, because such options tend to produce additional warnings and false positives. While common -fsanitize options are used to verify the code and not added in production, SafeStack's main use is in production environments to protect against stack smashing. Since SafeStack does not print any warning or false positive, enable iotests when SafeStack is the only -fsanitize option used. This is likely going to be a production binary and we want to make sure it works correctly. Signed-off-by: Daniele Buono Message-id: 20200529205122.714-5-dbuono@linux.vnet.ibm.com Signed-off-by: Stefan Hajnoczi --- tests/check-block.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/check-block.sh b/tests/check-block.sh index ad320c21ba..8e29c868e5 100755 --- a/tests/check-block.sh +++ b/tests/check-block.sh @@ -21,7 +21,17 @@ if grep -q "CONFIG_GPROF=3Dy" config-host.mak 2>/dev/nul= l ; then exit 0 fi =20 -if grep -q "CFLAGS.*-fsanitize" config-host.mak 2>/dev/null ; then +# Disable tests with any sanitizer except for SafeStack +CFLAGS=3D$( grep "CFLAGS.*-fsanitize" config-host.mak 2>/dev/null ) +SANITIZE_FLAGS=3D"" +#Remove all occurrencies of -fsanitize=3Dsafe-stack +for i in ${CFLAGS}; do + if [ "${i}" !=3D "-fsanitize=3Dsafe-stack" ]; then + SANITIZE_FLAGS=3D"${SANITIZE_FLAGS} ${i}" + fi +done +if echo ${SANITIZE_FLAGS} | grep -q "\-fsanitize" 2>/dev/null; then + # Have a sanitize flag that is not allowed, stop echo "Sanitizers are enabled =3D=3D> Not running the qemu-iotests." exit 0 fi --=20 2.26.2