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 32C75C25B08 for ; Wed, 17 Aug 2022 18:29:22 +0000 (UTC) Received: from localhost ([::1]:40962 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oONn7-000274-0j for qemu-devel@archiver.kernel.org; Wed, 17 Aug 2022 14:29:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36122) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oONlL-0001LH-Gp; Wed, 17 Aug 2022 14:27:31 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:10252) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oONlI-00027Z-Um; Wed, 17 Aug 2022 14:27:30 -0400 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 27HHjkHY031869; Wed, 17 Aug 2022 18:27:10 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : subject : from : to : cc : date : in-reply-to : references : content-type : content-transfer-encoding : mime-version; s=pp1; bh=0A0WOZAh4aZR64nVGg9TApWB67zV+zkFbuictYgqOaI=; b=TyUKCSGgjUodD0CiYRvOTn/j6hprScSvsARZ2JVB0RPi4KTPjBxCnL48Nc4QgJZDdubP Q7iv2Oyr02NBXBt/MW2fO+rh+zqW8xuIjIo8yyvHrSLbBJh6s8mVd9IT2WGH6rsu+bfg 3fhrpy9oKtnV7gIsl92h2sXNcGTJ8VGdUCNFgqd7cyv0MK4WBHz2rsD5OmMiMXC0SH8d FET53I9pY2j6fz4Y6huW2vRyLD7iNHuIcMc9PLO6LHIaK7GnpgF4xY6fXCWAUFWdD+g+ RYa7OMrJ1E3qAzgRyI98DLz2CgXzA/ht7l/eEuLCRuagIaB2hB+D31/Ft9VehqPVTJsE 0Q== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3j1511s97r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 17 Aug 2022 18:27:09 +0000 Received: from m0098399.ppops.net (m0098399.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 27HIPa0Q029659; Wed, 17 Aug 2022 18:27:09 GMT Received: from ppma03fra.de.ibm.com (6b.4a.5195.ip4.static.sl-reverse.com [149.81.74.107]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3j1511s96h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 17 Aug 2022 18:27:09 +0000 Received: from pps.filterd (ppma03fra.de.ibm.com [127.0.0.1]) by ppma03fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 27HIM15b029173; Wed, 17 Aug 2022 18:27:06 GMT Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by ppma03fra.de.ibm.com with ESMTP id 3hx3k8umfq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 17 Aug 2022 18:27:06 +0000 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 27HIR3cQ22610318 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 17 Aug 2022 18:27:03 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D4BF011C04A; Wed, 17 Aug 2022 18:27:03 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 43FF611C050; Wed, 17 Aug 2022 18:27:03 +0000 (GMT) Received: from [9.171.21.185] (unknown [9.171.21.185]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 17 Aug 2022 18:27:03 +0000 (GMT) Message-ID: <26d6dfc06f000910e6d88f330aa972aa2b41b87a.camel@linux.ibm.com> Subject: Re: [PATCH v5 0/4] linux-user: Fix siginfo_t contents when jumping to non-readable pages From: Ilya Leoshkevich To: Richard Henderson , Laurent Vivier , Eduardo Habkost , Marcel Apfelbaum , Philippe =?ISO-8859-1?Q?Mathieu-Daud=E9?= , Yanan Wang , Paolo Bonzini , David Hildenbrand , Peter Maydell Cc: qemu-devel@nongnu.org, qemu-s390x@nongnu.org, Christian Borntraeger Date: Wed, 17 Aug 2022 20:27:02 +0200 In-Reply-To: References: <20220817150506.592862-1-iii@linux.ibm.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.4 (3.42.4-2.fc35) X-TM-AS-GCONF: 00 X-Proofpoint-GUID: nVPRMRMZ9dSiDIY2QRbJPSgPDTphj1pB X-Proofpoint-ORIG-GUID: jFk7ttbGZv8iQgCb4xaQ2ZHl1kmFJ0h1 Content-Transfer-Encoding: 8bit X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.883,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-08-17_11,2022-08-16_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 spamscore=0 clxscore=1015 suspectscore=0 lowpriorityscore=0 malwarescore=0 priorityscore=1501 impostorscore=0 mlxscore=0 phishscore=0 bulkscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2207270000 definitions=main-2208170067 Received-SPF: pass client-ip=148.163.156.1; envelope-from=iii@linux.ibm.com; helo=mx0a-001b2d01.pphosted.com X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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" On Wed, 2022-08-17 at 11:23 -0500, Richard Henderson wrote: > On 8/17/22 10:05, Ilya Leoshkevich wrote: > > Hi, > > > > I noticed that when we get a SEGV due to jumping to non-readable > > memory, sometimes si_addr and program counter in siginfo_t are > > slightly > > off. I tracked this down to the assumption that translators stop > > before > > the end of a page, while in reality they may stop right after it. > > > > Patch 1 fixes an invalidation issue, which may prevent SEGV from > > happening altogether. > > Patches 2-3 fix the main issue on x86_64 and s390x. Many other > > architectures have fixed-size instructions and are not affected. > > Patch 4 adds tests. > > > > Note: this series depends on [1]. > > Hah.  I was just thinking that I should queue your patch set to tcg- > next-7.2, and then > rebase my stuff off of that.  It would ensure that I have your test > cases in tree so that > I don't keep regressing them on you.  :-) > > I'll cherry pick the one patch you're depending on. > > > r~ I just checked and cherry-picking [1] and [2] before this series should be enough. [1] https://lists.gnu.org/archive/html/qemu-devel/2022-08/msg02462.html [2] https://lists.gnu.org/archive/html/qemu-devel/2022-08/msg02461.html