Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3362630ybt; Tue, 30 Jun 2020 00:24:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxKdjO6iEYsQIIsgMollO1xImCN8M+jf/b+rPWGmyZLDYC/KbpWbwV7AvESGTgsM39LI3rX X-Received: by 2002:a50:f413:: with SMTP id r19mr22511151edm.17.1593501863040; Tue, 30 Jun 2020 00:24:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593501863; cv=none; d=google.com; s=arc-20160816; b=SMZI8zg79zWyZDz7NyFh2oHgLdyc28vuxyoQ5Tcu9qHZOMstt1MS/O5PdbtcI3otlU gvGE+ssnqBp+aUT9PnqxOLnWZACeAweAd9RAuDIwDahp+MUfz0X+ygudvJPPfGqUWqOj 9nVdWRTdYzK9EhHf33TFAt527A/eBMMuZqg6FJpdgAl3cfoUwgl/0Z5dyQvPF2fZG/uz QCX2uiQwJMBVD9jFBXNRt+9kaYVgdHUGzSDorg1uGM6FjJzb9Lq/cJBgxAJf3q8G0HP4 6VwvwEmuzuP5sJLWsBbE8Ia1oArW0myJ1nu+cuejTSiNAqG3mbfCoKpaJ7oEctpkcZn+ +mOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=7IL6WDzBAzGamZPUMKS3qfW3yT7mCi7FEIbJrLSY900=; b=GGUqj3POfVfa+uR2aRGH4GCFZtXGdJueZqdeRtCh6BcRUVyLUvY3I6Kgsa5RWOz3DY 5Z4SPBvg9afBuF06dHQNL/wHsrm0AOZNFWLUzDnR3goClkZm0n3ictlGMrVZNzTJinZZ 9V2jN4rRq8gKwgg1QODvvLTgomCXA2pGZbFA0iEtZMbyAWYV1XBRTaLzhkIYDmiptsvN x0DNp5NHTULq6Vm4wQ6nQJDHud1SNciSH1a4okY8zQeEeA1jgiLQ1/e27ERF+cxmuNnC RMc1cu2r3LbkDA607s/JclubnP6iUu5d6VXbAb3KshCmTw+UGeZbz6apo14MI06HnqRj 6g8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Ot+WEl+7; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i18si1174516ejy.71.2020.06.30.00.24.00; Tue, 30 Jun 2020 00:24:23 -0700 (PDT) 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; dkim=pass header.i=@kernel.org header.s=default header.b=Ot+WEl+7; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730874AbgF3HW2 (ORCPT + 99 others); Tue, 30 Jun 2020 03:22:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:45340 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730636AbgF3HW2 (ORCPT ); Tue, 30 Jun 2020 03:22:28 -0400 Received: from willie-the-truck (236.31.169.217.in-addr.arpa [217.169.31.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 75C8C20759; Tue, 30 Jun 2020 07:22:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1593501747; bh=AGvlLNBlx3bbxyvR44zntByoYH0BX9djo9ELlICoPJE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Ot+WEl+7LPutY0WbZaf9ShIjKm24najLyECN/GK/osKG3Q/D41WMnDCzYDmTjKoVE HyXs0Fjf7WRV2gskteKcNP47JGRO+xZo1u+96m5BNlSDpQgVggOLihuBVtX6isZstq TzldNymbQVPR27djSf7i3snjb3X42AQ/VHiQmnmk= Date: Tue, 30 Jun 2020 08:22:22 +0100 From: Will Deacon To: Doug Anderson Cc: "liwei (GF)" , Daniel Thompson , Jason Wessel , Marc Zyngier , Mark Rutland , Masami Hiramatsu , David Miller , Catalin Marinas , Linux ARM , LKML , liwei1412@163.com Subject: Re: [PATCH 0/4] arm64: kgdb/kdb: Fix single-step debugging issues Message-ID: <20200630072221.GA13332@willie-the-truck> References: <20200509214159.19680-1-liwei391@huawei.com> 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) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 29, 2020 at 02:20:11PM -0700, Doug Anderson wrote: > On Sat, May 16, 2020 at 1:20 AM liwei (GF) wrote: > > On 2020/5/14 8:34, Doug Anderson wrote: > > > On Sat, May 9, 2020 at 6:49 AM Wei Li wrote: > > >> > > >> This patch set is to fix several issues of single-step debugging > > >> in kgdb/kdb on arm64. > > >> > > >> It seems that these issues have been shelved a very long time, > > >> but i still hope to solve them, as the single-step debugging > > >> is an useful feature. > > >> > > >> Note: > > >> Based on patch "arm64: cacheflush: Fix KGDB trap detection", > > >> https://www.spinics.net/lists/arm-kernel/msg803741.html > > >> > > >> Wei Li (4): > > >> arm64: kgdb: Fix single-step exception handling oops > > >> arm64: Extract kprobes_save_local_irqflag() and > > >> kprobes_restore_local_irqflag() > > >> arm64: kgdb: Fix single-stepping into the irq handler wrongly > > >> arm64: kgdb: Set PSTATE.SS to 1 to reenable single-step > > >> > > >> arch/arm64/include/asm/debug-monitors.h | 6 ++++++ > > >> arch/arm64/kernel/debug-monitors.c | 28 ++++++++++++++++++++++++- > > >> arch/arm64/kernel/kgdb.c | 16 +++++++++++--- > > >> arch/arm64/kernel/probes/kprobes.c | 28 ++----------------------- > > >> 4 files changed, 48 insertions(+), 30 deletions(-) > > > > > > Just an overall note that I'm very happy that you posted this patch > > > series! It's always been a thorn in my side that stepping and > > > breakpoints were so broken on arm64 and I'm really excited that you're > > > fixing them. Now I'll have to get in the habit of using kgdb for more > > > than just debugging crashes and maybe I can use it more for exploring > > > how functions work more. :-) > > > > I'll also note that with your patch series I'm even seeing the "call" > > > feature of gdb working now. That has always been terribly broken for > > > me. > > > > > Thanks for reviewing and testing this series. > > Enjoy exploring the kernel with kgdb/kdb! :-) > > I'm curious to know if you plan another spin. The feedback you > received was fairly minor so it hopefully shouldn't be too hard. I'd > very much like to get your patches landed and I'd be happy to try to > address the feedback and spin them myself if you're no longer > available for it. I'd welcome some feedback on the proposal I sent out at the end of last week: https://lore.kernel.org/r/20200626095551.GA9312@willie-the-truck which looks to solve some (all?) of these issues slightly differently, because it turns out we need to perform some low-level surgery for preempt-rt *anyway*... I'm particularly keen to hear any thoughts concerning the reschedule on return to EL1 after handling an interrupt that hit during a step. Will