mbox series

[v4,0/4] target/arm: Implement ARMv8.5-BTI for linux-user

Message ID 20190330005900.17282-1-richard.henderson@linaro.org
Headers show
Series target/arm: Implement ARMv8.5-BTI for linux-user | expand

Message

Richard Henderson March 30, 2019, 12:58 a.m. UTC
The bits within the elf file that cover this have been published[1],
but the change to <asm/mman.h> for use by mmap/mprotect has not.
So I've made something up with which to make progress (TARGET_PROT_BTI).

I intend to press folk at Linaro Connect next week on publishing the
necessary ABI changes for this and ARMv8.5-MemTag.


r~


[1] https://developer.arm.com/docs/ihi0056/latest/elf-for-the-arm-64-bit-architecture-aarch64-abi-2018q4


Richard Henderson (4):
  linux-user/aarch64: Reset btype for syscalls and signals
  linux-user: Set PAGE_TARGET_1 for TARGET_PROT_BTI
  linux-user: Parse NT_GNU_PROPERTY_TYPE_0 notes
  tests/tcg/aarch64: Add bti smoke test

 include/exec/cpu-all.h            | 12 +++--
 linux-user/syscall_defs.h         |  5 ++
 linux-user/aarch64/cpu_loop.c     |  7 +++
 linux-user/aarch64/signal.c       |  5 +-
 linux-user/elfload.c              | 79 ++++++++++++++++++++++++++-----
 linux-user/mmap.c                 | 13 ++++-
 target/arm/translate-a64.c        |  6 +--
 tests/tcg/aarch64/bti-1.c         | 62 ++++++++++++++++++++++++
 tests/tcg/aarch64/bti-crt.inc.c   | 69 +++++++++++++++++++++++++++
 tests/tcg/aarch64/Makefile.target |  3 ++
 10 files changed, 241 insertions(+), 20 deletions(-)
 create mode 100644 tests/tcg/aarch64/bti-1.c
 create mode 100644 tests/tcg/aarch64/bti-crt.inc.c

-- 
2.17.1

Comments

no-reply@patchew.org March 30, 2019, 3:37 a.m. UTC | #1
Patchew URL: https://patchew.org/QEMU/20190330005900.17282-1-richard.henderson@linaro.org/



Hi,

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

Message-id: 20190330005900.17282-1-richard.henderson@linaro.org
Subject: [Qemu-devel] [PATCH v4 0/4] target/arm: Implement ARMv8.5-BTI for linux-user
Type: series

=== 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/20190330005900.17282-1-richard.henderson@linaro.org -> patchew/20190330005900.17282-1-richard.henderson@linaro.org
Switched to a new branch 'test'
e735b58f1f tests/tcg/aarch64: Add bti smoke test
cb1aeb2cdf linux-user: Parse NT_GNU_PROPERTY_TYPE_0 notes
7f1ca84a60 linux-user: Set PAGE_TARGET_1 for TARGET_PROT_BTI
f615d62d61 linux-user/aarch64: Reset btype for syscalls and signals

=== OUTPUT BEGIN ===
1/4 Checking commit f615d62d6140 (linux-user/aarch64: Reset btype for syscalls and signals)
2/4 Checking commit 7f1ca84a60a9 (linux-user: Set PAGE_TARGET_1 for TARGET_PROT_BTI)
3/4 Checking commit cb1aeb2cdfa7 (linux-user: Parse NT_GNU_PROPERTY_TYPE_0 notes)
ERROR: trailing statements should be on next line
#129: FILE: linux-user/elfload.c:2419:
+            if (eppnt->p_flags & PF_X) elf_prot |= prot_exec;

ERROR: braces {} are necessary for all arms of this statement
#129: FILE: linux-user/elfload.c:2419:
+            if (eppnt->p_flags & PF_X) elf_prot |= prot_exec;
[...]

total: 2 errors, 0 warnings, 111 lines checked

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

4/4 Checking commit e735b58f1fb3 (tests/tcg/aarch64: Add bti smoke test)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#23: 
new file mode 100644

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

ERROR: code indent should never use tabs
#155: FILE: tests/tcg/aarch64/bti-crt.inc.c:60:
+^I.align^I3\n\$

ERROR: code indent should never use tabs
#156: FILE: tests/tcg/aarch64/bti-crt.inc.c:61:
+^I.long^I4\n\$

ERROR: code indent should never use tabs
#157: FILE: tests/tcg/aarch64/bti-crt.inc.c:62:
+        .long^I16\n\$

ERROR: code indent should never use tabs
#158: FILE: tests/tcg/aarch64/bti-crt.inc.c:63:
+        .long^I5\n\$

ERROR: code indent should never use tabs
#159: FILE: tests/tcg/aarch64/bti-crt.inc.c:64:
+        .string^I\"GNU\"\n\$

ERROR: code indent should never use tabs
#160: FILE: tests/tcg/aarch64/bti-crt.inc.c:65:
+^I.long^I0xc0000000\n\$

ERROR: code indent should never use tabs
#161: FILE: tests/tcg/aarch64/bti-crt.inc.c:66:
+^I.long^I4\n\$

ERROR: code indent should never use tabs
#162: FILE: tests/tcg/aarch64/bti-crt.inc.c:67:
+^I.long^I1\n\$

ERROR: code indent should never use tabs
#164: FILE: tests/tcg/aarch64/bti-crt.inc.c:69:
+^I.previous");$

total: 10 errors, 1 warnings, 138 lines checked

Patch 4/4 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/20190330005900.17282-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