Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1071201pxb; Fri, 26 Feb 2021 01:35:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJx2gUkk1zi4LrgS6iA5eM+WVfetYQmClbaRuFvkW+NV1/X/BgVqa4FWox5RQDUUeRNMktKF X-Received: by 2002:a17:906:1956:: with SMTP id b22mr2432309eje.114.1614332109729; Fri, 26 Feb 2021 01:35:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614332109; cv=none; d=google.com; s=arc-20160816; b=BuaDKFBmJQbVTJ0ibflDauuzFg9z/La2nGK3EVxxEkUQyPM57K0U+Fv0Cr7s560FSc zLRcUZtpAvcWGcQY4yL7d9tcVQ1x2NMsxKf/MkKFZCX/KFC/TM+XklTsDa+3Jdph/w9K PYLrenUn7/N3rRlgEtzv3TsGWcfhVVVk3leoF7AnPMoUeW1KbSafUWyGRuJJ/rf3vian CBpJdik3lmGMh9Tp5z+xYZBTVRmXWkxlBS6aECkzw8hu9hCnWd3bK7ptzrhIA/xDUDLU WiTF394FV9/lZ3AgfenOMpVnBVtB4PnaWr2y+Dp1JSIykEE5jE/QdHzONMV+qo7dCsVg 8vzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=2j0v9/++oo1nREjYMkhdHiO+3+LGu2RSZ2BTupmAla4=; b=Ev4CrBwULkBTg6gIkAr3rN5JH3onlr7WMcJ1ui1OUSsqYqrPoteLq6eldir2NvOzn2 zm5pIlX0QYgDBiemeHj2YZQt/0wziqs4HUHoGijmrKdAYQLDudvmLloSXdFWUpyTIW8B ZGwhD76rooiHnrm8iRow1UtYqs99KqsU9IJeKu8X4AJooRCxY9yiY8zDXVhwiqpkkWu7 F8ZqeJawtP+pMWOzim1SpnXtG+18bYRy8ZYABBNj9nb3ADezFYeB3gGCnHy7gcXAHDQK FiZxCi0fHRxkQHrwVnRwBAPLfqfH24DPmfaEfH90B95ak4bfpl0v4tiZe0PPh48nnKIr oCiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ophkVSbs; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z19si2231504ejl.54.2021.02.26.01.34.46; Fri, 26 Feb 2021 01:35: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; dkim=pass header.i=@linaro.org header.s=google header.b=ophkVSbs; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229967AbhBZJeH (ORCPT + 99 others); Fri, 26 Feb 2021 04:34:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44310 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229915AbhBZJdE (ORCPT ); Fri, 26 Feb 2021 04:33:04 -0500 Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::236]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9978FC06174A for ; Fri, 26 Feb 2021 01:32:23 -0800 (PST) Received: by mail-lj1-x236.google.com with SMTP id r25so8882443ljk.11 for ; Fri, 26 Feb 2021 01:32:23 -0800 (PST) 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:content-transfer-encoding; bh=2j0v9/++oo1nREjYMkhdHiO+3+LGu2RSZ2BTupmAla4=; b=ophkVSbst+ACqsyZFIiOp79lI2xxUl3LTnFt38oEalw/lQhYiComoPd8ijpD3Cvs6b cFI7zSVaYrOq61d/V5+i1JkNmr12hiKpRSEHr8gR2wlCsNdpDrIPUUifibpC9lQQcpxE t9/zYhSgsN90TVSI7GkaQZAVAJv9gO6s0+VjYYrmiEKzpztvbp0MvHtOxsoGtakVk3Aw JF/9bzvQPT+ot3SJpxr7RlkFzvYbf8wW4FBT4L2IiWmOtvZ59g3SUWHN8yM/IHwbrAxc fJhbQ0mnqFDXqitVUA7ghcrSxSJSlVWsZrjdYYpLp9s/mZyFpo9kQ1CxIfR9f0b1yRFJ S2Ug== 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:content-transfer-encoding; bh=2j0v9/++oo1nREjYMkhdHiO+3+LGu2RSZ2BTupmAla4=; b=tuP32BKAHUOGwFtIe3RrgQqr3jNz1k//+yoV4f/aZzaAZ7rAFc+sw53f+cmd+GnRYa A8u9edA2p2ewxEH4gAR8zbZZAFIip8ziOxYAw91us/SUJivUAwaWUzHmdfrw4NrTC5wK jK9RE5yTw06WGIpn4tN3rhGL7k5hdI4D8GCCYgMxKUPvCIFnqQ928CjBN4MT4/iP5sHl 5kktAOGSOGJMicJV7r5hZXLwdlmT1nSv/cPYse3oNExJblh8NeD6XjGRp9MzoLJysaw4 bTXSFU+YEBg/SufLOFDHzSwBeOqqtK9deLQib1KybQtn6AMGRx1IzWR/qC7LnGE05Jcx +ACw== X-Gm-Message-State: AOAM532aopQRvRYCauqlK6KHlXcRNCfTqlq0dm+KSMTpGKBoUCgh4Bpu /NkmUUk0ZbGAiLOaMiz197ISlsIMKf188iZZrvEpag== X-Received: by 2002:a2e:b01a:: with SMTP id y26mr1205089ljk.442.1614331941504; Fri, 26 Feb 2021 01:32:21 -0800 (PST) MIME-Version: 1.0 References: <20210224081652.587785-1-sumit.garg@linaro.org> <20210225155607.634snzzq3w62kpkn@maple.lan> In-Reply-To: From: Sumit Garg Date: Fri, 26 Feb 2021 15:02:09 +0530 Message-ID: Subject: Re: [PATCH] kgdb: Fix to kill breakpoints on initmem after boot To: Greg KH Cc: Daniel Thompson , kgdb-bugreport@lists.sourceforge.net, Andrew Morton , Masami Hiramatsu , Steven Rostedt , Jason Wessel , Douglas Anderson , Peter Zijlstra , stefan.saecherl@fau.de, qy15sije@cip.cs.fau.de, Linux Kernel Mailing List , stable Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 26 Feb 2021 at 13:01, Greg KH wrote: > > On Fri, Feb 26, 2021 at 12:32:07PM +0530, Sumit Garg wrote: > > + stable ML > > > > On Thu, 25 Feb 2021 at 21:26, Daniel Thompson > > wrote: > > > > > > On Wed, Feb 24, 2021 at 01:46:52PM +0530, Sumit Garg wrote: > > > > Currently breakpoints in kernel .init.text section are not handled > > > > correctly while allowing to remove them even after corresponding pa= ges > > > > have been freed. > > > > > > > > Fix it via killing .init.text section breakpoints just prior to ini= tmem > > > > pages being freed. > > > > > > > > Suggested-by: Doug Anderson > > > > Signed-off-by: Sumit Garg > > > > > > I saw Andrew has picked this one up. That's ok for me: > > > Acked-by: Daniel Thompson > > > > > > I already enriched kgdbtest to cover this (and they pass) so I guess > > > this is also: > > > Tested-by: Daniel Thompson > > > > > > > Thanks Daniel. > > > > > BTW this is not Cc:ed to stable and I do wonder if it crosses the > > > threshold to be considered a fix rather than a feature. Normally I > > > consider adding safety rails for kgdb to be a new feature but, in thi= s > > > case, the problem would easily ensnare an inexperienced developer who= is > > > doing nothing more than debugging their own driver (assuming they > > > correctly marked their probe function as .init) so I think this weigh= s > > > in favour of being a fix. > > > > > > > Makes sense, Cc:ed stable. > > > > > This is not the correct way to submit patches for inclusion in the > stable kernel tree. Please read: > https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.ht= ml > for how to do this properly. > > Thanks for the pointer, let me wait for this patch to land in Linus=E2=80= =99 tree and then will drop a mail to stable@vger.kernel.org. -Sumit