mbox series

[00/33] linux-user: Begin splitting do_syscall

Message ID 20180601073050.8054-1-richard.henderson@linaro.org
Headers show
Series linux-user: Begin splitting do_syscall | expand

Message

Richard Henderson June 1, 2018, 7:30 a.m. UTC
This function is, as I think everyone will agree, way too large.
This is about a third of the complete change, but I thought I'd
get some feedback on the method and form before I go any farther.


r~


Richard Henderson (33):
  linux-user: Split out do_syscall1
  linux-user: Relax single exit from "break"
  linux-user: Propagate goto ebadf to return
  linux-user: Propagate goto efault to return
  linux-user: Propagate goto unimplemented_nowarn to return
  linux-user: Split out goto unimplemented to do_unimplemented
  linux-user: Propagate goto fail to return
  linux-user: Make syscall number unsigned
  linux-user: Set up infrastructure for table-izing syscalls
  linux-user: Split out brk, close, exit, read, write
  linux-user: Split out execve
  linux-user: Split out open, openat
  linux-user: Split out name_to_handle_at
  linux-user: Split out open_to_handle_at
  linux-user: Split out creat, fork, waitid, waitpid
  linux-user: Split out link, linkat
  linux-user: Split out unlink, unlinkat
  linux-user: Split out chdir, mknod, mknodat, time, chmod
  linux-user: Remove all unimplemented entries
  linux-user: Split out getpid, getxpid, lseek
  linux-user: Split out mount, umount
  linux-user: Split out alarm, pause, stime, utime, utimes
  linux-user: Split out access, faccessat, futimesat, kill, nice, sync,
    syncfs
  linux-user: Split out rename, renameat, renameat2
  linux-user: Split out dup, mkdir, mkdirat, rmdir
  linux-user: Split out acct, pipe, pipe2, times, umount2
  linux-user: Split out ioctl
  linux-user: Split out chroot, dup2, dup3, fcntl, setpgid, umask
  linux-user: Split out getpgrp, getppid, setsid
  linux-user: Split out rt_sigaction, sigaction
  linux-user: Split out rt_sigprocmask, sgetmask, sigprocmask, ssetmask
  linux-user: Split out rt_sigpending, rt_sigsuspend, sigpending,
    sigsuspend
  linux-user: Split out rt_sigqueueinfo, rt_sigtimedwait,
    rt_tgsigqueueinfo

 linux-user/qemu.h    |    2 +-
 linux-user/syscall.c | 4651 ++++++++++++++++++++++--------------------
 2 files changed, 2394 insertions(+), 2259 deletions(-)

-- 
2.17.0

Comments

Richard Henderson June 1, 2018, 7:33 a.m. UTC | #1
On 06/01/2018 12:30 AM, Richard Henderson wrote:
> This function is, as I think everyone will agree, way too large.

> This is about a third of the complete change, but I thought I'd

> get some feedback on the method and form before I go any farther.


Bah.  I also meant to say

Based-on: 20180531224911.23725-1-richard.henderson@linaro.org

that is, the interp_prefix patch set from earlier today.


r~
no-reply@patchew.org June 1, 2018, 8:05 a.m. UTC | #2
Hi,

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

Type: series
Message-id: 20180601073050.8054-1-richard.henderson@linaro.org
Subject: [Qemu-devel] [PATCH 00/33] linux-user: Begin splitting 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/20180601073050.8054-1-richard.henderson@linaro.org -> patchew/20180601073050.8054-1-richard.henderson@linaro.org
Switched to a new branch 'test'
747f98cda4 linux-user: Split out rt_sigqueueinfo, rt_sigtimedwait, rt_tgsigqueueinfo
8c59503fd9 linux-user: Split out rt_sigpending, rt_sigsuspend, sigpending, sigsuspend
3a57cc334f linux-user: Split out rt_sigprocmask, sgetmask, sigprocmask, ssetmask
81bd8e94dd linux-user: Split out rt_sigaction, sigaction
0fc1031ca6 linux-user: Split out getpgrp, getppid, setsid
76b6ab61e4 linux-user: Split out chroot, dup2, dup3, fcntl, setpgid, umask
818843d921 linux-user: Split out ioctl
d3a9fa76f4 linux-user: Split out acct, pipe, pipe2, times, umount2
73775770a5 linux-user: Split out dup, mkdir, mkdirat, rmdir
8d6ff832d7 linux-user: Split out rename, renameat, renameat2
ded97414bf linux-user: Split out access, faccessat, futimesat, kill, nice, sync, syncfs
f2ac2715a0 linux-user: Split out alarm, pause, stime, utime, utimes
fd239f018f linux-user: Split out mount, umount
7f8d08b0df linux-user: Split out getpid, getxpid, lseek
0033fce107 linux-user: Remove all unimplemented entries
1d093d6966 linux-user: Split out chdir, mknod, mknodat, time, chmod
d0bc8c69af linux-user: Split out unlink, unlinkat
ee1804088c linux-user: Split out link, linkat
7da1a7d2ec linux-user: Split out creat, fork, waitid, waitpid
6c9db8aee2 linux-user: Split out open_to_handle_at
8e8c59cd27 linux-user: Split out name_to_handle_at
4ed7c56516 linux-user: Split out open, openat
dbf85fddf7 linux-user: Split out execve
d4654a6ef7 linux-user: Split out brk, close, exit, read, write
404318016d linux-user: Set up infrastructure for table-izing syscalls
a7b3ac0407 linux-user: Make syscall number unsigned
6086f3339b linux-user: Propagate goto fail to return
1969ae08d3 linux-user: Split out goto unimplemented to do_unimplemented
f3213e38ff linux-user: Propagate goto unimplemented_nowarn to return
4e20509f56 linux-user: Propagate goto efault to return
dda83e01f8 linux-user: Propagate goto ebadf to return
fddfe2eb57 linux-user: Relax single exit from "break"
bac309b293 linux-user: Split out do_syscall1

=== OUTPUT BEGIN ===
Checking PATCH 1/33: linux-user: Split out do_syscall1...
Checking PATCH 2/33: linux-user: Relax single exit from "break"...
ERROR: code indent should never use tabs
#1929: FILE: linux-user/syscall.c:11150:
+^Ireturn ret;$

ERROR: code indent should never use tabs
#1938: FILE: linux-user/syscall.c:11159:
+^Ireturn ret;$

ERROR: code indent should never use tabs
#1947: FILE: linux-user/syscall.c:11166:
+^Ireturn target_ftruncate64(cpu_env, arg1, arg2, arg3, arg4);$

ERROR: code indent should never use tabs
#2411: FILE: linux-user/syscall.c:11862:
+^Ireturn ret;$

ERROR: code indent should never use tabs
#2683: FILE: linux-user/syscall.c:12216:
+^Ireturn ret;$

total: 5 errors, 0 warnings, 2853 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 3/33: linux-user: Propagate goto ebadf to return...
Checking PATCH 4/33: linux-user: Propagate goto efault to return...
ERROR: suspect code indent for conditional statements (11, 14)
#642: FILE: linux-user/syscall.c:9553:
            if (!p) {
+              return -TARGET_EFAULT;

total: 1 errors, 0 warnings, 1211 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/33: linux-user: Propagate goto unimplemented_nowarn to return...
Checking PATCH 6/33: linux-user: Split out goto unimplemented to do_unimplemented...
Checking PATCH 7/33: linux-user: Propagate goto fail to return...
Checking PATCH 8/33: linux-user: Make syscall number unsigned...
Checking PATCH 9/33: linux-user: Set up infrastructure for table-izing syscalls...
Checking PATCH 10/33: linux-user: Split out brk, close, exit, read, write...
Checking PATCH 11/33: linux-user: Split out execve...
Checking PATCH 12/33: linux-user: Split out open, openat...
Checking PATCH 13/33: linux-user: Split out name_to_handle_at...
Checking PATCH 14/33: linux-user: Split out open_to_handle_at...
Checking PATCH 15/33: linux-user: Split out creat, fork, waitid, waitpid...
Checking PATCH 16/33: linux-user: Split out link, linkat...
Checking PATCH 17/33: linux-user: Split out unlink, unlinkat...
Checking PATCH 18/33: linux-user: Split out chdir, mknod, mknodat, time, chmod...
Checking PATCH 19/33: linux-user: Remove all unimplemented entries...
Checking PATCH 20/33: linux-user: Split out getpid, getxpid, lseek...
Checking PATCH 21/33: linux-user: Split out mount, umount...
Checking PATCH 22/33: linux-user: Split out alarm, pause, stime, utime, utimes...
Checking PATCH 23/33: linux-user: Split out access, faccessat, futimesat, kill, nice, sync, syncfs...
Checking PATCH 24/33: linux-user: Split out rename, renameat, renameat2...
Checking PATCH 25/33: linux-user: Split out dup, mkdir, mkdirat, rmdir...
Checking PATCH 26/33: linux-user: Split out acct, pipe, pipe2, times, umount2...
Checking PATCH 27/33: linux-user: Split out ioctl...
Checking PATCH 28/33: linux-user: Split out chroot, dup2, dup3, fcntl, setpgid, umask...
Checking PATCH 29/33: linux-user: Split out getpgrp, getppid, setsid...
Checking PATCH 30/33: linux-user: Split out rt_sigaction, sigaction...
ERROR: code indent should never use tabs
#134: FILE: linux-user/syscall.c:8852:
+^Iact._sa_handler = old_act->_sa_handler;$

ERROR: code indent should never use tabs
#135: FILE: linux-user/syscall.c:8853:
+^Itarget_siginitset(&act.sa_mask, old_act->sa_mask.sig[0]);$

ERROR: code indent should never use tabs
#136: FILE: linux-user/syscall.c:8854:
+^Iact.sa_flags = old_act->sa_flags;$

ERROR: code indent should never use tabs
#137: FILE: linux-user/syscall.c:8855:
+^Iunlock_user_struct(old_act, arg2, 0);$

ERROR: code indent should never use tabs
#138: FILE: linux-user/syscall.c:8856:
+^Ipact = &act;$

ERROR: code indent should never use tabs
#145: FILE: linux-user/syscall.c:8863:
+^Iold_act->_sa_handler = oact._sa_handler;$

ERROR: code indent should never use tabs
#146: FILE: linux-user/syscall.c:8864:
+^Iold_act->sa_flags = oact.sa_flags;$

ERROR: code indent should never use tabs
#147: FILE: linux-user/syscall.c:8865:
+^Iold_act->sa_mask.sig[0] = oact.sa_mask.sig[0];$

ERROR: code indent should never use tabs
#148: FILE: linux-user/syscall.c:8866:
+^Iold_act->sa_mask.sig[1] = 0;$

ERROR: code indent should never use tabs
#149: FILE: linux-user/syscall.c:8867:
+^Iold_act->sa_mask.sig[2] = 0;$

ERROR: code indent should never use tabs
#150: FILE: linux-user/syscall.c:8868:
+^Iold_act->sa_mask.sig[3] = 0;$

ERROR: code indent should never use tabs
#151: FILE: linux-user/syscall.c:8869:
+^Iunlock_user_struct(old_act, arg3, 1);$

total: 12 errors, 0 warnings, 351 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 31/33: linux-user: Split out rt_sigprocmask, sgetmask, sigprocmask, ssetmask...
Checking PATCH 32/33: linux-user: Split out rt_sigpending, rt_sigsuspend, sigpending, sigsuspend...
Checking PATCH 33/33: linux-user: Split out rt_sigqueueinfo, rt_sigtimedwait, rt_tgsigqueueinfo...
=== 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