Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp933092ybk; Wed, 13 May 2020 17:37:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyBNFYqjOepMOVZL1TM0DT8QP+PViwGM/c9ZORxBj3qjoFGK1+64j8UK/iypVo3dCZ1hwGV X-Received: by 2002:a17:906:31d7:: with SMTP id f23mr1569293ejf.118.1589416630357; Wed, 13 May 2020 17:37:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589416630; cv=none; d=google.com; s=arc-20160816; b=IQJl73EEkvd98nbcdv5P+ojdrpJca1z9OHnG4LDfF67hxxv+A9Pc9KpCOIwSWOZBOK 5xeojVl3HbszoWKmqEWtjvumgRLPwiSD3HTkhuITuTCEaQzY3rmEocUYANnK1nO88AsV LPslaFKeSv3TZuFFmQtfp9uR+nm+blepxmRzSfYKPHT5sC4MotjwNqJZOYlqU8xjsROe a42aY9xTyIsfce7LlP0EB/DsS5V+y0vYy+fu/vuX3j7UUTlyZ86DTY0CtFea2HkFnYg6 M1CdhNvMueabI9K+0Pg6bCkTSmtUUUDstCh/GLO3cDTllGYeu+f1IClPphHsAVGSNGCm t+0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=1F1bz86BhYtSr1k2hqnfmTpTysaJBy4VwQZQPcWyybc=; b=qtZMdlx61znM5XJpwFDkddNI+T1uuA6KaH4JAW5gK0aQXfu/Fss+YcZBieRriTl/z3 o498tc4WpvV7dIBvobmHTiKKTvPNRlMyiJCdk3y3vYHUqhWddcO/bOCoWZOtt78DWtr1 VxtHK8eYLryQYnaSMMb3aW1Do4K3O3Tf+9f/AxyW4jza3n7ev7GHVQLZ0OPF5KQb5BqA /IBjrhmaU28bjEjO0fgnF3ihHr3pTNaVaS3tNPdxfa17qnccwPIzEhljlA6huHn4mnss XdZS7pL6oDVR+vX+fZdkQMbWnbkOPum2xw7mPiZNwIVKR2nkIa9sdAlyW7QIlmaLxGX0 +vpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=bTwAhmLs; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h17si826486ejk.369.2020.05.13.17.36.47; Wed, 13 May 2020 17:37:10 -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=@chromium.org header.s=google header.b=bTwAhmLs; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733150AbgENAep (ORCPT + 99 others); Wed, 13 May 2020 20:34:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46482 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1733132AbgENAep (ORCPT ); Wed, 13 May 2020 20:34:45 -0400 Received: from mail-vk1-xa44.google.com (mail-vk1-xa44.google.com [IPv6:2607:f8b0:4864:20::a44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B68F0C061A0C for ; Wed, 13 May 2020 17:34:43 -0700 (PDT) Received: by mail-vk1-xa44.google.com with SMTP id v23so324495vke.13 for ; Wed, 13 May 2020 17:34:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1F1bz86BhYtSr1k2hqnfmTpTysaJBy4VwQZQPcWyybc=; b=bTwAhmLs3rFXc4n5b1BzgwPLaY24LOfPDqOowuTtvpOQq3Y4oIurMMd/WiwI4bE74m rDiDiRqykJ6JqDpH4DevmhVdJwF9bkBqDQVXI/6DaJql9SKOpUGr+1G/CjatLRVdDfnT FaHL8eZYeb/OJ6pLil5BJhtNXOydcFtYsrTGs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1F1bz86BhYtSr1k2hqnfmTpTysaJBy4VwQZQPcWyybc=; b=K0aBllV6j9a8+4ukpirqj+vtX+jqwdvlhkGoEOwOvo2Vxq1I0ooLgMkAU6C/27fDIM dbKjlhaG54XIZc5BtkvrGuyBvEBUjViIvXzwOkz5Ln02fhVxT7NM7BKk9a3mgtkSPXi9 y7/3gHY5ZtFzdHEi1hUcw7DoevDC8SZzvAs7AXorGkqBsvzqSW5KGPtqWQ5SZzuWD6we k6zhwVbR1XLFC0cycfeJ+wCevA7PVY9GCuIQJIog6rbbyqNxEqVLD2s0c0Ae8aPZALI6 wGcj9u3lL+rg5Yvmsr2poy41MtZyhFQ4KfHoSJagyLCgdQOTaoJEdYZGcjB6vR8NOjh6 ecCw== X-Gm-Message-State: AOAM533PLiWIo2JRqbVBJUPtG0bBQJvRdNhmWx1i57bsTMR4xNPEeZiq WGGaeuG3Lbe3+9OaAcJsVzWTadWJHiQ= X-Received: by 2002:a1f:17d7:: with SMTP id 206mr1668133vkx.2.1589416482423; Wed, 13 May 2020 17:34:42 -0700 (PDT) Received: from mail-vs1-f42.google.com (mail-vs1-f42.google.com. [209.85.217.42]) by smtp.gmail.com with ESMTPSA id k141sm322410vka.23.2020.05.13.17.34.40 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 13 May 2020 17:34:40 -0700 (PDT) Received: by mail-vs1-f42.google.com with SMTP id l25so956118vso.6 for ; Wed, 13 May 2020 17:34:40 -0700 (PDT) X-Received: by 2002:a67:c40c:: with SMTP id c12mr1585682vsk.106.1589416479714; Wed, 13 May 2020 17:34:39 -0700 (PDT) MIME-Version: 1.0 References: <20200509214159.19680-1-liwei391@huawei.com> In-Reply-To: <20200509214159.19680-1-liwei391@huawei.com> From: Doug Anderson Date: Wed, 13 May 2020 17:34:28 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 0/4] arm64: kgdb/kdb: Fix single-step debugging issues To: Wei Li Cc: Daniel Thompson , Jason Wessel , Marc Zyngier , Mark Rutland , Masami Hiramatsu , David Miller , Will Deacon , Catalin Marinas , Linux ARM , LKML , liwei1412@163.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, 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. -Doug