From patchwork Sun Jun 10 03:00:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 138078 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp2575195lji; Sat, 9 Jun 2018 20:05:20 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIUKFsMk4dFxh17TgPCAO8p3S9XkYOmXwItD0pV+M7wFS54tBrTcOd0S/Pks3O84eSaelBk X-Received: by 2002:ac8:368:: with SMTP id w40-v6mr11777256qtg.191.1528599920827; Sat, 09 Jun 2018 20:05:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528599920; cv=none; d=google.com; s=arc-20160816; b=ChI2nOb8UClRvsgk5AekoZhV9SaFvwgQYdfVaPqpz72QGiK0ZUwxPg12aqdEb6UW4n cipBzI1iYvZZyAywD86S8ilSNFys5bZkecon8fRNDhJgF0oZH0uK6KuTM0ld6cZcWi8/ 8rkP9X0txlZNAiEefCJbZRPMcHtA0r2SV7amg5VdVtXKsdny59Fog/BaS+poJmLtSsi0 MWnt/iJ3uOgoHimDO42UT06LAIYLzJsOZz2bb1Za6qB8XUAMP+APhXS05w5UxNM1Sn0D 9n07EC9XQB1RSUc9z4Ptq7rYNWZZTtKw1VXF2gdnC+kr3wBqX0g/+eeYGrONgcAGefhN O7SA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:message-id:date:to:from :dkim-signature:arc-authentication-results; bh=6cAN5LeSkxEmcF4bsuZmDVBPwUlJe2LqcjZRaHlAomA=; b=G/iWIwo6oJR9rB4uWiphBwP6j6FV8E0Joe4zPSyY+VYWy04R12I2jbojeQedzTxfxU 7TH9r0r/fLlPn39Ls0bjI8hSxw7Cuh0IMlYjmapjesHQ716mcHgQNLatybfYo6wF+c4I wyLTThsCJw9BSPNSu/oW7FXHX62y2iGAnCBvq2N4AbT6NfHaOTx8L3FqBRxHF5KD2gwA RfP/LxX+1NvZmXvOGwIf+6+6phrcKBAvqoxA6IKBk36Of4aT8CVkcPSbuZ02zkGU3DJC q4I7IpSZGnDHrqWPhy5dLDgYp/Bj2eW0WSZGZPVJJ3e5G1gbX53GTeLrS5UGGxB6UL8t oojg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=efkpVfoy; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id a126-v6si1747875qkf.46.2018.06.09.20.05.20 for (version=TLS1 cipher=AES128-SHA bits=128/128); Sat, 09 Jun 2018 20:05:20 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=efkpVfoy; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:42181 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fRqfQ-000437-7O for patch@linaro.org; Sat, 09 Jun 2018 23:05:20 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40034) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fRqch-0001VH-8w for qemu-devel@nongnu.org; Sat, 09 Jun 2018 23:02:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fRqce-00035M-6T for qemu-devel@nongnu.org; Sat, 09 Jun 2018 23:02:31 -0400 Received: from mail-pf0-x236.google.com ([2607:f8b0:400e:c00::236]:37183) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fRqcd-000358-TV for qemu-devel@nongnu.org; Sat, 09 Jun 2018 23:02:28 -0400 Received: by mail-pf0-x236.google.com with SMTP id y5-v6so7582693pfn.4 for ; Sat, 09 Jun 2018 20:02:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=6cAN5LeSkxEmcF4bsuZmDVBPwUlJe2LqcjZRaHlAomA=; b=efkpVfoy3eHwH59rLc4k8Dp0J1hljq/hqJb+YZX72+eLTRmNwm2aO9R+WFGydfnhd2 QlR51oT499hFi46w1uqKwQkUb2iaiAMBLsu17yfHjWprSzoWhzPflwhrMxMS//mk1Z+q ehlZLaNRJpu/nWD44uOJDYOn7fXMHqm3HQR3k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=6cAN5LeSkxEmcF4bsuZmDVBPwUlJe2LqcjZRaHlAomA=; b=f6qXGhd4Gw9/J8m0vg4AFaX5NpXYEdWIbmpVRr+5BLG9SI4i6M6WgoEyMV8Xus7We9 /bx/i1x4FighjzadbGSwlHwDzRXZI4+S5poN5lGU0ndxAIpMgT1EAGoVwVxTsqvK3Uyf /oZPumEDT63weQMQezXR7pxIRlDBsAbux8PiVc3ObBBZOJOGsYK611kIm6t2y4YR+vUx hxalqaycO/az7U+9o1pjB24TttXBf2BMhiHmEgSBl9KGBwbE9c5Z9sxYf24dtKfCZiUZ /0WDt8GdVELwaQzHTYzsH6I77tHqfQq0YPwWuFmoLSdIZ2CC38AEyKz5Qpjp04GcgYkk vfWA== X-Gm-Message-State: APt69E3Vpz08jP6K4pA5DmsTZvouNFz4Ggfgb8w2iB1hysl5Y3EaieMF U4oJeVaNu2ScTB7cLm/hjakjZedGGok= X-Received: by 2002:a62:3b5d:: with SMTP id i90-v6mr12345755pfa.24.1528599745795; Sat, 09 Jun 2018 20:02:25 -0700 (PDT) Received: from cloudburst.twiddle.net (rrcs-173-198-77-219.west.biz.rr.com. [173.198.77.219]) by smtp.gmail.com with ESMTPSA id y17-v6sm31712718pfe.33.2018.06.09.20.02.23 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 09 Jun 2018 20:02:24 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Sat, 9 Jun 2018 17:00:32 -1000 Message-Id: <20180610030220.3777-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c00::236 Subject: [Qemu-devel] [PATCH v2 000/108] linux-user: Split do_syscall X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: laurent@vivier.eu Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" * Changed the table into a switch, for the reason documented. Use macros to actually enter the syscall into the switch. * Finish the split. * Fix some bugs along the way. I know it's a huge patch set, but I guess it was always going to be in order to finish -- it was a stupidly large function. r~ Richard Henderson (108): 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: 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: 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: Split out rt_sigreturn, sethostname, setrlimit, sigreturn linux-user: Split out getrlimit, getrusage, gettimeofday, settimeofday linux-user: Split out select, pselect6, newselect linux-user: Split out symlink, symlinkat linux-user: Split out readlink, readlinkat linux-user: Split out mmap, mmap2, reboot, swapon linux-user: Split out mprotect, mremap, msync, munmap linux-user: Split out mlock, mlockall, munlock, munlockall linux-user: Split out fchmod, fchmodat, ftruncate, truncate linux-user: Split out fstatfs, fstatfs64, statfs, statfs64 linux-user: Split out getpriority, setpriority linux-user: Split out socketcall linux-user: Split out accept, accept4, bind, connect linux-user: Split out 7 syscalls linux-user: Split out recvmmsg, send, sendmmsg, sendmsg, sendto linux-user: Split out getrandom, shutdown, setsockopt, socket, socketpair linux-user: Fix stub gettid linux-user: Split out getitimer, setitimer, syslog linux-user: Split out fstat, lstat, stat linux-user: Unwrap TARGET_NR_syscall early linux-user: Split out swapoff, sysinfo, vhangup, wait4 linux-user: Split out ipc linux-user: Split out ipc syscalls linux-user: Split out clone, exit_group, fsync linux-user: Split out modify_ldt, setdomainname, uname linux-user: Split out adjtimex, clock_adjtime, vm86 linux-user: Split out fchdir, getpgid, llseek, personality linux-user: Split out getdents, getdents64 linux-user: Split out poll, ppoll linux-user: Split out flock, preadv, pwritev, readv, writev linux-user: Split out fdatasync, getsid, _sysctl linux-user: Split out sched syscalls linux-user: Split out getcpu, nanosleep, prctl linux-user: Split out arch_prctl linux-user: Split out getcwd, pread64, pwrite64, sigaltstack linux-user: Split out capget, capset linux-user: Split out sendfile, sendfile64 linux-user: Split out ftruncate64, truncate64, ugetrlimit, vfork linux-user: Split out fstat64, fstatat64, newfstatat, lstat64, stat64 linux-user: Split out getegid, geteuid, getgid, getuid, lchown linux-user: Split out getgroups, setgroups, setregid, setreuid linux-user: Split out fchown, fchownat, setresgid, setresuid linux-user: Split out chown, getresgid, getresuid linux-user: Split out setfsgid, setfsuid, setgid, setuid linux-user: Split out getuid32, getxgid, getxuid, lchown32 linux-user: Split out osf_getsysinfo, osf_setsysinfo, osf_sigprocmask linux-user: Split out getegid32, geteuid32, getgid32, setregid32, setreuid32 linux-user: Split out fchown32, getgroups32, setgroups32 linux-user: Split out getresgid32, getresuid32, setresgid32, setresuid32 linux-user: Split out chown32, setfsgid32, setfsuid32, setgid32, setuid32 linux-user: Split out mincore linux-user: Split out fadvise64, fadvise64_64 linux-user: Split out cacheflush, fcntl64, getpagesize, madvise linux-user: Split out gettid, readahead linux-user: Split out xattr syscalls linux-user: Split out getdomainname, get_thread_area, set_thread_area linux-user: Split out clock syscalls linux-user: Fix clock_nanosleep linux-user: Split out set_tid_address, tgkill, tkill linux-user: Split out futex, utimensat linux-user: Remove sys_futex linux-user: Split out inotify syscalls linux-user: Split out mq syscalls linux-user: Split out splice, tee, vmsplice linux-user: Split out eventfd, eventfd2 linux-user: Split out fallocate, sync_file_range/2 linux-user: Split out signalfd, signalfd4 linux-user: Split out epoll syscalls linux-user: Split out prlimit64 linux-user: Split out atomic_barrier, gethostname linux-user: Split out atomic_cmpxchg_32 linux-user: Split out timer syscalls linux-user: Split out timerfd syscalls linux-user: Split out ioprio_get, ioprio_set, kcmp linux-user: Split out setns, unshare linux-user: Fold away do_syscall1 linux-user/qemu.h | 2 +- linux-user/syscall.c | 11826 +++++++++++++++++++++++------------------ 2 files changed, 6526 insertions(+), 5302 deletions(-) -- 2.17.1