From nobody Mon Feb 9 18:48:17 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; dkim=fail spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1496236382620863.1274690854711; Wed, 31 May 2017 06:13:02 -0700 (PDT) Received: from localhost ([::1]:59341 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dG3Qq-0002SS-0E for importer@patchew.org; Wed, 31 May 2017 09:13:00 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36802) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dG3Mk-0007Zy-S0 for qemu-devel@nongnu.org; Wed, 31 May 2017 09:08:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dG3Mj-0003ex-PS for qemu-devel@nongnu.org; Wed, 31 May 2017 09:08:46 -0400 Received: from mail-lf0-x230.google.com ([2a00:1450:4010:c07::230]:34477) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dG3Mj-0003ee-IZ for qemu-devel@nongnu.org; Wed, 31 May 2017 09:08:45 -0400 Received: by mail-lf0-x230.google.com with SMTP id 99so8621455lfu.1 for ; Wed, 31 May 2017 06:08:45 -0700 (PDT) Received: from localhost.localdomain (91-157-170-157.elisa-laajakaista.fi. [91.157.170.157]) by smtp.gmail.com with ESMTPSA id o101sm3741766lfg.3.2017.05.31.06.08.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 31 May 2017 06:08:43 -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 :mime-version:content-transfer-encoding; bh=VG4eZNogBzxWH3wtW9iYiZOiLLqqSsAUGrFh7oRbYWY=; b=HIZSg1YGdt5FguNo102SDpzJezuVdKbUFbLxaAjvLZBn9MGFhTxb4WWtZY5axM7wDb 97CUL21/knpKT8+MNnmgjN4bercHzSURIOvuN8clllherOiraeTututW8mtGp2etDxF4 rAUvXJMInV6RznuhGeKdy9DBltqNnE/rrntHw= 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:mime-version:content-transfer-encoding; bh=VG4eZNogBzxWH3wtW9iYiZOiLLqqSsAUGrFh7oRbYWY=; b=muWtUTjI6gaxdefIbou9nm1cJn3JwGkfoAgmut0mg5296vF1NovDIO1OJ0UARel0e4 Iz/DMhW9lakkubxoH44k1O/EVmxNe9Nd+/EZ+y/IPI7RhMew6RS8ffVoOF0KvpHrr2Kz hU9Eqy6tKY6ZkWNC6aWnpN55+vG2Dea8Ovvjzkm4wIeylbXsZLIevRwJZLFMaSSf7XvE /npczWJCWrlvBwAgwe/00jqcdfYInoW7FWGSELCv457szfZVjp1EDJGFq0Dhen/1hnJc x/SP7V6OZbD31FEkdkUCE5bXgxfI4JPeLH1HmAUbrJZO9JT3ZvMezIYQZhOqMEAs+lTY pYmA== X-Gm-Message-State: AODbwcBu+bwRTk++1zNOhx0bkayNTMoozcRYXN0Hz84MZrhJuoh1iG2X G22C08G7ILl9sbetpDUz8A== X-Received: by 10.25.79.3 with SMTP id d3mr7431103lfb.179.1496236124130; Wed, 31 May 2017 06:08:44 -0700 (PDT) From: riku.voipio@linaro.org To: qemu-devel@nongnu.org Date: Wed, 31 May 2017 16:08:21 +0300 Message-Id: X-Mailer: git-send-email 2.11.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4010:c07::230 Subject: [Qemu-devel] [PULL 09/15] linux-user: fix ssetmask() system call 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@linaro.org, =?UTF-8?q?Milo=C5=A1=20Stojanovi=C4=87?= , stefanha@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 From: Milo=C5=A1 Stojanovi=C4=87 Fix the ssetmask() system call by removing the invocation of sigorset(). The ssetmask() system call should replace the old signal mask with the new and return the old mask. It shouldn't combine the old and the new mask with sigorset(). Fetching the old mask for sigorset() is also no longer needed. The problem was detected after running LTP test group syscalls for the MIPS EL 32 R2 architecture where the test ssetmask01 failed with exit code 1. The test passes now that the ssetmask() system call is fixed. Signed-off-by: Milo=C5=A1 Stojanovi=C4=87 Signed-off-by: Riku Voipio --- linux-user/syscall.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 909dde6de6..93bc6f679e 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -8621,17 +8621,9 @@ abi_long do_syscall(void *cpu_env, int num, abi_long= arg1, #ifdef TARGET_NR_ssetmask /* not on alpha */ case TARGET_NR_ssetmask: { - sigset_t set, oset, cur_set; + sigset_t set, oset; abi_ulong target_set =3D arg1; - /* We only have one word of the new mask so we must read - * the rest of it with do_sigprocmask() and OR in this word. - * We are guaranteed that a do_sigprocmask() that only queries - * the signal mask will not fail. - */ - ret =3D do_sigprocmask(0, NULL, &cur_set); - assert(!ret); target_to_host_old_sigset(&set, &target_set); - sigorset(&set, &set, &cur_set); ret =3D do_sigprocmask(SIG_SETMASK, &set, &oset); if (!ret) { host_to_target_old_sigset(&target_set, &oset); --=20 2.11.0