From patchwork Wed Jun 8 13:30:15 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Riku Voipio X-Patchwork-Id: 69664 Delivered-To: patch@linaro.org Received: by 10.140.106.246 with SMTP id e109csp2524337qgf; Wed, 8 Jun 2016 07:24:16 -0700 (PDT) X-Received: by 10.140.96.199 with SMTP id k65mr2825964qge.27.1465395856714; Wed, 08 Jun 2016 07:24:16 -0700 (PDT) Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id v72si807057qge.23.2016.06.08.07.24.16 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 08 Jun 2016 07:24:16 -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; 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 dis=NONE) header.from=linaro.org Received: from localhost ([::1]:57307 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bAeP2-0003DK-7t for patch@linaro.org; Wed, 08 Jun 2016 10:24:16 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37271) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bAdZl-0004cc-AX for qemu-devel@nongnu.org; Wed, 08 Jun 2016 09:31:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bAdZf-0005rY-Tl for qemu-devel@nongnu.org; Wed, 08 Jun 2016 09:31:17 -0400 Received: from mail-lf0-x22d.google.com ([2a00:1450:4010:c07::22d]:33763) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bAdZf-0005rF-CB for qemu-devel@nongnu.org; Wed, 08 Jun 2016 09:31:11 -0400 Received: by mail-lf0-x22d.google.com with SMTP id s64so5909413lfe.0 for ; Wed, 08 Jun 2016 06:31:11 -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=DJ/b4JucUJCDbqTA1a30Jbnhcv5AnHGgo9getw26XoM=; b=ZjYJOyMgLPs/QX5E719FfDjK+1lafrezZU0XZgpC8iWUr7lWi9QkLFplp+GQuYtITe tXu3IQugFNx9lOwVWyFBB8X2Dt8sZuQzGxZo/62xsRt3yNjgLUwdA5H7p8Tc9yGz3qgl UF+mXqz+D55PJQFn9+gW2uJj0bsNj3WXfPU10= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=DJ/b4JucUJCDbqTA1a30Jbnhcv5AnHGgo9getw26XoM=; b=O81awIbx49QemJUSaWbnxeNdU186QmAPsXOo4YJBxGw3eGCKh3VUub5QQTqaBrLFUO 2vEplJPHDzv92/2s9hqN84p0W1LmzlqF4N7P+UIHdVjSnbai1XyB0f4/p0/inuya+gW9 ZZHHGqI2qVSfjokU68hDA7RuhbT3F3Mg07TmFCpJ0p719ZDY/lI20NRj8GHVP2IHZN+l RwjcRaP+gkWCW7s76ZtdV+W8WUoFA/Vo7vCysancXJlzk45IK41UrUjlE/N6G3CP6hZ7 rqz2qFYJdD06zOhYktitQbIixW3D7OvBJg3OHDaCGkk6K5r7K+NZKXex/fIurMcSClbs e2zw== X-Gm-Message-State: ALyK8tLaUU7ojXDsUW73438JezykOe3FCIAn0QCvjU9qq/X6M6VHhk7kusGeZEXmHGFETJmB X-Received: by 10.25.157.213 with SMTP id g204mr5276525lfe.216.1465392667850; Wed, 08 Jun 2016 06:31:07 -0700 (PDT) Received: from beaming.home (91-157-170-157.elisa-laajakaista.fi. [91.157.170.157]) by smtp.gmail.com with ESMTPSA id 2sm139854lja.37.2016.06.08.06.31.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 08 Jun 2016 06:31:07 -0700 (PDT) From: riku.voipio@linaro.org To: qemu-devel@nongnu.org Date: Wed, 8 Jun 2016 16:30:15 +0300 Message-Id: X-Mailer: git-send-email 2.1.4 In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:4010:c07::22d Subject: [Qemu-devel] [PULL 34/44] linux-user: Use safe_syscall wrapper for rt_sigtimedwait 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: Peter Maydell Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Peter Maydell Use the safe_syscall wrapper for the rt_sigtimedwait syscall. Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/syscall.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) -- 2.1.4 diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 7d88009..cecd96c 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -723,6 +723,8 @@ safe_syscall6(ssize_t, recvfrom, int, fd, void *, buf, size_t, len, safe_syscall3(ssize_t, sendmsg, int, fd, const struct msghdr *, msg, int, flags) safe_syscall3(ssize_t, recvmsg, int, fd, struct msghdr *, msg, int, flags) safe_syscall2(int, flock, int, fd, int, operation) +safe_syscall4(int, rt_sigtimedwait, const sigset_t *, these, siginfo_t *, uinfo, + const struct timespec *, uts, size_t, sigsetsize) #ifdef __NR_msgsnd safe_syscall4(int, msgsnd, int, msgid, const void *, msgp, size_t, sz, int, flags) @@ -7751,7 +7753,8 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, } else { puts = NULL; } - ret = get_errno(sigtimedwait(&set, &uinfo, puts)); + ret = get_errno(safe_rt_sigtimedwait(&set, &uinfo, puts, + SIGSET_T_SIZE)); if (!is_error(ret)) { if (arg2) { p = lock_user(VERIFY_WRITE, arg2, sizeof(target_siginfo_t),