From patchwork Thu Apr 22 18:08:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 425876 Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp594154jao; Thu, 22 Apr 2021 11:10:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxSFHjov5fQxWOoHqX/rnr+Yjaio0sjx/6TMeDJpf6Zey4XnQmAW5+aiwTBf2QyjH3JiQzf X-Received: by 2002:a05:6e02:1a0b:: with SMTP id s11mr3776855ild.105.1619115021781; Thu, 22 Apr 2021 11:10:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619115021; cv=none; d=google.com; s=arc-20160816; b=LZ4+3CUg9pjNCpSD6o3iPD/JoG5jAtd+/79B1FC8mCgVaowA6mVilXbh9ay9sLimBB ZYnokzTsA2/c36aOP4JYtd4EkpzZIQgPCHaTMzEyHKz/nagnRE9eJ3/9nxqT9nmd+asx Mc8HmYLWY0EmMdTbbcq7hcXoldcVF3XgIdbsnpslfuAn0RzbaJhGVjjz1oVeuMtbxDze bI6JpqsjaaFSXLT43u9a+MuL0fIhfhKIQrrAiuobNVmksHKlDSCOrpjnAV1XNu5WnGsc pqNg+ir31SqkHlZufdNw+bg4Kr1VISXKmatP3iZn4DpQ+wUv/B96aG3jpl1J2iX1nW0D VC7Q== 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:content-transfer-encoding :mime-version:message-id:date:subject:to:from:dkim-signature; bh=XC/OyFyZvtaiJYSgxp6MQbeRSdCAzqhE8CCOKzuY9zI=; b=HpX7lEq9WDnOeQbgt77AGKdz5wZYLBXXHSIqZ+6ZpbMRGv17oCcEBoSJBMxkkRmqHB otJ8ga1NnxcLMaa4c9GSsGokO23lhBK2nuLTkQ6apb0iSDxpjfw9Qh9NUXUqeS2b9nYS hS8r2KjQ4e+mVrWQTv1WzNpPfKWG7wmSXPlms4tbbuBcbIKYnc8+VYxme62AqaGv20wJ ohnQK6EkToHJBgI3joih+CDr6D9QEyRA6QQJ9sAVg60ZCuhvp/EjnMeHPKK7CoDV21NZ u9C+9Yy6esoXzPBI/qcd7krecn4xNoyT2xzhjiWxWGD5/NG/RzSZilE5l5wMXM9QDWiu aUcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YQ8WXGTN; 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=pass (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 i9si3711445iog.54.2021.04.22.11.10.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 22 Apr 2021 11:10:21 -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=pass header.i=@linaro.org header.s=google header.b=YQ8WXGTN; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:50596 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lZdmP-0008Mn-9B for patch@linaro.org; Thu, 22 Apr 2021 14:10:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60180) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lZdkW-0008Mb-HM for qemu-devel@nongnu.org; Thu, 22 Apr 2021 14:08:24 -0400 Received: from mail-pl1-x633.google.com ([2607:f8b0:4864:20::633]:45029) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lZdkU-00043m-Aw for qemu-devel@nongnu.org; Thu, 22 Apr 2021 14:08:24 -0400 Received: by mail-pl1-x633.google.com with SMTP id y1so8291493plg.11 for ; Thu, 22 Apr 2021 11:08:21 -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:mime-version :content-transfer-encoding; bh=XC/OyFyZvtaiJYSgxp6MQbeRSdCAzqhE8CCOKzuY9zI=; b=YQ8WXGTNiOmCymbH1zQ+d2C7lI/52eZC74s2pguI37KMnlwVAABTfmbOYnsClCuZMO mY1Shoamf5b2+j6/1ZkI8LIufmTo5ob21r9gzOzCyGRPbgZrDLq9m1ppEOHXPp6z0CgG eUwuWxdhpZb2tumhEqd2dVeeUv7RqF+wjHTR9+edBC887q38dTHU9zQdvykcHlE6db17 EnlNXov/pQKdCuI79lV6Mr+sr20fV42z2CIjiNiJipcgM264IFRFBqKKEp3YOSW5BKw2 tWuUs9UGfovTDpvIFsYqXFZwfcS6rume9VlK+H0UWt1if4sGIenPVqj9ZtBb18gD4jy5 RbbQ== 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:mime-version :content-transfer-encoding; bh=XC/OyFyZvtaiJYSgxp6MQbeRSdCAzqhE8CCOKzuY9zI=; b=LTNXfZhg/dOW+FHoX8clfM591k4DguwpjNfxRi5QCZzTTYNfMxcapVC5jzyxRCZtbt i8guWixuR+aGNlQz3TUDBFvo04nG939qS6TDdCHsbK8/NwwwDpRiFg/iyVOQrGT4V59m Pfu6LrtHL/K0TNsjXon/KcfjGGTwoJjX/fsP5mgMPbhFeOCnXgQWMD5qlp1bVraTNHVw UxDcGZg43M0mErHf5/zWsQx+zwQmclgqs8Q62pc+ztsi+pQXwspRd93owbeSMqSQNIPw ZVQdIpOyqfpu5moWAMyemfMlFoMDIZ+BdrXrMKSIdZTMLEI2czZaUi57xJ4ZJ9r6ydcP 25QA== X-Gm-Message-State: AOAM532x2fgywl77TpMBhK+nLZzv6vKdoYpPFwqj9uZKfEOV5V3CBytn Jn9Ww6VNHyWIU6kgyLcrhVTcVi1w8o4Bcw== X-Received: by 2002:a17:90b:368c:: with SMTP id mj12mr6555pjb.186.1619114900416; Thu, 22 Apr 2021 11:08:20 -0700 (PDT) Received: from localhost.localdomain ([71.212.131.83]) by smtp.gmail.com with ESMTPSA id q6sm2606508pfs.33.2021.04.22.11.08.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Apr 2021 11:08:20 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 0/2] linux-user: sigaction fixes/cleanups Date: Thu, 22 Apr 2021 11:08:17 -0700 Message-Id: <20210422180819.252121-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::633; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x633.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alex.bennee@linaro.org, laurent@vivier.eu Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Alpha had two bugs, one with the non-ka_restorer fallback using the wrong offset, and the other with the ka_restorer value getting lost in do_sigaction. Because do_sigaction didn't see TARGET_ARCH_HAS_SA_RESTORER (which is correct for alpha, as the field isn't present in the structure), we didn't copy the field into our syscall table. Which meant that the extra code present in do_syscall to stash the ka_restorer value was wasted. I believe that Sparc has a similar bug, but this one was worse because it was modifying the user's sigaction struct that was passed in. r~ Richard Henderson (2): linux-user/alpha: Fix rt sigframe return linux-user: Clean up sigaction ka_restorer linux-user/syscall_defs.h | 17 +++----- linux-user/alpha/signal.c | 10 ++--- linux-user/signal.c | 4 +- linux-user/syscall.c | 90 ++++++++++++--------------------------- 4 files changed, 42 insertions(+), 79 deletions(-) -- 2.25.1