From patchwork Sun May 19 20:37:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 164557 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp4813631ili; Sun, 19 May 2019 14:30:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqyoSMnLe5r90awOMxm1Wzukg6RECJSJWApcpQ7Fgs1dd0DCjX7IjaQv9XiHUo+aHvcYn8NP X-Received: by 2002:a17:907:2084:: with SMTP id pv4mr3493177ejb.116.1558301429151; Sun, 19 May 2019 14:30:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558301429; cv=none; d=google.com; s=arc-20160816; b=tM2w3D3B2Z0edNjYGDyzPAADudAIjTWDic689yHlmPNHO6VesThP3/DeC8IZVzb44F 6lO4EV6YW76NaDmHRkbLWNuq18oeV/fCrhLEvlzN+oqUc3gJbuN3EbQyDawJzezkWjfv O2d31JkfHhVBnffW1tYW1LdDcgCRSS01fhzxHvVCSWS/VhoW1z7/tb+0d3Mlq9XVMgDd CM2F5KUOscKeSUefnkdqqISeV3jjSqJhzmEP82f7IIdiJ/GKIVdIXQsHPdLxKnQgUY7u VGpDjSRgYjNt1M/a1V1g4mfDbFQlcZ0QkE0RHmeWds3JJYnf7NFokB55Wbb8xc0NvFMV SUDg== 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:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=nKLZCrlKSTO+R1LDAJ7MTC0/n6ttp1lefRgjBzvM1II=; b=PsUG4n9S3Y7UHlMXOwEV/nvlMzqYzpDBu8pVKUbS7rNk4rvCMvOKXukxo2sZlOH5jt 1czhUskDczoX+Y70+oY/JfSHF9nXVC3Qa+S89wC+h3pAnIFhuAJzjGVZNrVZLO8EDOO5 a9K4yLHaznS9W7Z89kuRM6RN8IUzu0skrLwG4jn88NxOQABTfvTFEgwT1b+PxMZuBw2e wXU94jr7cO8MsfsBPGGUqNojumudaTCzIMMGOTwJlyYTqcEEk5HG8Rg/hb5xE0/yH3X9 4+vmTCqb3fZ8gro7To9CZnaakN2tPwplvuAtYVIVTeqPiis9snZ9kwc0Qr8nbW7jALus wjEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=brmejX2y; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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. [209.51.188.17]) by mx.google.com with ESMTPS id z58si424000edd.244.2019.05.19.14.30.28 for (version=TLS1 cipher=AES128-SHA bits=128/128); Sun, 19 May 2019 14:30:29 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=brmejX2y; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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 ([127.0.0.1]:53923 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hSTO0-0007JS-2D for patch@linaro.org; Sun, 19 May 2019 17:30:28 -0400 Received: from eggs.gnu.org ([209.51.188.92]:51083) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hSSa1-0003xz-QC for qemu-devel@nongnu.org; Sun, 19 May 2019 16:38:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hSSa0-0004ub-Lo for qemu-devel@nongnu.org; Sun, 19 May 2019 16:38:49 -0400 Received: from mail-pl1-x642.google.com ([2607:f8b0:4864:20::642]:34651) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hSSa0-0004to-EG for qemu-devel@nongnu.org; Sun, 19 May 2019 16:38:48 -0400 Received: by mail-pl1-x642.google.com with SMTP id w7so5728149plz.1 for ; Sun, 19 May 2019 13:38:48 -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:in-reply-to:references; bh=nKLZCrlKSTO+R1LDAJ7MTC0/n6ttp1lefRgjBzvM1II=; b=brmejX2yIcPNjbKuVHCqV8AiCa1JJMdtPGr20MMLPBmCbCH8F8nnPJLHfbogkaawYS 5MWYoLGmRdwxv176WTA+TIj0WRt7ds8eDGCjowF36zkM3oTIhPG3UX5RHX75QmX9g0Bj 6M/v8WVOfulZJHBQ3O4Ni3A/c7faz1hQuBBJxe2CWZqUR2RsUGvTiCdCspP44hAuJPXJ UuiP0ArLKSf57V3ghQKN5nnGFHdcqtHuVz9I/3+VSeeim6MKiAFQ18nIZ2o7OMaOS9mW KH5iNAtVlaiVKV5Pa3XDzdIVwYIYTC1HGLWmt8otn3ZeyoyLyHeAYmcBNRWQXUdkuWkD Rl4A== 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:in-reply-to :references; bh=nKLZCrlKSTO+R1LDAJ7MTC0/n6ttp1lefRgjBzvM1II=; b=VYF5SPZW3eA+olqHHN5qPYjtbo0NHq4eNBh5e7U3Wx+dkXB9x+1kusPmsALi1Gh5zi LFVjGi9bpn1wXCfAi381Mx+O5MPywFtD7jYHSjXbh6K6hH1ItkmQ4OHHF3gohT2X4YwQ QwloM/C50HRC7OiWoonVnMP4+tTgtmVOR1OiVfskmBjhAptsfPAkt3ZQH67uA/j6u9PJ FB55phQ+uQS+jkkjTJkSjOwLq4aLnB59YXF6Sbrg3cQCUxEY3OopYdMLey44X0bNbg7I ixXXf37Dzry4Ph8GIoQLqKGxYryM+SC1LufJMzCHsze03HIlqK2KUMqCiCoJ2vY9z0o2 ByjA== X-Gm-Message-State: APjAAAW70IJ/xRNSiC+Zp2zcY6Y+afgs/cupL6GVyuoGBKyu+ZYIO1u3 Lz8ykUumjDzUShHqOSBRafWToesiFNg= X-Received: by 2002:a17:902:6b8b:: with SMTP id p11mr70527578plk.225.1558298327154; Sun, 19 May 2019 13:38:47 -0700 (PDT) Received: from localhost.localdomain (97-113-13-231.tukw.qwest.net. [97.113.13.231]) by smtp.gmail.com with ESMTPSA id i7sm11397448pfo.19.2019.05.19.13.38.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 19 May 2019 13:38:46 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Sun, 19 May 2019 13:37:15 -0700 Message-Id: <20190519203726.20729-64-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190519203726.20729-1-richard.henderson@linaro.org> References: <20190519203726.20729-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::642 Subject: [Qemu-devel] [PATCH v7 63/74] linux-user: Split out sigreturn, rt_sigreturn 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" Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h | 4 ++++ linux-user/syscall-sig.inc.c | 18 ++++++++++++++++++ linux-user/syscall.c | 12 ------------ linux-user/strace.list | 6 ------ 4 files changed, 22 insertions(+), 18 deletions(-) -- 2.17.1 diff --git a/linux-user/syscall-defs.h b/linux-user/syscall-defs.h index 11851535e1..77d750f66f 100644 --- a/linux-user/syscall-defs.h +++ b/linux-user/syscall-defs.h @@ -197,6 +197,7 @@ SYSCALL_DEF(rt_sigaction, ARG_SIGNAL, ARG_PTR, ARG_PTR, ARG_DEC); SYSCALL_DEF(rt_sigpending, ARG_PTR, ARG_DEC); SYSCALL_DEF(rt_sigprocmask, ARG_SIGPROCMASKHOW, ARG_PTR, ARG_PTR, ARG_DEC); SYSCALL_DEF(rt_sigqueueinfo, ARG_DEC, ARG_SIGNAL, ARG_PTR); +SYSCALL_DEF(rt_sigreturn); SYSCALL_DEF(rt_sigsuspend, ARG_PTR, ARG_DEC); SYSCALL_DEF(rt_sigtimedwait, ARG_PTR, ARG_PTR, ARG_PTR, ARG_DEC); SYSCALL_DEF(rt_tgsigqueueinfo, ARG_DEC, ARG_DEC, ARG_SIGNAL, ARG_PTR); @@ -236,6 +237,9 @@ SYSCALL_DEF(sigprocmask, ARG_SIGPROCMASKHOW, ARG_HEX); #elif defined(TARGET_NR_sigprocmask) SYSCALL_DEF(sigprocmask, ARG_SIGPROCMASKHOW, ARG_PTR, ARG_PTR); #endif +#ifdef TARGET_NR_sigreturn +SYSCALL_DEF(sigreturn); +#endif #if defined(TARGET_ALPHA) SYSCALL_DEF(sigsuspend, ARG_HEX); #elif defined(TARGET_NR_sigsuspend) diff --git a/linux-user/syscall-sig.inc.c b/linux-user/syscall-sig.inc.c index 774346838b..d5c0ccdcc3 100644 --- a/linux-user/syscall-sig.inc.c +++ b/linux-user/syscall-sig.inc.c @@ -206,6 +206,14 @@ SYSCALL_IMPL(rt_sigqueueinfo) return get_errno(sys_rt_sigqueueinfo(arg1, arg2, &uinfo)); } +SYSCALL_IMPL(rt_sigreturn) +{ + if (block_signals()) { + return -TARGET_ERESTARTSYS; + } + return do_rt_sigreturn(cpu_env); +} + SYSCALL_IMPL(rt_sigsuspend) { CPUState *cpu = ENV_GET_CPU(cpu_env); @@ -471,6 +479,16 @@ SYSCALL_IMPL(sigprocmask) } #endif +#ifdef TARGET_NR_sigreturn +SYSCALL_IMPL(sigreturn) +{ + if (block_signals()) { + return -TARGET_ERESTARTSYS; + } + return do_sigreturn(cpu_env); +} +#endif + #ifdef TARGET_NR_sigsuspend SYSCALL_IMPL(sigsuspend) { diff --git a/linux-user/syscall.c b/linux-user/syscall.c index e489d12103..b8b18ac1de 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -4240,18 +4240,6 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, void *p; switch(num) { -#ifdef TARGET_NR_sigreturn - case TARGET_NR_sigreturn: - if (block_signals()) { - return -TARGET_ERESTARTSYS; - } - return do_sigreturn(cpu_env); -#endif - case TARGET_NR_rt_sigreturn: - if (block_signals()) { - return -TARGET_ERESTARTSYS; - } - return do_rt_sigreturn(cpu_env); case TARGET_NR_sethostname: if (!(p = lock_user_string(arg1))) return -TARGET_EFAULT; diff --git a/linux-user/strace.list b/linux-user/strace.list index 57445a8d81..b1c2f7851e 100644 --- a/linux-user/strace.list +++ b/linux-user/strace.list @@ -926,9 +926,6 @@ #ifdef TARGET_NR_rmdir { TARGET_NR_rmdir, "rmdir" , NULL, NULL, NULL }, #endif -#ifdef TARGET_NR_rt_sigreturn -{ TARGET_NR_rt_sigreturn, "rt_sigreturn" , NULL, NULL, NULL }, -#endif #ifdef TARGET_NR_sched_getaffinity { TARGET_NR_sched_getaffinity, "sched_getaffinity" , NULL, NULL, NULL }, #endif @@ -1113,9 +1110,6 @@ #ifdef TARGET_NR_signalfd4 { TARGET_NR_signalfd4, "signalfd4" , NULL, NULL, NULL }, #endif -#ifdef TARGET_NR_sigreturn -{ TARGET_NR_sigreturn, "sigreturn" , NULL, NULL, NULL }, -#endif #ifdef TARGET_NR_socket { TARGET_NR_socket, "socket" , NULL, print_socket, NULL }, #endif