Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp7214045pxb; Thu, 18 Feb 2021 04:43:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJwjbDaakJ6eK/r07PbBQGdR/YVTf1KhV3kACGkwqmoLBsd3VVD0a5iOemwXjj3ZpW7UhJwX X-Received: by 2002:a17:907:2d09:: with SMTP id gs9mr3665767ejc.363.1613652189979; Thu, 18 Feb 2021 04:43:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613652189; cv=none; d=google.com; s=arc-20160816; b=hLJiQHtVKB4A3pKuddsNmusr9Onv46cy3SzH18WBvByqtxcWg8S2LKRwm9c/jJzeOE zpOmVx1T0XaRFwYHIwVGE3ZuH8FZSO0sHJa6gDsblCvyRI3Z1UkLc3r1zg1PsENAB2Sy RiknxynuTmZKrncZl0OKAWq68sSJx10lL/cQ2UeOSK7ai/rQXobbEEotJtzmvbttAtoa At4JJVAyABgR9iGl/Wvq24f6i83/5oX4FSorkEuwIBvcVuEc4hlG57LJjyJnDJGNWktC z25f8dbtjxJxIa99TDfQ63g7e5x9e0j86uBgJOf7iQL6aM5GABvDGSGOF6gGwrBdd4mf ao4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=WRiZH29OFN8mJ7pXA5vPJoeAkwhishALXcJOzhuEeJA=; b=vsWOODlihP4kB74YSjYgE8K7BE757tAKZBkgQq1kYkjL8tq7fcRuXaPvqiNV5FJz76 5rI84qNGgZBetchRRIrlFok522cE8E4+lyEWpoG+8YU8Ab63vNSqfkx0wNX3V+W23wJ9 OAx6XBokp8Nd8fruwFYp9Qz22v+6T1i0czM+feKQBUMjJYaJw+q7b/JvzeFARzW0YZHu HDQGYMcREtxjv8tQZPQjnVrusNM+OE0YqfdgJpEgFgAueNrM1tYapXwfrrWigU950XG7 tLTKFgf9IJCNDU6/0APFckccWPx/N4w4YgO5I2QNRzidjeshTZ2JCtfd6c/1DeEFD/Kq CMXg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m9si3434154edc.526.2021.02.18.04.42.43; Thu, 18 Feb 2021 04:43:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233068AbhBRMgH (ORCPT + 99 others); Thu, 18 Feb 2021 07:36:07 -0500 Received: from elvis.franken.de ([193.175.24.41]:35441 "EHLO elvis.franken.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231440AbhBRLB1 (ORCPT ); Thu, 18 Feb 2021 06:01:27 -0500 Received: from uucp (helo=alpha) by elvis.franken.de with local-bsmtp (Exim 3.36 #1) id 1lCh1t-0003dl-00; Thu, 18 Feb 2021 11:59:29 +0100 Received: by alpha.franken.de (Postfix, from userid 1000) id 5BF5AC01A0; Thu, 18 Feb 2021 11:57:10 +0100 (CET) Date: Thu, 18 Feb 2021 11:57:10 +0100 From: Thomas Bogendoerfer To: "Maciej W. Rozycki" Cc: Tiezhu Yang , Oleg Nesterov , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Xuefeng Li , kernel test robot , Xingxing Su Subject: Re: [PATCH v2] MIPS: Add basic support for ptrace single step Message-ID: <20210218105710.GA5814@alpha.franken.de> References: <1612939961-8827-1-git-send-email-yangtiezhu@loongson.cn> <20210211102905.GE7985@alpha.franken.de> <20210212163335.GA12558@alpha.franken.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 16, 2021 at 02:55:36PM +0100, Maciej W. Rozycki wrote: > On Fri, 12 Feb 2021, Thomas Bogendoerfer wrote: > > > > IMHO ptrace single step is for CPUs supporting single stepping and not > > > for emulating it in the kernel. > > > > I've checked other arch how they implement single step, and looks like > > I'm wrong. So I'm ok with applying your patch. Can you resend it again, > > so I'll get the latest version in patchwork ? > > [..] > This is broken and belongs to the userland anyway. See how complex the > handling is in GDB, specifically `mips16_next_pc', `micromips_next_pc' and > `mips32_next_pc' in gdb/mips-tdep.c. I should have looked closer how other archs are implementing single stepping. It's only alpha, which emulates it by setting breakpoints. All others have some type of cpu cupport for getting traps after a single intstruction has been issued. So I'm reverting the commit and supporting Maciej's statement about putting that stuff into userland (again). Thomas. -- Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ]