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=-2.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, URIBL_BLOCKED,USER_AGENT_MUTT 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 BF977C43381 for ; Tue, 12 Mar 2019 12:10:02 +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 8E58920883 for ; Tue, 12 Mar 2019 12:10:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="RjVYSikK" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8E58920883 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:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=AmtSS+I8NStx3FScDw/UpxfF2Y+OxOFzZkQXkGVym/4=; b=RjVYSikK8dLlJU 0v40xDcxfKcE3Ki0yBfK1/RQ2jjEOmpVACV1U5bLS2hHTUoTU5YgU8rytqNBeTTVW5O3V+Cxc3TKB f5sLM4LwGekKt3Ld3G4CXwFBj9yhCfzS5Vjwyz+PscwehbNMkYW7KoG6Pn7N3Y/Bwa1TNDe9S9Wcf zGcCDpl2x2ic5oAkASo92wajShZW0w0FT2S8NObTVBlNTyzeTS+on99QXOXlA9HeEDhvt8FvPJ11H xFCdHjLbSUi2cQ2UMFSKQbnuOmM748j5l4ZgpbYAyTye2pvRHCvP+D5riop7yXYFCK5gbt3Skcqll HW4Sa/nwtPs5N7cZI05A==; 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 1h3gEC-0006o8-UD; Tue, 12 Mar 2019 12:09:52 +0000 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70] helo=foss.arm.com) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h3gEA-0006np-5l for linux-arm-kernel@lists.infradead.org; Tue, 12 Mar 2019 12:09:51 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C3310374; Tue, 12 Mar 2019 05:09:49 -0700 (PDT) Received: from e107155-lin (e107155-lin.cambridge.arm.com [10.1.196.42]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id CFA633F59C; Tue, 12 Mar 2019 05:09:46 -0700 (PDT) Date: Tue, 12 Mar 2019 12:09:44 +0000 From: Sudeep Holla To: Andy Lutomirski Subject: Re: [PATCH 3/6] x86: clean up _TIF_SYSCALL_EMU handling using ptrace_syscall_enter hook Message-ID: <20190312120944.GB13825@e107155-lin> 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> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190312_050950_221686_1EF227F4 X-CRM114-Status: GOOD ( 15.56 ) 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: "Haibo Xu \(Arm Technology China\)" , 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 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel