From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0D72BC43381 for ; Wed, 13 Mar 2019 11:32:29 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CFF6E2147C for ; Wed, 13 Mar 2019 11:32:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="hr/rN3cR"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="EhLE0/eN"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=armh.onmicrosoft.com header.i=@armh.onmicrosoft.com header.b="k03hwOCz" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CFF6E2147C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-ID:In-Reply-To: References:Message-ID:Date:Subject:To:From:Reply-To:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=PZo50aQgLb+D6UnCnNgSqPkuHgP5VKXqNteGtZCW6ok=; b=hr/rN3cRx87vgs Olj+Cjjdh+3NlWmc5eZvku1bqlXqBIlb1cbjG2XEZUF2Dl3W24jkVRpXF7bdAcgZIHpYpGVLiz6D3 tY8PPGzmaedQq+7eNcU0kdcvYS6lw6dUT3UUDE528h3nxofNEMlej5gv/oZAWF9ce1A4fiGYU3UQP OlUIWCTE5GOM7WS5NrgCvfGFMQOpdqtfUw4gE3OVUYbzIriVE6B0gmu3sQIrPnWM0SK00Tch8g3g/ MCckvnDqL9a01j0T7gldCeWixMtl3A0fk1BDZhVMiwYcMaXV4e6+LtdrYD9C0Zx9rDEQYjDuVzrvG bY4xWb6u7Mgy7dBGVoUg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h427T-0001nh-Ez; Wed, 13 Mar 2019 11:32:23 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h426Y-0008SO-8Q for linux-arm-kernel@bombadil.infradead.org; Wed, 13 Mar 2019 11:31:26 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=MIME-Version:Content-Transfer-Encoding: Content-ID:Content-Type:In-Reply-To:References:Message-ID:Date:Subject:CC:To: From:Sender:Reply-To:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=rHPSJU/XM4yra3LCjA7ISzyT4r4mmuSIFSb51ZqYjfw=; b=EhLE0/eNjQ8Vk54yahs/H/dIDK vmHsfhWKna0qyPMm7N5DCQYo1s5S9vYNBAdrq8u9qS/CyIgj3HBTGZCqAXDCszymr1XIIYUcPz/ce LmsNFgkzWwEi092kDjv6u1iJ4kaG1+Z1zD4qQt77B7uXEYKbhnrguDsAgluHrBnuqxb+ePrGXtloy LOKKFxxtXr6Hu8CJ3HHXQE/dw8NKsQR1DjYwl2j+E24jUW4BxlAlk7j98L7d1GzXTuDQwSVX7j2AY 9LE0NRoKT8nM8uA2YSCPoe6JeW3EnI98tNLF1j5WxP8lXnGo6laiOZ9G3Y6dr3uEMXo9yEYquKyd4 f7ATBbqg==; Received: from mail-eopbgr50051.outbound.protection.outlook.com ([40.107.5.51] helo=EUR03-VE1-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h3sJ9-0000mX-6H for linux-arm-kernel@lists.infradead.org; Wed, 13 Mar 2019 01:03:49 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector1-arm-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=rHPSJU/XM4yra3LCjA7ISzyT4r4mmuSIFSb51ZqYjfw=; b=k03hwOCzCV16jrfU88sbL00LCOKNJkdZkSaNpCm9N1dnHqfmdWCbyJApf103ZS1ASPtVXGZbHs0qwZ5DpzW0+7aqZAvM+zWCWwPFD6kFINFu8YbR+HowYk29hLHoEaPv/58veWGpPhbFFrHNzpoozQIlY21YMFGyp1AuomLZP0E= Received: from AM4PR08MB2929.eurprd08.prod.outlook.com (10.171.190.138) by AM4PR08MB0786.eurprd08.prod.outlook.com (10.164.82.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1686.18; Wed, 13 Mar 2019 01:03:18 +0000 Received: from AM4PR08MB2929.eurprd08.prod.outlook.com ([fe80::e522:c03f:3d0c:f4ce]) by AM4PR08MB2929.eurprd08.prod.outlook.com ([fe80::e522:c03f:3d0c:f4ce%4]) with mapi id 15.20.1686.021; Wed, 13 Mar 2019 01:03:18 +0000 From: "Haibo Xu (Arm Technology China)" To: Sudeep Holla , Andy Lutomirski Subject: Re: [PATCH 3/6] x86: clean up _TIF_SYSCALL_EMU handling using ptrace_syscall_enter hook Thread-Topic: [PATCH 3/6] x86: clean up _TIF_SYSCALL_EMU handling using ptrace_syscall_enter hook Thread-Index: AQHUz5P9ZKULSdDQbEW1h9vbYNE6xaX7KHCAgAAd14CAAQzrgIAKf6aAgAD7mAD//5MRgIAAmEsAgADYE4A= Date: Wed, 13 Mar 2019 01:03:18 +0000 Message-ID: <5750cfac-14a7-8eed-09f4-0d53419bea6b@arm.com> References: <20190228183220.15626-1-sudeep.holla@arm.com> <20190228183220.15626-4-sudeep.holla@arm.com> <20190304101205.GA1504@e107155-lin> <96d59a68-e5e2-86d9-c707-a79aad438b76@arm.com> <20190311183403.GA31062@e107155-lin> <65b00ea1-f784-4fb4-2a98-49fa44d9fa8f@arm.com> <20190312120944.GB13825@e107155-lin> In-Reply-To: <20190312120944.GB13825@e107155-lin> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: HK0PR03CA0037.apcprd03.prod.outlook.com (2603:1096:203:2f::25) To AM4PR08MB2929.eurprd08.prod.outlook.com (2603:10a6:205:c::10) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Haibo.Xu@arm.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [113.29.88.7] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: c83c4c13-ba38-4f2a-42b0-08d6a74fadc0 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(4618075)(2017052603328)(7153060)(7193020); SRVR:AM4PR08MB0786; x-ms-traffictypediagnostic: AM4PR08MB0786: x-microsoft-exchange-diagnostics: 1; AM4PR08MB0786; 20:BdnkpVSfCDkpLkBV+T6J2k0rcndxex7JXa+uwH45ZBNk380ZfiQH1rO9TtxRN8v/ezTB0cjUVdR0/3MAUA/69+PwYs+MShEEu/Mh16pTmu4V+rGxDhlAN5Q2q5siQM08K18CJ05RagcF42XAeXky9j6axLrlraXVVWIS6e0Uhlk= x-microsoft-antispam-prvs: x-forefront-prvs: 09752BC779 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(346002)(366004)(396003)(39860400002)(136003)(376002)(40434004)(199004)(189003)(31696002)(36756003)(72206003)(478600001)(52116002)(3846002)(6116002)(256004)(14454004)(7416002)(86362001)(2616005)(55236004)(68736007)(11346002)(8936002)(106356001)(53936002)(93886005)(6512007)(81166006)(105586002)(446003)(2906002)(8676002)(110136005)(6436002)(6486002)(486006)(5660300002)(102836004)(31686004)(66066001)(14444005)(54906003)(229853002)(5024004)(25786009)(26005)(53546011)(6506007)(386003)(186003)(305945005)(7736002)(76176011)(97736004)(99286004)(316002)(476003)(6246003)(71190400001)(71200400001)(4326008)(81156014); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR08MB0786; H:AM4PR08MB2929.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: k7CsVhxf5HY7vdzqIrg41lC1rUfVJhf92HGfQKD5HcKnTy2yc4SQlqetE+3D7DweBede0vFABBUSFDbL8/+jzZVz4d3GUW1A6Cbm1xgEVMPpkh4DsGh51HLFVGzmG2os46WzYWEk2R5epzGbpH5yLtIVJQ7t5w6jQMb6+hKnQGAwleZgDccFuZI6pHxv7OK7Bdlnda5PdHrxfp4wivQlnRT92ezcXhmjkmBXhy9U7DOwPuqkbtNw/EPKwXXRJodETQgKL41/0BE3yQXWIJOqwhq9cSq9rnnqyuclYMm7kY3Hh71bP36JEX7LCxeniTvdbLTkioFgVbooYqy5RH3pQD1f6WbfO4AtpFMf5tuJj2oT7vqD43lhEV7jXJtQmI9URG43k2GqrUeSGHnsGdB8K/8M0kKFg1+NlqtaoTF62lo= Content-ID: MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-Network-Message-Id: c83c4c13-ba38-4f2a-42b0-08d6a74fadc0 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Mar 2019 01:03:18.1409 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR08MB0786 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190312_210347_263185_F850E517 X-CRM114-Status: GOOD ( 16.77 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Steve Capper , Catalin Marinas , "jdike@addtoit.com" , "x86@kernel.org" , Will Deacon , "linux-kernel@vger.kernel.org" , Oleg Nesterov , Richard Weinberger , Ingo Molnar , Paul Mackerras , Michael Ellerman , Borislav Petkov , Thomas Gleixner , "Bin Lu \(Arm Technology China\)" , "linuxppc-dev@lists.ozlabs.org" , "linux-arm-kernel@lists.infradead.org" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2019/3/12 20:09, Sudeep Holla wrote: > On Mon, Mar 11, 2019 at 08:04:39PM -0700, Andy Lutomirski wrote: >> On Mon, Mar 11, 2019 at 6:35 PM Haibo Xu (Arm Technology China) >> wrote: >>> > > [...] > >>> For the PTRACE_SYSEMU_SINGLESTEP request, ptrace only need to report(send >>> SIGTRAP) at the entry of a system call, no need to report at the exit of a >>> system call.That's why the old logic-{step = ((flags & (_TIF_SINGLESTEP | >>> _TIF_SYSCALL_EMU)) == _TIF_SINGLESTEP)} here try to filter out the special >>> case(PTRACE_SYSEMU_SINGLESTEP). >>> >>> Another way to make sure the logic is fine, you can run some tests with >>> respect to both logic, and to check whether they have the same behavior. >> >> tools/testing/selftests/x86/ptrace_syscall.c has a test intended to >> exercise this. Can one of you either confirm that it does exercise it >> and that it still passes or can you improve the test? >> > I did run the tests which didn't flag anything. I haven't looked at the > details of test implementation, but seem to miss this case. I will see > what can be improved(if it's possible). Also I think single_step_syscall > is the one I need to look for this particular one. Both single_step_syscall > ptrace_syscall reported no errors. > > -- > Regards, > Sudeep > Since ptrace() system call do have so many request type, I'm not sure whether the test cases have covered all of that. But here we'd better make sure the PTRACE_SYSEMU and PTRACE_SYSEMU_SINGLESTEP requests are work correctly. May be you can verify them with tests from Bin Lu(bin.lu@arm.com). Regards, Haibo IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel