mbox series

[v6,0/4] linux-user: generate syscall_nr.sh for RISC-V

Message ID cover.1583518447.git.alistair.francis@wdc.com (mailing list archive)
Headers show
Series linux-user: generate syscall_nr.sh for RISC-V | expand

Message

Alistair Francis March 6, 2020, 6:24 p.m. UTC
This series updates the RISC-V syscall_nr.sh based on the 5.5 kernel.

There are two parts to this. One is just adding the new syscalls, the
other part is updating the RV32 syscalls to match the fact that RV32 is
a 64-bit time_t architectures (y2038) safe.

We need to make some changes to syscall.c to avoid warnings/errors
during compliling with the new syscall.

I did some RV32 user space testing after applying these patches. I ran the
glibc testsuite in userspace and I don't see any regressions.

v6:
 - Split out futex patch and make it more robust
v5:
 - Addres comments raised on v4
   - Don't require 64-bit host for * _time64 functions

Alistair Francis (4):
  linux-user: Protect more syscalls
  linux-user/syscall: Add support for clock_gettime64/clock_settime64
  linux-user: Support futex_time64
  linux-user/riscv: Update the syscall_nr's to the 5.5 kernel

 linux-user/riscv/syscall32_nr.h | 295 +++++++++++++++++++++++++++++++
 linux-user/riscv/syscall64_nr.h | 301 ++++++++++++++++++++++++++++++++
 linux-user/riscv/syscall_nr.h   | 294 +------------------------------
 linux-user/strace.c             |   2 +
 linux-user/syscall.c            | 199 +++++++++++++++++++--
 5 files changed, 783 insertions(+), 308 deletions(-)
 create mode 100644 linux-user/riscv/syscall32_nr.h
 create mode 100644 linux-user/riscv/syscall64_nr.h

Comments

no-reply@patchew.org March 6, 2020, 9:35 p.m. UTC | #1
Patchew URL: https://patchew.org/QEMU/cover.1583518447.git.alistair.francis@wdc.com/



Hi,

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

Subject: [PATCH v6 0/4]  linux-user: generate syscall_nr.sh for RISC-V
Message-id: cover.1583518447.git.alistair.francis@wdc.com
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 ===

From https://github.com/patchew-project/qemu
 - [tag update]      patchew/cover.1583518447.git.alistair.francis@wdc.com -> patchew/cover.1583518447.git.alistair.francis@wdc.com
Switched to a new branch 'test'
6c8b2a5 linux-user/riscv: Update the syscall_nr's to the 5.5 kernel
a8c3505 linux-user: Support futex_time64
5020c23 linux-user/syscall: Add support for clock_gettime64/clock_settime64
2229302 linux-user: Protect more syscalls

=== OUTPUT BEGIN ===
1/4 Checking commit 22293021a06b (linux-user: Protect more syscalls)
2/4 Checking commit 5020c2382b9e (linux-user/syscall: Add support for clock_gettime64/clock_settime64)
3/4 Checking commit a8c3505c6ff4 (linux-user: Support futex_time64)
WARNING: architecture specific defines should be avoided
#23: FILE: linux-user/syscall.c:248:
+#if defined(__NR_futex)

WARNING: architecture specific defines should be avoided
#26: FILE: linux-user/syscall.c:251:
+#if defined(__NR_futex_time64)

WARNING: architecture specific defines should be avoided
#42: FILE: linux-user/syscall.c:308:
+#if defined(TARGET_NR_futex_time64) && defined(__NR_futex_time64)

ERROR: space required after that ',' (ctx:VxV)
#43: FILE: linux-user/syscall.c:309:
+_syscall6(int,sys_futex_time64,int *,uaddr,int,op,int,val,
              ^

ERROR: space required after that ',' (ctx:VxV)
#43: FILE: linux-user/syscall.c:309:
+_syscall6(int,sys_futex_time64,int *,uaddr,int,op,int,val,
                               ^

ERROR: space required after that ',' (ctx:OxV)
#43: FILE: linux-user/syscall.c:309:
+_syscall6(int,sys_futex_time64,int *,uaddr,int,op,int,val,
                                     ^

ERROR: space required after that ',' (ctx:VxV)
#43: FILE: linux-user/syscall.c:309:
+_syscall6(int,sys_futex_time64,int *,uaddr,int,op,int,val,
                                           ^

ERROR: space required after that ',' (ctx:VxV)
#43: FILE: linux-user/syscall.c:309:
+_syscall6(int,sys_futex_time64,int *,uaddr,int,op,int,val,
                                               ^

ERROR: space required after that ',' (ctx:VxV)
#43: FILE: linux-user/syscall.c:309:
+_syscall6(int,sys_futex_time64,int *,uaddr,int,op,int,val,
                                                  ^

ERROR: space required after that ',' (ctx:VxV)
#43: FILE: linux-user/syscall.c:309:
+_syscall6(int,sys_futex_time64,int *,uaddr,int,op,int,val,
                                                      ^

ERROR: space required after that ',' (ctx:OxV)
#44: FILE: linux-user/syscall.c:310:
+          const struct timespec *,timeout,int *,uaddr2,int,val3)
                                  ^

ERROR: space required after that ',' (ctx:VxV)
#44: FILE: linux-user/syscall.c:310:
+          const struct timespec *,timeout,int *,uaddr2,int,val3)
                                          ^

ERROR: space required after that ',' (ctx:OxV)
#44: FILE: linux-user/syscall.c:310:
+          const struct timespec *,timeout,int *,uaddr2,int,val3)
                                                ^

ERROR: space required after that ',' (ctx:VxV)
#44: FILE: linux-user/syscall.c:310:
+          const struct timespec *,timeout,int *,uaddr2,int,val3)
                                                       ^

ERROR: space required after that ',' (ctx:VxV)
#44: FILE: linux-user/syscall.c:310:
+          const struct timespec *,timeout,int *,uaddr2,int,val3)
                                                           ^

WARNING: architecture specific defines should be avoided
#54: FILE: linux-user/syscall.c:775:
+#if defined(__NR_futex)

WARNING: architecture specific defines should be avoided
#58: FILE: linux-user/syscall.c:779:
+#if defined(__NR_futex_time64)

ERROR: space required after that ',' (ctx:VxV)
#59: FILE: linux-user/syscall.c:780:
+safe_syscall6(int,futex_time64,int *,uaddr,int,op,int,val, \
                  ^

ERROR: space required after that ',' (ctx:VxV)
#59: FILE: linux-user/syscall.c:780:
+safe_syscall6(int,futex_time64,int *,uaddr,int,op,int,val, \
                               ^

ERROR: space required after that ',' (ctx:OxV)
#59: FILE: linux-user/syscall.c:780:
+safe_syscall6(int,futex_time64,int *,uaddr,int,op,int,val, \
                                     ^

ERROR: space required after that ',' (ctx:VxV)
#59: FILE: linux-user/syscall.c:780:
+safe_syscall6(int,futex_time64,int *,uaddr,int,op,int,val, \
                                           ^

ERROR: space required after that ',' (ctx:VxV)
#59: FILE: linux-user/syscall.c:780:
+safe_syscall6(int,futex_time64,int *,uaddr,int,op,int,val, \
                                               ^

ERROR: space required after that ',' (ctx:VxV)
#59: FILE: linux-user/syscall.c:780:
+safe_syscall6(int,futex_time64,int *,uaddr,int,op,int,val, \
                                                  ^

ERROR: space required after that ',' (ctx:VxV)
#59: FILE: linux-user/syscall.c:780:
+safe_syscall6(int,futex_time64,int *,uaddr,int,op,int,val, \
                                                      ^

ERROR: space required after that ',' (ctx:OxV)
#60: FILE: linux-user/syscall.c:781:
+              const struct timespec *,timeout,int *,uaddr2,int,val3)
                                      ^

ERROR: space required after that ',' (ctx:VxV)
#60: FILE: linux-user/syscall.c:781:
+              const struct timespec *,timeout,int *,uaddr2,int,val3)
                                              ^

ERROR: space required after that ',' (ctx:OxV)
#60: FILE: linux-user/syscall.c:781:
+              const struct timespec *,timeout,int *,uaddr2,int,val3)
                                                    ^

ERROR: space required after that ',' (ctx:VxV)
#60: FILE: linux-user/syscall.c:781:
+              const struct timespec *,timeout,int *,uaddr2,int,val3)
                                                           ^

ERROR: space required after that ',' (ctx:VxV)
#60: FILE: linux-user/syscall.c:781:
+              const struct timespec *,timeout,int *,uaddr2,int,val3)
                                                               ^

WARNING: architecture specific defines should be avoided
#93: FILE: linux-user/syscall.c:6932:
+#ifdef __NR_futex_time64

WARNING: architecture specific defines should be avoided
#111: FILE: linux-user/syscall.c:6945:
+#ifdef __NR_futex

WARNING: architecture specific defines should be avoided
#125: FILE: linux-user/syscall.c:6958:
+#ifdef __NR_futex_time64

WARNING: architecture specific defines should be avoided
#128: FILE: linux-user/syscall.c:6961:
+#ifdef __NR_futex

WARNING: architecture specific defines should be avoided
#135: FILE: linux-user/syscall.c:6967:
+#ifdef __NR_futex_time64

WARNING: architecture specific defines should be avoided
#138: FILE: linux-user/syscall.c:6970:
+#ifdef __NR_futex

WARNING: architecture specific defines should be avoided
#150: FILE: linux-user/syscall.c:6983:
+#ifdef __NR_futex_time64

WARNING: architecture specific defines should be avoided
#159: FILE: linux-user/syscall.c:6992:
+#ifdef __NR_futex

total: 24 errors, 13 warnings, 162 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 6c8b2a5ad0ed (linux-user/riscv: Update the syscall_nr's to the 5.5 kernel)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#12: 
new file mode 100644

total: 0 errors, 1 warnings, 898 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/cover.1583518447.git.alistair.francis@wdc.com/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com