Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3289861imw; Mon, 11 Jul 2022 05:59:54 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uBKDMh3txUpLwYuds+27BH5nfXWY3q8kUko3Q1CGhhlQN6fs01BDRKRXZnq+zVYF1rNlW1 X-Received: by 2002:a17:902:c40a:b0:16c:b0f:aa56 with SMTP id k10-20020a170902c40a00b0016c0b0faa56mr18543988plk.60.1657544393944; Mon, 11 Jul 2022 05:59:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657544393; cv=none; d=google.com; s=arc-20160816; b=NlSooqzkT+ANrcR8azP0ar8hVJmt6kRxLZP18kJx1Vo7tvC6wVvhp5mR7MmbEF/+nj 3EJxCcMdSkvRfDG3918wVqMNtCazQyGqacmJkN85L7doLaxwDqzHjw242QLRPmC1TqS+ sv2yf3WILD80wGxrvCWcLcQosi2S9koIeQHNkIy/Da0+07/82TcGnE40b+Cc6q/9512R uiyuakZ4pmGwZvQxX9/BqisvgHSKWv50d5wSjQr5of6Vp07DEgD1P4twyER4IGIn2q4c AJBwl4ZJ/lD09EVLT6LmQE9CJS4Q3CQOjmLOmCSJpZDveqe6P1UKHG2PFpThV2L44+6x yG7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=aJocOm+WQm8JeoaTDLF9QVAn6Yxo6as7VtmcJ5sIzIg=; b=ewJGnvUY940PS+MR88zuFCvs7qwHO5c1ZaNXxj7a+vNhsZnvtj40JUh/kCIVoXJ+hh kRPCtuHDE8NuG2uwxclfqIcKivxtgGo6qJeCaYD8VRZ//JPaI/JpBvLXHc2KQFDGZGzl V4tYPvV/9Bhs/GCP+floLzuSVjjp/umKqM58fNl9Pydg+lLAU3Q4n/rdNN1/HSgFbk2m 15INvCek+6RW8dtbm0bLDNfpTVflG/wxvL+UXwpBp0LDk82xeImQu0SLntoJ/LTG8Bdi U7/27DIwFXzfjKD5caZyNGcQ8lL1gmKEl6+d6JgzXb9QOLL2mRjhlfb5Bde7bWfI8LDK e4wg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lVrLbWT8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ix21-20020a170902f81500b0016bf7f945eesi8887719plb.371.2022.07.11.05.59.41; Mon, 11 Jul 2022 05:59:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lVrLbWT8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231931AbiGKMss (ORCPT + 99 others); Mon, 11 Jul 2022 08:48:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232017AbiGKMsm (ORCPT ); Mon, 11 Jul 2022 08:48:42 -0400 Received: from mail-pg1-x52d.google.com (mail-pg1-x52d.google.com [IPv6:2607:f8b0:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C265E0AD for ; Mon, 11 Jul 2022 05:48:41 -0700 (PDT) Received: by mail-pg1-x52d.google.com with SMTP id 145so4616141pga.12 for ; Mon, 11 Jul 2022 05:48:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=aJocOm+WQm8JeoaTDLF9QVAn6Yxo6as7VtmcJ5sIzIg=; b=lVrLbWT8SKQjAOicPujVtFIM7vw3vlUdViH8lqPwlF4T6FLdTUxvkt+hJ2QNC/PSWC lFdIxksoH+pGTCrg2JGNoAdDPdMbjcpl1ZCio5G1XLLvv85sGXj3NSDXj5cyl0OOmS3f XIfv74LfoxC766Q7JmSsBdVSC2Pz28OzBocM4rSPt8GRbgB1gIDp5+fqGENHptIJr1sn HfEZTlywqD4nPBA4Yp884WGj5ZAGCqUGpLfHuhQ0LmfPwoP+0ojb4/j9xatz6GV1KoNe QBLMXiNG8ronkh8pEfwmx4fo4861OiFyURFC+4zEMnmGDbbNvPgpN+gY3WsuQSE2oHrr lIXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=aJocOm+WQm8JeoaTDLF9QVAn6Yxo6as7VtmcJ5sIzIg=; b=sEyJZFFdvYitmoIGtv2adPgt0E0eWNCbX/euHcMmEAte6rKVgIQILatpFxuOj8BDXE Tr0XBVLZymldAQou3IG/+17R/HogBIPiJSxMmk1NHvOEdW0TmAb0+j4R+BxjZGquM5LD 6p6skenSBnruCjoLhykV359ZeML4EB6YsEtBH9Z5f9R2ojkC/1TDqn+B7DYo0YQQAB+J 1G5sBMZVHDBFWbpYfHc97/C5mysOWbwas0cvSE2/uhdT1GXbuM1gGhN2HAxG73SB/vy8 zSTgdMxxJiJCp9eXqxqF7FkmjrwV7ujcWjpLduAzCc1Xna3TlHCkHHTyBJMK4ZYYLrEr ukYQ== X-Gm-Message-State: AJIora+z+iJtoW/qXGGvwLbPJRATnyO8y+mGXmKXdEbQ6WsQj0al3w/c 8DfNL/DppQYm+HMSqH/WWUXjKPzYslo1rTALaZjbsw== X-Received: by 2002:a05:6a00:1701:b0:525:9f20:a78a with SMTP id h1-20020a056a00170100b005259f20a78amr18735285pfc.2.1657543720577; Mon, 11 Jul 2022 05:48:40 -0700 (PDT) MIME-Version: 1.0 References: <20220511060521.465744-1-sumit.garg@linaro.org> <20220708163134.GB6286@willie-the-truck> In-Reply-To: <20220708163134.GB6286@willie-the-truck> From: Sumit Garg Date: Mon, 11 Jul 2022 18:18:29 +0530 Message-ID: Subject: Re: [PATCH v3 0/2] arm64: Fix pending single-step debugging issues To: Will Deacon Cc: Doug Anderson , Daniel Thompson , Wei Li , Catalin Marinas , Mark Rutland , Masami Hiramatsu , Jason Wessel , Marc Zyngier , Linux ARM , LKML Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Will, On Fri, 8 Jul 2022 at 22:01, Will Deacon wrote: > > On Fri, Jul 01, 2022 at 03:14:16PM -0700, Doug Anderson wrote: > > Hi, > > > > On Tue, May 10, 2022 at 11:05 PM Sumit Garg wrote: > > > > > > This patch-set reworks pending fixes from Wei's series [1] to make > > > single-step debugging via kgdb/kdb on arm64 work as expected. There was > > > a prior discussion on ML [2] regarding if we should keep the interrupts > > > enabled during single-stepping. So patch #1 follows suggestion from Will > > > [3] to not disable interrupts during single stepping but rather skip > > > single stepping within interrupt handler. > > > > > > [1] https://lore.kernel.org/all/20200509214159.19680-1-liwei391@huawei.com/ > > > [2] https://lore.kernel.org/all/CAD=FV=Voyfq3Qz0T3RY+aYWYJ0utdH=P_AweB=13rcV8GDBeyQ@mail.gmail.com/ > > > [3] https://lore.kernel.org/all/20200626095551.GA9312@willie-the-truck/ > > > > > > Changes in v3: > > > - Reword commit descriptions as per Daniel's suggestions. > > > > > > Changes in v2: > > > - Replace patch #1 to rather follow Will's suggestion. > > > > > > Sumit Garg (2): > > > arm64: entry: Skip single stepping into interrupt handlers > > > arm64: kgdb: Set PSTATE.SS to 1 to re-enable single-step > > > > > > arch/arm64/include/asm/debug-monitors.h | 1 + > > > arch/arm64/kernel/debug-monitors.c | 5 +++++ > > > arch/arm64/kernel/entry-common.c | 18 +++++++++++++++++- > > > arch/arm64/kernel/kgdb.c | 2 ++ > > > 4 files changed, 25 insertions(+), 1 deletion(-) > > > > Sorry it took so long for me to respond. I kept dreaming that I'd find > > the time to really dig deep into this to understand it fully and I'm > > finally giving up on it. I'm going to hope that Will and/or Catalin > > knows this area of the code well and can give it a good review. If not > > then I'll strive harder to make the time... > > So the good news is that I spent a couple of days on this last week. > Thanks for spending time to review this. > The bad news is that I'm nowhere done and about to disappear on holiday > for a week! > > But anyway, I might be able to give this a review when I'm back. Failing > that, I wonder if enough of us have a little bit of time each that we > could hack on an agreed design together which covers the debug exception > behaviour beyond kgdb? Sure I will be happy to contribute to improving overall debug exception behaviour. I look forward to any further comments/suggestions. -Sumit > > Will