From nobody Fri Nov 7 19:48:35 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 154845804889298.32748294744681; Fri, 25 Jan 2019 15:14:08 -0800 (PST) Received: from localhost ([127.0.0.1]:52212 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gnAfn-0006Oi-Rw for importer@patchew.org; Fri, 25 Jan 2019 18:14:07 -0500 Received: from eggs.gnu.org ([209.51.188.92]:36788) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gnAe4-0004rv-0G for qemu-devel@nongnu.org; Fri, 25 Jan 2019 18:12:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gnAPf-0005Pd-6C for qemu-devel@nongnu.org; Fri, 25 Jan 2019 17:57:31 -0500 Received: from mail-pl1-x641.google.com ([2607:f8b0:4864:20::641]:42761) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gnAPe-0005Od-So for qemu-devel@nongnu.org; Fri, 25 Jan 2019 17:57:27 -0500 Received: by mail-pl1-x641.google.com with SMTP id y1so5198329plp.9 for ; Fri, 25 Jan 2019 14:57:26 -0800 (PST) Received: from cloudburst.twiddle.net (97-126-115-157.tukw.qwest.net. [97.126.115.157]) by smtp.gmail.com with ESMTPSA id c7sm39148321pfh.18.2019.01.25.14.57.24 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 25 Jan 2019 14:57:24 -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; bh=eAN8JYVbSnX+ldVfWjGFmsPXa8V/C/8OAJUAV3yGxuM=; b=M3AugaO4W12+MtXOmZlLU5wNlbioeVjxVmMPRfAopP20LfqTx0tbbxZDsIfNJp+DCr kB3UdXFNveoLwJH5c/LckscHBy5nI5OTAq7bel/BWaDU3oPlYlGZKRjy3lwLZmI2BigQ 4gXQzBAchpCX0LVdQFY0vjrmAcVm11gGRHX9A= 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; bh=eAN8JYVbSnX+ldVfWjGFmsPXa8V/C/8OAJUAV3yGxuM=; b=tS8lyEYMO5k3xKuDPlVxOjLQivCUMFcdCiuVXKLV4n6KMAD0JZ1B2IR5HHepIaXxwx rMdGS7iPrnmv4oRQrg3LpuOM57JPi320EGq/tFWOwo8TLCcCcLTpk0d6cBqSo8ETm7r/ kyGVpnf5HMquH89LS2m9qRYi6NUKUpzJH3lltp2uMZoQsnkp2q9gqSmONqa4zj0gw4sT TNn8uK/IE60LNGcNe20Uhyo83cExi622/m8/BxlQuIKOAd3tlEHsow8lcnyrCKD7z9Mw Vc9Oz8CfgoZPqP/FFt6zGeOPpkHsSX943upvh0l/lrHCmAzmp6h0kUikwGTU4aQQxToB MwCg== X-Gm-Message-State: AJcUukdijmalDwV2/XPeMxfV2WU4VTvA76djzFJyTf2FPj1IvHIKvPuv rmxyneGJ0y6J9ff1MevFEPFlnYb4W9I= X-Google-Smtp-Source: ALg8bN7mzWvZuJMgF4OCKB6Ibks4HxYcSWd+nhEtieNRO/5Dgd5yyqsqaoETprgYFEkNq4bNazyJHw== X-Received: by 2002:a17:902:584:: with SMTP id f4mr13271405plf.28.1548457045347; Fri, 25 Jan 2019 14:57:25 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Date: Fri, 25 Jan 2019 14:57:14 -0800 Message-Id: <20190125225714.10234-8-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20190125225714.10234-1-richard.henderson@linaro.org> References: <20190125225714.10234-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::641 Subject: [Qemu-devel] [PATCH 6/6] tests/tcg/aarch64: Add pauth smoke tests X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Richard Henderson Reviewed-by: Alex Benn=C3=A9e --- tests/tcg/aarch64/pauth-1.c | 23 +++++++++++++++++++++++ tests/tcg/aarch64/Makefile.target | 7 ++++++- 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 tests/tcg/aarch64/pauth-1.c diff --git a/tests/tcg/aarch64/pauth-1.c b/tests/tcg/aarch64/pauth-1.c new file mode 100644 index 0000000000..9bd8d28ede --- /dev/null +++ b/tests/tcg/aarch64/pauth-1.c @@ -0,0 +1,23 @@ +#include +#include + +asm(".arch armv8.4-a"); + +#ifndef PR_PAC_RESET_KEYS +#define PR_PAC_RESET_KEYS 54 +#define PR_PAC_APDAKEY (1 << 2) +#endif + +int main() +{ + int x; + void *p0 =3D &x, *p1, *p2; + + asm volatile("pacdza %0" : "=3Dr"(p1) : "0"(p0)); + prctl(PR_PAC_RESET_KEYS, PR_PAC_APDAKEY); + asm volatile("pacdza %0" : "=3Dr"(p2) : "0"(p0)); + + assert(p1 !=3D p0); + assert(p1 !=3D p2); + return 0; +} diff --git a/tests/tcg/aarch64/Makefile.target b/tests/tcg/aarch64/Makefile= .target index 08c45b8470..e80d07276c 100644 --- a/tests/tcg/aarch64/Makefile.target +++ b/tests/tcg/aarch64/Makefile.target @@ -8,10 +8,15 @@ VPATH +=3D $(AARCH64_SRC) # we don't build any of the ARM tests AARCH64_TESTS=3D$(filter-out $(ARM_TESTS), $(TESTS)) AARCH64_TESTS+=3Dfcvt -TESTS:=3D$(AARCH64_TESTS) =20 fcvt: LDFLAGS+=3D-lm =20 run-fcvt: fcvt $(call run-test,$<,$(QEMU) $<, "$< on $(TARGET_NAME)") $(call diff-out,$<,$(AARCH64_SRC)/fcvt.ref) + +AARCH64_TESTS +=3D pauth-1 +pauth-%: CFLAGS +=3D -O -g +run-pauth-%: QEMU +=3D -cpu max + +TESTS:=3D$(AARCH64_TESTS) --=20 2.17.2