mbox series

[v3,00/19] linux-user: Split do_syscall

Message ID 20180612005145.3375-1-richard.henderson@linaro.org
Headers show
Series linux-user: Split do_syscall | expand

Message

Richard Henderson June 12, 2018, 12:51 a.m. UTC
Version 3 does not attempt the whole thing in one go,
and does attempt to incorporate strace into the reorg.

Thoughts?


r~


Richard Henderson (19):
  linux-user/alpha: Fix epoll syscalls
  linux-user/hppa: Fix typo in mknodat syscall
  linux-user/microblaze: Fix typo in accept4 syscall
  linux-user/sparc64: Add inotify_rm_watch and tee syscalls
  linux-user: Remove DEBUG
  linux-user: Split out do_syscall1
  linux-user: Relax single exit from "break"
  linux-user: Propagate goto efault to return
  linux-user: Propagate goto unimplemented_nowarn to return
  linux-user: Propagate goto unimplemented to default
  linux-user: Propagate goto fail to return
  linux-user: Setup split syscall infrastructure
  linux-user: Split out close, open, openat, read, write
  linux-user: Split out preadv, pwritev, readv, writev
  linux-user: Split out pread64, pwrite64
  linux-user: Split out name_to_handle_at, open_by_handle_at
  linux-user: Split out ipc syscalls
  linux-user: Split out memory syscalls
  linux-user: Split out some process syscalls

 linux-user/alpha/syscall_nr.h      |    6 +-
 linux-user/hppa/syscall_nr.h       |    2 +-
 linux-user/microblaze/syscall_nr.h |    2 +-
 linux-user/sparc64/syscall_nr.h    |    4 +-
 linux-user/syscall.h               |  389 +++
 linux-user/strace.c                |  600 ++---
 linux-user/syscall.c               | 4015 ++++------------------------
 linux-user/syscall_file.c          |  669 +++++
 linux-user/syscall_ipc.c           | 1095 ++++++++
 linux-user/syscall_mem.c           |  190 ++
 linux-user/syscall_proc.c          |  914 +++++++
 linux-user/Makefile.objs           |   17 +-
 linux-user/gen_syscall_list.py     |  160 ++
 linux-user/strace.list             |  264 --
 14 files changed, 4300 insertions(+), 4027 deletions(-)
 create mode 100644 linux-user/syscall.h
 create mode 100644 linux-user/syscall_file.c
 create mode 100644 linux-user/syscall_ipc.c
 create mode 100644 linux-user/syscall_mem.c
 create mode 100644 linux-user/syscall_proc.c
 create mode 100644 linux-user/gen_syscall_list.py

-- 
2.17.1

Comments

no-reply@patchew.org June 12, 2018, 1:19 a.m. UTC | #1
Hi,

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

Type: series
Message-id: 20180612005145.3375-1-richard.henderson@linaro.org
Subject: [Qemu-devel] [PATCH v3 00/19] linux-user: Split do_syscall

=== TEST SCRIPT BEGIN ===
#!/bin/bash

BASE=base
n=1
total=$(git log --oneline $BASE.. | wc -l)
failed=0

git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram

commits="$(git log --format=%H --reverse $BASE..)"
for c in $commits; do
    echo "Checking PATCH $n/$total: $(git log -n 1 --format=%s $c)..."
    if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then
        failed=1
        echo
    fi
    n=$((n+1))
done

exit $failed
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
 * [new tag]               patchew/20180612005145.3375-1-richard.henderson@linaro.org -> patchew/20180612005145.3375-1-richard.henderson@linaro.org
Switched to a new branch 'test'
41150e125a linux-user: Split out some process syscalls
fb226d75f3 linux-user: Split out memory syscalls
a1be98d2de linux-user: Split out ipc syscalls
4ed2df106e linux-user: Split out name_to_handle_at, open_by_handle_at
aa14b5dcfe linux-user: Split out pread64, pwrite64
856ddcb6c5 linux-user: Split out preadv, pwritev, readv, writev
4b6c6ec7c9 linux-user: Split out close, open, openat, read, write
796e07dce5 linux-user: Setup split syscall infrastructure
67e916d5d7 linux-user: Propagate goto fail to return
209fad0642 linux-user: Propagate goto unimplemented to default
df63822df8 linux-user: Propagate goto unimplemented_nowarn to return
6211190a92 linux-user: Propagate goto efault to return
daed129053 linux-user: Relax single exit from "break"
850a3c73a6 linux-user: Split out do_syscall1
1344862476 linux-user: Remove DEBUG
d4c997503b linux-user/sparc64: Add inotify_rm_watch and tee syscalls
57b7c2976f linux-user/microblaze: Fix typo in accept4 syscall
ca160b0d28 linux-user/hppa: Fix typo in mknodat syscall
2fd6a8234f linux-user/alpha: Fix epoll syscalls

=== OUTPUT BEGIN ===
Checking PATCH 1/19: linux-user/alpha: Fix epoll syscalls...
ERROR: code indent should never use tabs
#23: FILE: linux-user/alpha/syscall_nr.h:346:
+#define TARGET_NR_epoll_create^I^I407$

ERROR: code indent should never use tabs
#24: FILE: linux-user/alpha/syscall_nr.h:347:
+#define TARGET_NR_epoll_ctl^I^I408$

ERROR: code indent should never use tabs
#25: FILE: linux-user/alpha/syscall_nr.h:348:
+#define TARGET_NR_epoll_wait^I^I409$

total: 3 errors, 0 warnings, 27 lines checked

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

Checking PATCH 2/19: linux-user/hppa: Fix typo in mknodat syscall...
Checking PATCH 3/19: linux-user/microblaze: Fix typo in accept4 syscall...
ERROR: code indent should never use tabs
#23: FILE: linux-user/microblaze/syscall_nr.h:366:
+#define TARGET_NR_accept4^I^I362 /* new */$

total: 1 errors, 0 warnings, 8 lines checked

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

Checking PATCH 4/19: linux-user/sparc64: Add inotify_rm_watch and tee syscalls...
WARNING: line over 80 characters
#19: FILE: linux-user/sparc64/syscall_nr.h:157:
+#define TARGET_NR_inotify_rm_watch   156 /* Linux specific                              */

total: 0 errors, 1 warnings, 16 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
Checking PATCH 5/19: linux-user: Remove DEBUG...
Checking PATCH 6/19: linux-user: Split out do_syscall1...
Checking PATCH 7/19: linux-user: Relax single exit from "break"...
Checking PATCH 8/19: linux-user: Propagate goto efault to return...
ERROR: do not use assignment in if condition
#257: FILE: linux-user/syscall.c:8465:
+            if (!(p = lock_user_string(arg2))) {

ERROR: do not use assignment in if condition
#269: FILE: linux-user/syscall.c:8483:
+        if (!(p = lock_user_string(arg1))) {

ERROR: do not use assignment in if condition
#280: FILE: linux-user/syscall.c:8492:
+        if (!(p = lock_user_string(arg2))) {

ERROR: do not use assignment in if condition
#328: FILE: linux-user/syscall.c:8631:
+            if (!(p = lock_user_string(arg1))) {

ERROR: suspect code indent for conditional statements (11, 15)
#652: FILE: linux-user/syscall.c:9462:
            if (!p) {
+               return -TARGET_EFAULT;

ERROR: do not use assignment in if condition
#691: FILE: linux-user/syscall.c:9596:
+        if (!(p = lock_user_string(arg1))) {

ERROR: do not use assignment in if condition
#712: FILE: linux-user/syscall.c:9632:
+        if (!(p = lock_user_string(arg1))) {

ERROR: do not use assignment in if condition
#767: FILE: linux-user/syscall.c:9838:
+        if (!(p = lock_user_string(arg1))) {

ERROR: do not use assignment in if condition
#778: FILE: linux-user/syscall.c:9847:
+        if (!(p = lock_user_string(arg1))) {

ERROR: do not use assignment in if condition
#1084: FILE: linux-user/syscall.c:10938:
+        if (!(p = lock_user_string(arg1))) {

ERROR: do not use assignment in if condition
#1096: FILE: linux-user/syscall.c:10949:
+        if (!(p = lock_user_string(arg1))) {

ERROR: do not use assignment in if condition
#1108: FILE: linux-user/syscall.c:10972:
+        if (!(p = lock_user_string(arg2))) {

total: 12 errors, 0 warnings, 1228 lines checked

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

Checking PATCH 9/19: linux-user: Propagate goto unimplemented_nowarn to return...
Checking PATCH 10/19: linux-user: Propagate goto unimplemented to default...
Checking PATCH 11/19: linux-user: Propagate goto fail to return...
Checking PATCH 12/19: linux-user: Setup split syscall infrastructure...
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#32: 
new file mode 100644

total: 0 errors, 1 warnings, 912 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
Checking PATCH 13/19: linux-user: Split out close, open, openat, read, write...
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#657: 
new file mode 100644

total: 0 errors, 1 warnings, 1030 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
Checking PATCH 14/19: linux-user: Split out preadv, pwritev, readv, writev...
Checking PATCH 15/19: linux-user: Split out pread64, pwrite64...
Checking PATCH 16/19: linux-user: Split out name_to_handle_at, open_by_handle_at...
Checking PATCH 17/19: linux-user: Split out ipc syscalls...
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#1260: 
new file mode 100644

WARNING: architecture specific defines should be avoided
#1294: FILE: linux-user/syscall_ipc.c:30:
+#ifdef __NR_msgsnd

total: 0 errors, 2 warnings, 2305 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
Checking PATCH 18/19: linux-user: Split out memory syscalls...
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#362: 
new file mode 100644

total: 0 errors, 1 warnings, 500 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
Checking PATCH 19/19: linux-user: Split out some process syscalls...
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#1524: 
new file mode 100644

WARNING: architecture specific defines should be avoided
#1564: FILE: linux-user/syscall_proc.c:36:
+#ifdef __NR_setuid32

WARNING: architecture specific defines should be avoided
#1569: FILE: linux-user/syscall_proc.c:41:
+#ifdef __NR_setgid32

WARNING: architecture specific defines should be avoided
#1574: FILE: linux-user/syscall_proc.c:46:
+#ifdef __NR_setresuid32

WARNING: architecture specific defines should be avoided
#1579: FILE: linux-user/syscall_proc.c:51:
+#ifdef __NR_setresgid32

WARNING: architecture specific defines should be avoided
#1590: FILE: linux-user/syscall_proc.c:62:
+#ifndef __NR_gettid

WARNING: architecture specific defines should be avoided
#1595: FILE: linux-user/syscall_proc.c:67:
+#ifndef __NR_set_tid_address

total: 0 errors, 7 warnings, 2351 lines checked

Your patch 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


---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
Laurent Vivier June 12, 2018, 11 a.m. UTC | #2
Le 12/06/2018 à 02:51, Richard Henderson a écrit :
> Version 3 does not attempt the whole thing in one go,

> and does attempt to incorporate strace into the reorg.


I've included your first four patches in my last linux-user pull-request.

Thanks,
Laurent
Peter Maydell June 22, 2018, 10:40 a.m. UTC | #3
On 12 June 2018 at 01:51, Richard Henderson
<richard.henderson@linaro.org> wrote:
> Version 3 does not attempt the whole thing in one go,

> and does attempt to incorporate strace into the reorg.

>

> Thoughts?


This approach works for me. I won't bother to review the
rest of the patchset for the moment, until Laurent weighs
in on whether he likes the structure or not...

thanks
-- PMM