From patchwork Thu Oct 17 12:54:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilya Leoshkevich X-Patchwork-Id: 13840053 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5D68ED37492 for ; Thu, 17 Oct 2024 13:42:04 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t1Q5L-0005b2-Mf; Thu, 17 Oct 2024 08:58:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t1Q5J-0005at-Uk for qemu-devel@nongnu.org; Thu, 17 Oct 2024 08:58:33 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t1Q5H-0000Xt-SV for qemu-devel@nongnu.org; Thu, 17 Oct 2024 08:58:33 -0400 Received: from pps.filterd (m0360083.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 49HBo2vh031429; Thu, 17 Oct 2024 12:58:16 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc :content-transfer-encoding:date:from:message-id:mime-version :subject:to; s=pp1; bh=qUckgn+kdS4HeqAXKXE42edXr9oH0iGZOILMB6fA3 IE=; b=O9IVUgx7AA3bS0nV2IjnBNYtzLIhkNPjr8R74wlJMspJFeC+myzaYob+W Qsv0IdJoxEQcGF4M0yQ4ZS21eBksPbjKgeJPtK9O7UcKE8TMaZ4fBcPqDDiCnxTv WmIKK6wBmX3yPDWg49/DwztU1xTRfZ0vFyitxK9yapCpW7zIqxGIoGTg1vkrM4s/ btP4ezocNQmagAd3bHRUy9kCJonomEv4/d5n93OzlGT+n/pc0lyXgrvzSa2+EmZl O/Ro6CS/i01EFvR1EA7E7uBT9pOONOxEqh9CPQxIw5D/kfojF1BwSI01G2T9oz7O tqUnetvRXElBuZeWPuzDt/6mIWF/w== Received: from ppma12.dal12v.mail.ibm.com (dc.9e.1632.ip4.static.sl-reverse.com [50.22.158.220]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 42asbd2sqy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 17 Oct 2024 12:58:16 +0000 (GMT) Received: from pps.filterd (ppma12.dal12v.mail.ibm.com [127.0.0.1]) by ppma12.dal12v.mail.ibm.com (8.18.1.2/8.18.1.2) with ESMTP id 49HBhMii006690; Thu, 17 Oct 2024 12:58:15 GMT Received: from smtprelay07.fra02v.mail.ibm.com ([9.218.2.229]) by ppma12.dal12v.mail.ibm.com (PPS) with ESMTPS id 4283es77gp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 17 Oct 2024 12:58:15 +0000 Received: from smtpav07.fra02v.mail.ibm.com (smtpav07.fra02v.mail.ibm.com [10.20.54.106]) by smtprelay07.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 49HCwEes54395162 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 17 Oct 2024 12:58:14 GMT Received: from smtpav07.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id F1D6220043; Thu, 17 Oct 2024 12:58:13 +0000 (GMT) Received: from smtpav07.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 86F9220040; Thu, 17 Oct 2024 12:58:13 +0000 (GMT) Received: from heavy.ibm.com (unknown [9.171.92.150]) by smtpav07.fra02v.mail.ibm.com (Postfix) with ESMTP; Thu, 17 Oct 2024 12:58:13 +0000 (GMT) From: Ilya Leoshkevich To: Laurent Vivier , =?utf-8?q?Alex_Benn=C3=A9e?= , Richard Henderson Cc: qemu-devel@nongnu.org, Ilya Leoshkevich Subject: [PATCH 0/2] linux-user/ppc: Fix sigmask endianness issue in sigreturn Date: Thu, 17 Oct 2024 14:54:42 +0200 Message-ID: <20241017125811.447961-1-iii@linux.ibm.com> X-Mailer: git-send-email 2.47.0 MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: uQUWsfXY2veUf86XtQhRTpr3vEdsJsdo X-Proofpoint-GUID: uQUWsfXY2veUf86XtQhRTpr3vEdsJsdo X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1051,Hydra:6.0.680,FMLib:17.12.62.30 definitions=2024-10-15_01,2024-10-11_01,2024-09-30_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 suspectscore=0 malwarescore=0 spamscore=0 lowpriorityscore=0 phishscore=0 mlxscore=0 clxscore=1015 adultscore=0 priorityscore=1501 mlxlogscore=778 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2409260000 definitions=main-2410170086 Received-SPF: pass client-ip=148.163.156.1; envelope-from=iii@linux.ibm.com; helo=mx0a-001b2d01.pphosted.com X-Spam_score_int: -26 X-Spam_score: -2.7 X-Spam_bar: -- X-Spam_report: (-2.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Hi, This series fixes an issue where an emulated ppc64le process running on s390x attempting to wake up a sigwait()ing thread would instead terminate itself. Patch 1 is the fix, patch 2 is a testcase extracted from the real-world scenario. Best regards, Ilya Ilya Leoshkevich (2): linux-user/ppc: Fix sigmask endianness issue in sigreturn tests/tcg: Test that sigreturn() does not corrupt the signal mask linux-user/ppc/signal.c | 2 +- tests/tcg/multiarch/sigreturn-sigmask.c | 51 +++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 tests/tcg/multiarch/sigreturn-sigmask.c