[PATCH v3 00/11] target/arm mte fixes

Richard Henderson posted 11 patches 3 years ago
Test checkpatch failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20210402214217.422585-1-richard.henderson@linaro.org
Maintainers: Richard Henderson <richard.henderson@linaro.org>, Paolo Bonzini <pbonzini@redhat.com>, Peter Maydell <peter.maydell@linaro.org>
There is a newer version of this series
target/arm/helper-a64.h           |   3 +-
target/arm/internals.h            |  10 +-
target/arm/translate-a64.h        |   2 +-
tests/tcg/aarch64/mte.h           |   3 +-
accel/tcg/translate-all.c         |   9 +-
target/arm/mte_helper.c           | 169 ++++++++++++------------------
target/arm/sve_helper.c           | 100 ++++++------------
target/arm/translate-a64.c        |  22 ++--
target/arm/translate-sve.c        |   9 +-
tests/tcg/aarch64/mte-5.c         |  44 ++++++++
tests/tcg/aarch64/mte-6.c         |  43 ++++++++
tests/tcg/aarch64/Makefile.target |   2 +-
12 files changed, 216 insertions(+), 200 deletions(-)
create mode 100644 tests/tcg/aarch64/mte-5.c
create mode 100644 tests/tcg/aarch64/mte-6.c
[PATCH v3 00/11] target/arm mte fixes
Posted by Richard Henderson 3 years ago
Changes for v3:
  * linux-user mprotect fix moved to start, just to get it out
    of the way while I reworked the others.

  * Patch 2, the fix for unaligned accesses, has been split into 9.
    Hopefully these are much easier to review than previously.

    Technically only patches 1-6,11 are required for bug fixing.
    Patches 7-10 are only cleanups, but I think they're important
    for clarity post bug fixing.


r~


Richard Henderson (11):
  accel/tcg: Preserve PAGE_ANON when changing page permissions
  target/arm: Check PAGE_WRITE_ORG for MTE writeability
  target/arm: Fix unaligned mte checks for mte_checkN
  target/arm: Split out mte_probe_int
  target/arm: Fix unaligned checks for mte_check1, mte_probe1
  test/tcg/aarch64: Add mte-5
  target/arm: Replace MTEDESC ESIZE+TSIZE with SIZEM1
  target/arm: Merge mte_check1, mte_checkN
  target/arm: Rename mte_probe1 to mte_probe
  target/arm: Simplify sve mte checking
  target/arm: Remove log2_esize parameter to gen_mte_checkN

 target/arm/helper-a64.h           |   3 +-
 target/arm/internals.h            |  10 +-
 target/arm/translate-a64.h        |   2 +-
 tests/tcg/aarch64/mte.h           |   3 +-
 accel/tcg/translate-all.c         |   9 +-
 target/arm/mte_helper.c           | 169 ++++++++++++------------------
 target/arm/sve_helper.c           | 100 ++++++------------
 target/arm/translate-a64.c        |  22 ++--
 target/arm/translate-sve.c        |   9 +-
 tests/tcg/aarch64/mte-5.c         |  44 ++++++++
 tests/tcg/aarch64/mte-6.c         |  43 ++++++++
 tests/tcg/aarch64/Makefile.target |   2 +-
 12 files changed, 216 insertions(+), 200 deletions(-)
 create mode 100644 tests/tcg/aarch64/mte-5.c
 create mode 100644 tests/tcg/aarch64/mte-6.c

-- 
2.25.1


Re: [PATCH v3 00/11] target/arm mte fixes
Posted by Richard Henderson 3 years ago
On 4/2/21 2:42 PM, Richard Henderson wrote:
> Changes for v3:
>    * linux-user mprotect fix moved to start, just to get it out
>      of the way while I reworked the others.
> 
>    * Patch 2, the fix for unaligned accesses, has been split into 9.
>      Hopefully these are much easier to review than previously.
> 
>      Technically only patches 1-6,11 are required for bug fixing.
>      Patches 7-10 are only cleanups, but I think they're important
>      for clarity post bug fixing.

... and it fails all of the kasan unit tests.
I'll have to investigate more next week.


r~

Re: [PATCH v3 00/11] target/arm mte fixes
Posted by no-reply@patchew.org 3 years ago
Patchew URL: https://patchew.org/QEMU/20210402214217.422585-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: 20210402214217.422585-1-richard.henderson@linaro.org
Subject: [PATCH v3 00/11] target/arm mte fixes

=== 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/20210402214217.422585-1-richard.henderson@linaro.org -> patchew/20210402214217.422585-1-richard.henderson@linaro.org
Switched to a new branch 'test'
68e7ff5 target/arm: Remove log2_esize parameter to gen_mte_checkN
917150d target/arm: Simplify sve mte checking
df605ac target/arm: Rename mte_probe1 to mte_probe
5d05acd target/arm: Merge mte_check1, mte_checkN
55efc98 target/arm: Replace MTEDESC ESIZE+TSIZE with SIZEM1
b958537 test/tcg/aarch64: Add mte-5
6d42d71 target/arm: Fix unaligned checks for mte_check1, mte_probe1
7c95552 target/arm: Split out mte_probe_int
ab8d9f2 target/arm: Fix unaligned mte checks for mte_checkN
6522781 target/arm: Check PAGE_WRITE_ORG for MTE writeability
771cfe4 accel/tcg: Preserve PAGE_ANON when changing page permissions

=== OUTPUT BEGIN ===
1/11 Checking commit 771cfe41bdc8 (accel/tcg: Preserve PAGE_ANON when changing page permissions)
Use of uninitialized value $acpi_testexpected in string eq at ./scripts/checkpatch.pl line 1529.
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#66: 
new file mode 100644

ERROR: "foo * bar" should be "foo *bar"
#123: FILE: tests/tcg/aarch64/mte.h:51:
+static void * alloc_mte_mem(size_t size) __attribute__((unused));

ERROR: "foo * bar" should be "foo *bar"
#124: FILE: tests/tcg/aarch64/mte.h:52:
+static void * alloc_mte_mem(size_t size)

total: 2 errors, 1 warnings, 84 lines checked

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

2/11 Checking commit 6522781f3b21 (target/arm: Check PAGE_WRITE_ORG for MTE writeability)
WARNING: line over 80 characters
#28: FILE: target/arm/mte_helper.c:86:
+    if (!(flags & (ptr_access == MMU_DATA_STORE ? PAGE_WRITE_ORG : PAGE_READ))) {

total: 0 errors, 1 warnings, 8 lines checked

Patch 2/11 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
3/11 Checking commit ab8d9f210520 (target/arm: Fix unaligned mte checks for mte_checkN)
4/11 Checking commit 7c955521ae85 (target/arm: Split out mte_probe_int)
5/11 Checking commit 6d42d7142d50 (target/arm: Fix unaligned checks for mte_check1, mte_probe1)
6/11 Checking commit b9585374b34f (test/tcg/aarch64: Add mte-5)
Use of uninitialized value $acpi_testexpected in string eq at ./scripts/checkpatch.pl line 1529.
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#29: 
new file mode 100644

total: 0 errors, 1 warnings, 52 lines checked

Patch 6/11 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
7/11 Checking commit 55efc980e5e6 (target/arm: Replace MTEDESC ESIZE+TSIZE with SIZEM1)
8/11 Checking commit 5d05acd069de (target/arm: Merge mte_check1, mte_checkN)
9/11 Checking commit df605ac4b3bf (target/arm: Rename mte_probe1 to mte_probe)
10/11 Checking commit 917150d58e70 (target/arm: Simplify sve mte checking)
ERROR: spaces required around that '*' (ctx:WxV)
#95: FILE: target/arm/sve_helper.c:4438:
+               sve_ldst1_tlb_fn *tlb_fn)
                                 ^

ERROR: spaces required around that '*' (ctx:WxV)
#189: FILE: target/arm/sve_helper.c:5063:
+               sve_ldst1_tlb_fn *tlb_fn)
                                 ^

total: 2 errors, 0 warnings, 202 lines checked

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

11/11 Checking commit 68e7ff597778 (target/arm: Remove log2_esize parameter to gen_mte_checkN)
=== OUTPUT END ===

Test command exited with code: 1


The full log is available at
http://patchew.org/logs/20210402214217.422585-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