mbox series

[v4,00/23] target-arm: Implement ARMv8.5-MemTag, user mode

Message ID 20210128224141.638790-1-richard.henderson@linaro.org
Headers show
Series target-arm: Implement ARMv8.5-MemTag, user mode | expand

Message

Richard Henderson Jan. 28, 2021, 10:41 p.m. UTC
The kernel abi was finally merged into 5.10.

Changes for v4:
  * Revamp "Add support for TARGET_TAGGED_ADDRESSES".  There are now two
    sets of functions in include/exec/, one for tagged and one for
    untagged addresses.  The former takes a CPUState, and does not
    assume current_cpu is a thing.  So much for the generic bits...
    However, use of current_cpu remains, pushed down to lock_user.
    Changing everything that touches that, or get/put_user, is daunting.
  * Fix tbi0 vs tbi1 for linux-user.
    This had a number of cascading effects.
  * Adjust when async errors are noticed.

Changes for v3:
  * Split out type changes to separate patches.
  * Add doc comments; tweak alloc so that the !PAGE_VALID case is clear.
  * Do not overlap PAGE_TARGET_2 with PAGE_RESERVED.
  * Use syndrome.h, arm_deliver_fault.


r~


Richard Henderson (23):
  tcg: Introduce target-specific page data for user-only
  linux-user: Introduce PAGE_ANON
  exec: Use uintptr_t for guest_base
  exec: Use uintptr_t in cpu_ldst.h
  exec: Improve types for guest_addr_valid
  linux-user: Check for overflow in access_ok
  linux-user: Tidy VERIFY_READ/VERIFY_WRITE
  bsd-user: Tidy VERIFY_READ/VERIFY_WRITE
  linux-user: Do not use guest_addr_valid for h2g_valid
  linux-user: Fix guest_addr_valid vs reserved_va
  exec: Add support for TARGET_TAGGED_ADDRESSES
  linux-user/aarch64: Implement PR_TAGGED_ADDR_ENABLE
  target/arm: Improve gen_top_byte_ignore
  target/arm: Use the proper TBI settings for linux-user
  linux-user/aarch64: Implement PR_MTE_TCF and PR_MTE_TAG
  linux-user/aarch64: Implement PROT_MTE
  target/arm: Split out syndrome.h from internals.h
  linux-user/aarch64: Pass syndrome to EXC_*_ABORT
  linux-user/aarch64: Signal SEGV_MTESERR for sync tag check fault
  linux-user/aarch64: Signal SEGV_MTEAERR for async tag check error
  target/arm: Add allocation tag storage for user mode
  target/arm: Enable MTE for user-only
  tests/tcg/aarch64: Add mte smoke tests

 bsd-user/qemu.h                     |   9 +-
 include/exec/cpu-all.h              |  47 ++++-
 include/exec/cpu_ldst.h             |  42 +++--
 linux-user/aarch64/target_signal.h  |   3 +
 linux-user/aarch64/target_syscall.h |  13 ++
 linux-user/qemu.h                   |  19 +-
 linux-user/syscall_defs.h           |   1 +
 target/arm/cpu-param.h              |   3 +
 target/arm/cpu.h                    |  32 ++++
 target/arm/internals.h              | 249 +------------------------
 target/arm/syndrome.h               | 273 ++++++++++++++++++++++++++++
 tests/tcg/aarch64/mte.h             |  60 ++++++
 accel/tcg/translate-all.c           |  28 +++
 bsd-user/main.c                     |   4 +-
 linux-user/aarch64/cpu_loop.c       |  38 +++-
 linux-user/elfload.c                |   4 +-
 linux-user/main.c                   |   4 +-
 linux-user/mmap.c                   |  29 ++-
 linux-user/syscall.c                |  71 +++++++-
 target/arm/cpu.c                    |  25 ++-
 target/arm/mte_helper.c             |  39 +++-
 target/arm/tlb_helper.c             |  15 +-
 target/arm/translate-a64.c          |  25 +--
 tests/tcg/aarch64/mte-1.c           |  28 +++
 tests/tcg/aarch64/mte-2.c           |  45 +++++
 tests/tcg/aarch64/mte-3.c           |  51 ++++++
 tests/tcg/aarch64/mte-4.c           |  45 +++++
 tests/tcg/aarch64/pauth-2.c         |   1 -
 tests/tcg/aarch64/Makefile.target   |   6 +
 tests/tcg/configure.sh              |   4 +
 30 files changed, 888 insertions(+), 325 deletions(-)
 create mode 100644 target/arm/syndrome.h
 create mode 100644 tests/tcg/aarch64/mte.h
 create mode 100644 tests/tcg/aarch64/mte-1.c
 create mode 100644 tests/tcg/aarch64/mte-2.c
 create mode 100644 tests/tcg/aarch64/mte-3.c
 create mode 100644 tests/tcg/aarch64/mte-4.c

-- 
2.25.1

Comments

no-reply@patchew.org Jan. 28, 2021, 11:15 p.m. UTC | #1
Patchew URL: https://patchew.org/QEMU/20210128224141.638790-1-richard.henderson@linaro.org/



Hi,

This series seems to have some coding style problems. See output below for
more information:

Type: series
Message-id: 20210128224141.638790-1-richard.henderson@linaro.org
Subject: [PATCH v4 00/23] target-arm: Implement ARMv8.5-MemTag, user mode

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
 * [new tag]         patchew/20210128224141.638790-1-richard.henderson@linaro.org -> patchew/20210128224141.638790-1-richard.henderson@linaro.org
Switched to a new branch 'test'
6c36cfa tests/tcg/aarch64: Add mte smoke tests
93868dc target/arm: Enable MTE for user-only
89c67bb target/arm: Add allocation tag storage for user mode
9e55bce linux-user/aarch64: Signal SEGV_MTEAERR for async tag check error
662f309 linux-user/aarch64: Signal SEGV_MTESERR for sync tag check fault
405c8bc linux-user/aarch64: Pass syndrome to EXC_*_ABORT
852c847 target/arm: Split out syndrome.h from internals.h
aaea091 linux-user/aarch64: Implement PROT_MTE
40b5989 linux-user/aarch64: Implement PR_MTE_TCF and PR_MTE_TAG
ffe7c9e target/arm: Use the proper TBI settings for linux-user
749b207 target/arm: Improve gen_top_byte_ignore
4b25f7f linux-user/aarch64: Implement PR_TAGGED_ADDR_ENABLE
d905335 exec: Add support for TARGET_TAGGED_ADDRESSES
0757b19 linux-user: Fix guest_addr_valid vs reserved_va
f2294c5 linux-user: Do not use guest_addr_valid for h2g_valid
67730ef bsd-user: Tidy VERIFY_READ/VERIFY_WRITE
f4cd54c linux-user: Tidy VERIFY_READ/VERIFY_WRITE
6cf3801 linux-user: Check for overflow in access_ok
ce479f6 exec: Improve types for guest_addr_valid
99a6c83 exec: Use uintptr_t in cpu_ldst.h
b43639c exec: Use uintptr_t for guest_base
2c72fdf linux-user: Introduce PAGE_ANON
28506f41 tcg: Introduce target-specific page data for user-only

=== OUTPUT BEGIN ===
1/23 Checking commit 28506f418a43 (tcg: Introduce target-specific page data for user-only)
2/23 Checking commit 2c72fdf28de9 (linux-user: Introduce PAGE_ANON)
3/23 Checking commit b43639c7a6f9 (exec: Use uintptr_t for guest_base)
4/23 Checking commit 99a6c8388583 (exec: Use uintptr_t in cpu_ldst.h)
5/23 Checking commit ce479f673a66 (exec: Improve types for guest_addr_valid)
6/23 Checking commit 6cf38016de1c (linux-user: Check for overflow in access_ok)
7/23 Checking commit f4cd54ce0606 (linux-user: Tidy VERIFY_READ/VERIFY_WRITE)
8/23 Checking commit 67730ef0214d (bsd-user: Tidy VERIFY_READ/VERIFY_WRITE)
9/23 Checking commit f2294c5aeb95 (linux-user: Do not use guest_addr_valid for h2g_valid)
10/23 Checking commit 0757b19036b7 (linux-user: Fix guest_addr_valid vs reserved_va)
11/23 Checking commit d905335fb7aa (exec: Add support for TARGET_TAGGED_ADDRESSES)
12/23 Checking commit 4b25f7f499e3 (linux-user/aarch64: Implement PR_TAGGED_ADDR_ENABLE)
13/23 Checking commit 749b207a98e2 (target/arm: Improve gen_top_byte_ignore)
14/23 Checking commit ffe7c9e590c3 (target/arm: Use the proper TBI settings for linux-user)
15/23 Checking commit 40b598970ac8 (linux-user/aarch64: Implement PR_MTE_TCF and PR_MTE_TAG)
16/23 Checking commit aaea091c2349 (linux-user/aarch64: Implement PROT_MTE)
17/23 Checking commit 852c84714792 (target/arm: Split out syndrome.h from internals.h)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#281: 
new file mode 100644

total: 0 errors, 1 warnings, 530 lines checked

Patch 17/23 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
18/23 Checking commit 405c8bc94002 (linux-user/aarch64: Pass syndrome to EXC_*_ABORT)
19/23 Checking commit 662f30915b17 (linux-user/aarch64: Signal SEGV_MTESERR for sync tag check fault)
20/23 Checking commit 9e55bcec5069 (linux-user/aarch64: Signal SEGV_MTEAERR for async tag check error)
21/23 Checking commit 89c67bb0643e (target/arm: Add allocation tag storage for user mode)
22/23 Checking commit 93868dc63114 (target/arm: Enable MTE for user-only)
23/23 Checking commit 6c36cfabbd96 (tests/tcg/aarch64: Add mte smoke tests)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#37: 
new file mode 100644

ERROR: trailing statements should be on next line
#176: FILE: tests/tcg/aarch64/mte-3.c:50:
+    while (1);

ERROR: braces {} are necessary for all arms of this statement
#176: FILE: tests/tcg/aarch64/mte-3.c:50:
+    while (1);
[...]

ERROR: use qemu_real_host_page_size instead of getpagesize()
#214: FILE: tests/tcg/aarch64/mte-4.c:31:
+    size_t size = getpagesize() * 4;

total: 3 errors, 1 warnings, 251 lines checked

Patch 23/23 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

=== OUTPUT END ===

Test command exited with code: 1


The full log is available at
http://patchew.org/logs/20210128224141.638790-1-richard.henderson@linaro.org/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com