From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ozlabs.org (ozlabs.org [IPv6:2401:3900:2:1::2]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 401RHH2dNPzDr2V for ; Wed, 14 Mar 2018 20:28:43 +1100 (AEDT) In-Reply-To: <20180304173132.19677-1-vaibhav@linux.vnet.ibm.com> To: Vaibhav Jain , Balbir Singh From: Michael Ellerman Cc: Vaibhav Jain , Frederic Barrat , linux-kernel@vger.kernel.org, Paul Mackerras , Nicholas Piggin , Douglas Miller , linuxppc-dev@lists.ozlabs.org Subject: Re: xmon: Clear all breakpoints when xmon is disabled via debugfs Message-Id: <401RHG6psmz9sVP@ozlabs.org> Date: Wed, 14 Mar 2018 20:28:33 +1100 (AEDT) List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Sun, 2018-03-04 at 17:31:32 UTC, 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 Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/1ff3b404019adf9d605224e1dce067 cheers