Received: by 10.223.185.116 with SMTP id b49csp1940535wrg; Sun, 4 Mar 2018 13:48:54 -0800 (PST) X-Google-Smtp-Source: AG47ELuZ5+JlANAbNOyrSrYTrN3KEMYiSe7R7kJ3DnXQAkQJvjtSQA35My2YfznnzKS3kghnuB/K X-Received: by 10.98.165.4 with SMTP id v4mr8094121pfm.51.1520200134498; Sun, 04 Mar 2018 13:48:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520200134; cv=none; d=google.com; s=arc-20160816; b=NymUUCL1skdiSnaUaLBlKpg4YYNWHZNoTguDqnhKcX2PjYpSeQCAb385GosfOtgxUK SCGuzFU2lZ+eIxWRzMxHKzo2mTUJrp9wDSA0PqwodFDqxbEtlbm0vD1hAiVzr3uz+12I +7jr1Neg+jNcAC3jDGi3bmM+lWc7JxJ2N8SsTJLCjXhqq6oKOL1CxwCFM8eWp6hi/poe hAQzQfn3v1l9r84RWd9kVkyMr/xxGGDGWn9ryTiTJqFZsGSDpBO+ksX1s3OMlpgZwCaw oK8R3m5+ekTWpBlNEvyZR1IwgrlZp3F911WK116x0c8hW5zZL7mM5/0Tu/H+jDFsGpV+ yPhA== 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 :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=NoonASTgSy/mkaQ3EOJw7wAjMboBVrUjBM0zMjbPsgA=; b=HBm5nB7IwaPS9FTOnXt8RQAphQrwmx5lUNBHJudjd3/mKqsc9H3oTWvm1VQff1YTsi 8QTJfjcH34HbibvJZSHp0ZYAMe9W6sRg4LO7x+LadPFl4jh76u2CnjemyEtfDIWlQ/tH B6xot+fihe0T1lm1XjLNebkQEcq9YbJ0VAiTR3xvR+YsW5iZ1MI4ZSxcuPDZP58mwvti 0YisOToTxYG6nEYuY/TkEpn4PcURP6iIhwwwa4MRXSAZ5A8LpllEosIuFJJ5M8yKRisd uRE0Xh90HDx/vFuZMskyEphp60n+Od24I3D5tbuChNiyliDskiztLPFG2WxkuLKc3dhD fI/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=fDVa1XhN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v186si8999357pfb.284.2018.03.04.13.48.26; Sun, 04 Mar 2018 13:48:54 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=fDVa1XhN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752150AbeCDV14 (ORCPT + 99 others); Sun, 4 Mar 2018 16:27:56 -0500 Received: from mail-vk0-f67.google.com ([209.85.213.67]:41003 "EHLO mail-vk0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752018AbeCDV1y (ORCPT ); Sun, 4 Mar 2018 16:27:54 -0500 Received: by mail-vk0-f67.google.com with SMTP id l123so3551365vke.8 for ; Sun, 04 Mar 2018 13:27:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=NoonASTgSy/mkaQ3EOJw7wAjMboBVrUjBM0zMjbPsgA=; b=fDVa1XhNUC72lRdRw1Rc2v5/TC4gjcoIaEZ+XJ6xM0ijSEY6sSts+4wU9QoLYMGwSH yDtjIsReKdx8iwXcaIIruuFPHvp2+3p4d48qco441Af6h7ccNy6wG5xHs4Nm1uTwWNsK Z3YfRBnh7SzV8UlZxljFfVn4lZp/wu7d1m4v4JTIPzQ1IxTieNQ2C/nrhDBYyOXgnOSS bNOV7s3l/AH8c4j1cyg/p3wwtiF2d7p3aZKGbDUGYLrO1+4scYe3Wz/mlQL68Bixx9vQ dBEmz9vI+tAu10NbOg4k02mzPjRPvRFfjP2IkDEPAaPf6Orud7frs5l0TV+e5ihAq8Od 0wHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=NoonASTgSy/mkaQ3EOJw7wAjMboBVrUjBM0zMjbPsgA=; b=P3P2VUse/quxNG0zlkZIU9bFs1TyW7cAHZ+myiP3jyqbPmGswViPN1Ro4e+rClr7cv SbBxkf4NNvWm8Hs4KBXjjQDYxnAdNPmsUuCsAYUtEX255uFf+VMiF8gcrT5KrSiwgpqK J2Sxacqgud3tf4cPOtcWDG5eb6shYvtXC2YyQRQ5NeDABeSZI+VcbJ2PhCBVl6/jZUoK jkrcQNEEPgz+mzpMckQi0XhRO7ni6MRQDlIL/ZgBAOfkVtqY9MeRDAzCToAnKu1P/HIM 3AOYFKS0zhj5l/nP2OgoxPOyV4kuKNUKY+W1DhJmQMxzAi95KGlW2kHZbT7NVhdTmzWO X/IQ== X-Gm-Message-State: APf1xPACjUSV8XuqrIBB0rP7/Vz/dX/j42mp+k039EdEunJY3P1R0pYE t8YO7k757ZMq708pD1QGMR8jQ+t7BZNEmp1cSbE= X-Received: by 10.31.114.74 with SMTP id n71mr8541622vkc.190.1520198873432; Sun, 04 Mar 2018 13:27:53 -0800 (PST) MIME-Version: 1.0 Received: by 10.176.97.142 with HTTP; Sun, 4 Mar 2018 13:27:52 -0800 (PST) In-Reply-To: <20180304173132.19677-1-vaibhav@linux.vnet.ibm.com> References: <20180304173132.19677-1-vaibhav@linux.vnet.ibm.com> From: Balbir Singh Date: Mon, 5 Mar 2018 08:27:52 +1100 Message-ID: Subject: Re: [PATCH] xmon: Clear all breakpoints when xmon is disabled via debugfs To: Vaibhav Jain Cc: Michael Ellerman , Frederic Barrat , "open list:LINUX FOR POWERPC (32-BIT AND 64-BIT)" , "linux-kernel@vger.kernel.org" , Benjamin Herrenschmidt , Paul Mackerras , Nicholas Piggin , Douglas Miller 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 On Mon, Mar 5, 2018 at 4:31 AM, Vaibhav Jain wrote: > Presently when xmon is disabled by debugfs any existing > instruction/data-access breakpoints set are not disabled. This may > lead to kernel oops when those breakpoints are hit as the necessary > debugger hooks aren't installed. > > Hence this patch introduces a new function named clear_all_bpt() > which is called when xmon is disabled via debugfs. The function will > unpatch/clear all the trap and ciabr/dab based breakpoints. > > Signed-off-by: Vaibhav Jain > --- Reviewed-by: Balbir Singh Balbir