Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp895694ybk; Wed, 13 May 2020 16:22:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxomtZC68pjk19SxrErpsAvay/GGR/QeB68r3XxW2JesluR2AB3zDK2wj4rndCudir0Zcvn X-Received: by 2002:a50:be8f:: with SMTP id b15mr1719514edk.182.1589412164960; Wed, 13 May 2020 16:22:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589412164; cv=none; d=google.com; s=arc-20160816; b=JdhVEvB2iEgaMayMzl21EdOdYHXmMrfiL6+dj+T5zizEjm99u49SYR21W0jrReT5wI 6G0Nc7QNQ5KiF09PvXys2Xf8q7dNgDzgzmtctYIdoRqO3afW6m3Calj5Q6GpOfuaxcsg gSzzhVlhBcMc/WBRNBZfoNOjBx+zUqptHvLfsYjuBjGW3q/xUR1rqoHZrUOlDKwHwpvI vSqa1r4NU/e6pl0zP4o7hZUSBZosRROOYe5PRnT3H6xad+k7oIfyr9d10ba7LeylU6Yh 3mxrW/a3UWWNsq2Ygogi1UzNHxmRTnUdIBN1nu+J14fU7PzxrV3qXvYHp8QWJxise+Xo rETQ== 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=NzQVGwBy98yyKuXlmBNvWD4o+eLGqCxtgVxPgKw63Do=; b=C+qqFQL2t2RKvi4ItP3Te/oq9O1EsAMb2JxHT5vQZmvhUG7xU88WaTvz6BsALELmvG qhN3iFGwQVNlhfyjO2QJE0PjM/iCyvh01km+1KFVpEiCx+7XsHXcdZ7C1tJEkSJMpPtU cG3ki5TCG9eEqe7/H/4h8lOhjXfnRk8TEgziw0Lz/exRqQqpVSQBUB4O5a7/Us/pxVI6 0/4aVpJ3AyEWe2R7gOrfmiHTlriwgzfrLlmvzSQBQl9H7pHfktiepjM+eGnLnM66ZTs1 CHwCv/TuiRhwHBpTT6ZeJ7OlKDhPjukjC07nm1/rBw98EH5udHMKB6salf2PUrN4KCnN Lxfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=d91N+o6U; 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 g25si526228edy.554.2020.05.13.16.22.14; Wed, 13 May 2020 16:22:44 -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=d91N+o6U; 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 S1732554AbgEMXSf (ORCPT + 99 others); Wed, 13 May 2020 19:18:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1732161AbgEMXSf (ORCPT ); Wed, 13 May 2020 19:18:35 -0400 Received: from mail-pf1-x444.google.com (mail-pf1-x444.google.com [IPv6:2607:f8b0:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 48DB3C061A0C for ; Wed, 13 May 2020 16:18:35 -0700 (PDT) Received: by mail-pf1-x444.google.com with SMTP id y25so424578pfn.5 for ; Wed, 13 May 2020 16:18:35 -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=NzQVGwBy98yyKuXlmBNvWD4o+eLGqCxtgVxPgKw63Do=; b=d91N+o6UMzxTsz1St1Hu66m8IAaS2jE1/WCro4T3FXi2sc/4AHW4ODcGwfEnvDzHjj /PKKX5txh+2AdFLEuJtnkNNG0IRWzECKUG3SGfFwrIcEdqW19nhO2jFicMOUMvz6T+C1 tNR/mldiveHPbJerAbyvqheERVBHSeb8Q1lg0= 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=NzQVGwBy98yyKuXlmBNvWD4o+eLGqCxtgVxPgKw63Do=; b=uKAL6G61MLn3QigHDWqXdG4FealbNGlsN/YKgyBiRVy+BbwX+xLaihvJztlPq1GanU xwJ8Pr41HA4E3KkfolxBYtct2r5FLYfFd+aJmdW007f2DJ8qf44Th/sYZOvtCXv1irQY CpZtmw8bVYcE0Q8irc3v8GaI7nnjozfdDxVt9jWBvXaTy2Rp8uicFCGRrjIdn0hU+LSf K3MCsKif1Hv2elUU4Ic0cINxnQMTS0CUPhKn2UVuCsXUldal+sj5B6BI5FpK8dh1+hK2 URPM/V7ArOgWAgpqhTaTW2WOIsssLGLfFvmenL4Jz7BSFnX3mTWCf8h6akqb5cWJ7ASO wflA== X-Gm-Message-State: AOAM530ysIkeWqmAd/MgV3Ou5VJCLljCCturqaoZNDxx0L+ORLstA7mE MdNqOc37PhlJvjtYGERPhKmAnnJI500= X-Received: by 2002:aa7:83c8:: with SMTP id j8mr1556371pfn.272.1589411914316; Wed, 13 May 2020 16:18:34 -0700 (PDT) Received: from mail-pg1-f174.google.com (mail-pg1-f174.google.com. [209.85.215.174]) by smtp.gmail.com with ESMTPSA id x10sm635840pgq.79.2020.05.13.16.18.34 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 13 May 2020 16:18:34 -0700 (PDT) Received: by mail-pg1-f174.google.com with SMTP id t11so431466pgg.2 for ; Wed, 13 May 2020 16:18:34 -0700 (PDT) X-Received: by 2002:a67:bd07:: with SMTP id y7mr1357400vsq.109.1589411542393; Wed, 13 May 2020 16:12:22 -0700 (PDT) MIME-Version: 1.0 References: <20200507200850.60646-1-dianders@chromium.org> <20200507130644.v4.5.I22067ad43e77ddfd4b64c2d49030628480f9e8d9@changeid> In-Reply-To: <20200507130644.v4.5.I22067ad43e77ddfd4b64c2d49030628480f9e8d9@changeid> From: Doug Anderson Date: Wed, 13 May 2020 16:12:11 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v4 05/12] arm64: Add call_break_hook() to early_brk64() for early kgdb To: Jason Wessel , Daniel Thompson , Greg Kroah-Hartman Cc: Jonathan Corbet , Frank Rowand , Bjorn Andersson , linux-serial@vger.kernel.org, Ingo Molnar , "H. Peter Anvin" , Jiri Slaby , kgdb-bugreport@lists.sourceforge.net, Sumit Garg , Will Deacon , Thomas Gleixner , Andy Gross , Catalin Marinas , bp@alien8.de, Alexios Zavras , Allison Randal , Dave Martin , Enrico Weigelt , "Eric W. Biederman" , James Morse , Mark Rutland , Masami Hiramatsu , jinho lim , Linux ARM , LKML 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 Thu, May 7, 2020 at 1:09 PM Douglas Anderson wrote: > > In order to make early kgdb work properly we need early_brk64() to be > able to call into it. This is as easy as adding a call into > call_break_hook() just like we do later in the normal brk_handler(). > > Once we do this we can let kgdb know that it can break into the > debugger a little earlier (specifically when parsing early_param's). > > NOTE: without this patch it turns out that arm64 can't do breakpoints > even at dbg_late_init(), so if we decide something about this patch is > wrong we might need to move dbg_late_init() a little later. > > Signed-off-by: Douglas Anderson > Cc: Catalin Marinas > Cc: Will Deacon > Reviewed-by: Greg Kroah-Hartman > Reviewed-by: Daniel Thompson > --- > > Changes in v4: > - Add "if KGDB" to "select ARCH_HAS_EARLY_DEBUG" in Kconfig. > > Changes in v3: > - Change boolean weak function to KConfig. > > Changes in v2: None > > arch/arm64/Kconfig | 1 + > arch/arm64/include/asm/debug-monitors.h | 2 ++ > arch/arm64/kernel/debug-monitors.c | 2 +- > arch/arm64/kernel/traps.c | 3 +++ > 4 files changed, 7 insertions(+), 1 deletion(-) As discussed in the replies to the v3 version of this patch [1], I have posted a replacement patch for this one [2]. After the cut in the replacement patch I talk about different ways it could land. Hopefully that's not too confusing. I can also re-spam everyone with a v5 of the whole series if that makes it clearer. [1] https://lore.kernel.org/r/20200428141218.v3.5.I22067ad43e77ddfd4b64c2d49030628480f9e8d9@changeid [2] https://lore.kernel.org/r/20200513160501.1.I0b5edf030cc6ebef6ab4829f8867cdaea42485d8@changeid -Doug