[PATCH v12 00/12] linux-user: User support for AArch64 BTI

Richard Henderson posted 12 patches 3 years, 6 months ago
Test checkpatch failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20201021173749.111103-1-richard.henderson@linaro.org
Maintainers: Laurent Vivier <laurent@vivier.eu>, Richard Henderson <rth@twiddle.net>, Peter Maydell <peter.maydell@linaro.org>, Paolo Bonzini <pbonzini@redhat.com>
include/elf.h                     |  22 ++
include/exec/cpu-all.h            |   2 +
linux-user/qemu.h                 |   4 +
linux-user/syscall_defs.h         |   4 +
target/arm/cpu.h                  |   5 +
linux-user/aarch64/signal.c       |  10 +-
linux-user/elfload.c              | 326 +++++++++++++++++++++++++-----
linux-user/mmap.c                 |  16 ++
target/arm/translate-a64.c        |   6 +-
tests/tcg/aarch64/bti-1.c         |  62 ++++++
tests/tcg/aarch64/bti-2.c         | 116 +++++++++++
tests/tcg/aarch64/bti-crt.inc.c   |  51 +++++
tests/tcg/aarch64/Makefile.target |  10 +
tests/tcg/configure.sh            |   4 +
14 files changed, 577 insertions(+), 61 deletions(-)
create mode 100644 tests/tcg/aarch64/bti-1.c
create mode 100644 tests/tcg/aarch64/bti-2.c
create mode 100644 tests/tcg/aarch64/bti-crt.inc.c
[PATCH v12 00/12] linux-user: User support for AArch64 BTI
Posted by Richard Henderson 3 years, 6 months ago
The kernel abi for this was merged in v5.8, just as the qemu 5.1
merge window was closing, so this slipped to the next dev cycle.

Changes from v11:
  * Fix the reported bti-2 crash.
    Work around a bug in ld from binutils 2.34 (in our docker image,
    and Linaro's aarch64 ubuntu 20 host), which has been fixed in
    binutils 2.35 (in my laptop's cross-compiler installation).

Changes from v10:
  * Include Phil's plug of interp_name memory leak.
  * Convert error reporting to Error api.
  * Mirror the kernel's code structure for parsing notes
    (though Error means that it's not exactly the same).
  * Split aarch64 stuff from basic note parsing patch.

Changes from v9:
  * Split what is now patch 7 into 3 more (pmm).
  * All prerequisites are now upstream.


r~


Philippe Mathieu-Daudé (1):
  linux-user/elfload: Avoid leaking interp_name using GLib memory API

Richard Henderson (11):
  linux-user/aarch64: Reset btype for signals
  linux-user: Set PAGE_TARGET_1 for TARGET_PROT_BTI
  include/elf: Add defines related to GNU property notes for AArch64
  linux-user/elfload: Fix coding style in load_elf_image
  linux-user/elfload: Adjust iteration over phdr
  linux-user/elfload: Move PT_INTERP detection to first loop
  linux-user/elfload: Use Error for load_elf_image
  linux-user/elfload: Use Error for load_elf_interp
  linux-user/elfload: Parse NT_GNU_PROPERTY_TYPE_0 notes
  linux-user/elfload: Parse GNU_PROPERTY_AARCH64_FEATURE_1_AND
  tests/tcg/aarch64: Add bti smoke tests

 include/elf.h                     |  22 ++
 include/exec/cpu-all.h            |   2 +
 linux-user/qemu.h                 |   4 +
 linux-user/syscall_defs.h         |   4 +
 target/arm/cpu.h                  |   5 +
 linux-user/aarch64/signal.c       |  10 +-
 linux-user/elfload.c              | 326 +++++++++++++++++++++++++-----
 linux-user/mmap.c                 |  16 ++
 target/arm/translate-a64.c        |   6 +-
 tests/tcg/aarch64/bti-1.c         |  62 ++++++
 tests/tcg/aarch64/bti-2.c         | 116 +++++++++++
 tests/tcg/aarch64/bti-crt.inc.c   |  51 +++++
 tests/tcg/aarch64/Makefile.target |  10 +
 tests/tcg/configure.sh            |   4 +
 14 files changed, 577 insertions(+), 61 deletions(-)
 create mode 100644 tests/tcg/aarch64/bti-1.c
 create mode 100644 tests/tcg/aarch64/bti-2.c
 create mode 100644 tests/tcg/aarch64/bti-crt.inc.c

-- 
2.25.1


Re: [PATCH v12 00/12] linux-user: User support for AArch64 BTI
Posted by no-reply@patchew.org 3 years, 6 months ago
Patchew URL: https://patchew.org/QEMU/20201021173749.111103-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: 20201021173749.111103-1-richard.henderson@linaro.org
Subject: [PATCH v12 00/12] linux-user: User support for AArch64 BTI

=== 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/20201021173749.111103-1-richard.henderson@linaro.org -> patchew/20201021173749.111103-1-richard.henderson@linaro.org
Switched to a new branch 'test'
a29094b tests/tcg/aarch64: Add bti smoke tests
f18d87e linux-user/elfload: Parse GNU_PROPERTY_AARCH64_FEATURE_1_AND
70bfc7d linux-user/elfload: Parse NT_GNU_PROPERTY_TYPE_0 notes
5685446 linux-user/elfload: Use Error for load_elf_interp
889227d linux-user/elfload: Use Error for load_elf_image
6488849 linux-user/elfload: Move PT_INTERP detection to first loop
f146ccd linux-user/elfload: Adjust iteration over phdr
95327ed linux-user/elfload: Fix coding style in load_elf_image
e7cae28 linux-user/elfload: Avoid leaking interp_name using GLib memory API
3b2042c include/elf: Add defines related to GNU property notes for AArch64
77278cb linux-user: Set PAGE_TARGET_1 for TARGET_PROT_BTI
366109a linux-user/aarch64: Reset btype for signals

=== OUTPUT BEGIN ===
1/12 Checking commit 366109a44557 (linux-user/aarch64: Reset btype for signals)
2/12 Checking commit 77278cb91315 (linux-user: Set PAGE_TARGET_1 for TARGET_PROT_BTI)
3/12 Checking commit 3b2042c78e66 (include/elf: Add defines related to GNU property notes for AArch64)
4/12 Checking commit e7cae283f650 (linux-user/elfload: Avoid leaking interp_name using GLib memory API)
5/12 Checking commit 95327ed3280e (linux-user/elfload: Fix coding style in load_elf_image)
6/12 Checking commit f146ccd556f4 (linux-user/elfload: Adjust iteration over phdr)
7/12 Checking commit 64888490999f (linux-user/elfload: Move PT_INTERP detection to first loop)
8/12 Checking commit 889227d67caa (linux-user/elfload: Use Error for load_elf_image)
9/12 Checking commit 5685446aa7ad (linux-user/elfload: Use Error for load_elf_interp)
10/12 Checking commit 70bfc7dc7990 (linux-user/elfload: Parse NT_GNU_PROPERTY_TYPE_0 notes)
11/12 Checking commit f18d87e529bc (linux-user/elfload: Parse GNU_PROPERTY_AARCH64_FEATURE_1_AND)
12/12 Checking commit a29094b462d8 (tests/tcg/aarch64: Add bti smoke tests)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#37: 
new file mode 100644

ERROR: use qemu_real_host_page_size instead of getpagesize()
#198: FILE: tests/tcg/aarch64/bti-2.c:89:
+    void *p = mmap(0, getpagesize(),

ERROR: externs should be avoided in .c files
#244: FILE: tests/tcg/aarch64/bti-crt.inc.c:13:
+int main(void);

total: 2 errors, 1 warnings, 255 lines checked

Patch 12/12 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/20201021173749.111103-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
Re: [PATCH v12 00/12] linux-user: User support for AArch64 BTI
Posted by Peter Maydell 3 years, 6 months ago
On Wed, 21 Oct 2020 at 18:37, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> The kernel abi for this was merged in v5.8, just as the qemu 5.1
> merge window was closing, so this slipped to the next dev cycle.
>
> Changes from v11:
>   * Fix the reported bti-2 crash.
>     Work around a bug in ld from binutils 2.34 (in our docker image,
>     and Linaro's aarch64 ubuntu 20 host), which has been fixed in
>     binutils 2.35 (in my laptop's cross-compiler installation).
>
> Changes from v10:
>   * Include Phil's plug of interp_name memory leak.
>   * Convert error reporting to Error api.
>   * Mirror the kernel's code structure for parsing notes
>     (though Error means that it's not exactly the same).
>   * Split aarch64 stuff from basic note parsing patch.
>
> Changes from v9:
>   * Split what is now patch 7 into 3 more (pmm).
>   * All prerequisites are now upstream.
>



Applied to target-arm.next, thanks.

-- PMM