All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>
Cc: Richard Henderson <richard.henderson@linaro.org>,
	QEMU Developers <qemu-devel@nongnu.org>,
	Peter Maydell <peter.maydell@linaro.org>
Subject: Re: [Qemu-devel] [PULL 11/22] tests/tcg/aarch64: Add pauth smoke test
Date: Mon, 11 Feb 2019 16:04:02 +0000	[thread overview]
Message-ID: <874l9awbv1.fsf@zen.linaroharston> (raw)
In-Reply-To: <CAP+75-Xsn5VvHLung5V03YZLQOiqP+VSugzj6d2c3ovkyKsCKw@mail.gmail.com>


Philippe Mathieu-Daudé <philmd@redhat.com> writes:

> On Tue, Feb 5, 2019 at 6:28 PM Peter Maydell <peter.maydell@linaro.org> wrote:
>>
>> From: Richard Henderson <richard.henderson@linaro.org>
>>
>> Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
>> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
>> Message-id: 20190201195404.30486-3-richard.henderson@linaro.org
>> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
>> ---
>>  tests/tcg/aarch64/Makefile.target |  6 +++++-
>>  tests/tcg/aarch64/pauth-1.c       | 23 +++++++++++++++++++++++
>>  2 files changed, 28 insertions(+), 1 deletion(-)
>>  create mode 100644 tests/tcg/aarch64/pauth-1.c
>>
>> diff --git a/tests/tcg/aarch64/Makefile.target b/tests/tcg/aarch64/Makefile.target
>> index 08c45b8470c..2bb914975be 100644
>> --- a/tests/tcg/aarch64/Makefile.target
>> +++ b/tests/tcg/aarch64/Makefile.target
>> @@ -8,10 +8,14 @@ VPATH                 += $(AARCH64_SRC)
>>  # we don't build any of the ARM tests
>>  AARCH64_TESTS=$(filter-out $(ARM_TESTS), $(TESTS))
>>  AARCH64_TESTS+=fcvt
>> -TESTS:=$(AARCH64_TESTS)
>>
>>  fcvt: LDFLAGS+=-lm
>>
>>  run-fcvt: fcvt
>>         $(call run-test,$<,$(QEMU) $<, "$< on $(TARGET_NAME)")
>>         $(call diff-out,$<,$(AARCH64_SRC)/fcvt.ref)
>> +
>> +AARCH64_TESTS += pauth-1
>> +run-pauth-%: QEMU += -cpu max
>> +
>> +TESTS:=$(AARCH64_TESTS)
>> diff --git a/tests/tcg/aarch64/pauth-1.c b/tests/tcg/aarch64/pauth-1.c
>> new file mode 100644
>> index 00000000000..ae6dc05c2b1
>> --- /dev/null
>> +++ b/tests/tcg/aarch64/pauth-1.c
>> @@ -0,0 +1,23 @@
>> +#include <assert.h>
>> +#include <sys/prctl.h>
>> +
>> +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 = &x, *p1, *p2;
>> +
>> +    asm volatile("pacdza %0" : "=r"(p1) : "0"(p0));
>> +    prctl(PR_PAC_RESET_KEYS, PR_PAC_APDAKEY, 0, 0, 0);
>> +    asm volatile("pacdza %0" : "=r"(p2) : "0"(p0));
>> +
>> +    assert(p1 != p0);
>> +    assert(p1 != p2);
>> +    return 0;
>> +}
>> --
>> 2.20.1
>
> Travis-CI is getting an error with this test:
>
> tests/docker/docker.py cc --user 2000 --cc aarch64-linux-gnu-gcc -i
> qemu:debian-arm64-cross -s . --   -Wall -O0 -g -fno-strict-aliasing
> tests/tcg/aarch64/pauth-1.c -o pauth-1  -static
> /tmp/ccHrAqV2.s: Assembler messages:
> /tmp/ccHrAqV2.s:7: Error: unknown architecture `armv8.4-a'
> /tmp/ccHrAqV2.s:41: Error: selected processor does not support `pacdza x0'
> /tmp/ccHrAqV2.s:56: Error: selected processor does not support `pacdza x0'
> tests/tcg/Makefile:79: recipe for target 'pauth-1' failed
> make[2]: *** [pauth-1] Error 1
> make[2]: Leaving directory 'aarch64-linux-user/tests'
> tests/tcg/Makefile.include:52: recipe for target
> 'docker-build-guest-tests' failed
> make[1]: *** [docker-build-guest-tests] Error 2
> make[1]: Leaving directory 'aarch64-linux-user'
> tests/Makefile.include:1030: recipe for target
> 'build-tcg-tests-aarch64-linux-user' failed
> make: *** [build-tcg-tests-aarch64-linux-user] Error 2

The fix for that is in my latest PR.

--
Alex Bennée

  reply	other threads:[~2019-02-11 16:04 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-05 17:04 [Qemu-devel] [PULL 00/22] target-arm queue Peter Maydell
2019-02-05 17:04 ` [Qemu-devel] [PULL 01/22] target/arm: Introduce isar_feature_aa64_bti Peter Maydell
2019-02-05 17:04 ` [Qemu-devel] [PULL 02/22] target/arm: Add PSTATE.BTYPE Peter Maydell
2019-02-05 17:04 ` [Qemu-devel] [PULL 03/22] target/arm: Add BT and BTYPE to tb->flags Peter Maydell
2019-02-05 17:04 ` [Qemu-devel] [PULL 04/22] exec: Add target-specific tlb bits to MemTxAttrs Peter Maydell
2019-02-05 17:04 ` [Qemu-devel] [PULL 05/22] target/arm: Cache the GP bit for a page in MemTxAttrs Peter Maydell
2019-02-05 17:04 ` [Qemu-devel] [PULL 06/22] target/arm: Default handling of BTYPE during translation Peter Maydell
2019-02-05 17:04 ` [Qemu-devel] [PULL 07/22] target/arm: Reset btype for direct branches Peter Maydell
2019-02-05 17:04 ` [Qemu-devel] [PULL 08/22] target/arm: Set btype for indirect branches Peter Maydell
2019-02-05 17:04 ` [Qemu-devel] [PULL 09/22] target/arm: Enable BTI for -cpu max Peter Maydell
2019-02-05 17:04 ` [Qemu-devel] [PULL 10/22] linux-user: Implement PR_PAC_RESET_KEYS Peter Maydell
2019-02-05 17:04 ` [Qemu-devel] [PULL 11/22] tests/tcg/aarch64: Add pauth smoke test Peter Maydell
2019-02-11 15:52   ` Philippe Mathieu-Daudé
2019-02-11 16:04     ` Alex Bennée [this message]
2019-02-11 16:05       ` Philippe Mathieu-Daudé
2019-02-05 17:05 ` [Qemu-devel] [PULL 12/22] target/arm: Add TBFLAG_A64_TBID, split out gen_top_byte_ignore Peter Maydell
2019-02-05 17:05 ` [Qemu-devel] [PULL 13/22] target/arm: Clean TBI for data operations in the translator Peter Maydell
2019-02-05 17:05 ` [Qemu-devel] [PULL 14/22] target/arm: Compute TB_FLAGS for TBI for user-only Peter Maydell
2019-02-05 17:05 ` [Qemu-devel] [PULL 15/22] target/arm: Enable " Peter Maydell
2019-02-05 17:05 ` [Qemu-devel] [PULL 16/22] gdbstub: allow killing QEMU via vKill command Peter Maydell
2019-02-05 17:05 ` [Qemu-devel] [PULL 17/22] hw/arm/boot: Fix block comment style in arm_load_kernel() Peter Maydell
2019-02-05 17:05 ` [Qemu-devel] [PULL 18/22] hw/arm/boot: Factor out "direct kernel boot" code into its own function Peter Maydell
2019-02-05 17:05 ` [Qemu-devel] [PULL 19/22] hw/arm/boot: Factor out "set up firmware boot" code Peter Maydell
2019-02-05 17:05 ` [Qemu-devel] [PULL 20/22] hw/arm/boot: Clarify why arm_setup_firmware_boot() doesn't set env->boot_info Peter Maydell
2019-02-05 17:05 ` [Qemu-devel] [PULL 21/22] hw/arm/boot: Support DTB autoload for firmware-only boots Peter Maydell
2019-02-05 17:05 ` [Qemu-devel] [PULL 22/22] target/arm: Make FPSCR/FPCR trapped-exception bits RAZ/WI Peter Maydell
2019-02-05 18:03 ` [Qemu-devel] [PULL 00/22] target-arm queue no-reply
2019-02-05 18:04 ` no-reply
2019-02-05 18:27 ` no-reply
2019-02-05 19:36 ` Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874l9awbv1.fsf@zen.linaroharston \
    --to=alex.bennee@linaro.org \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.