From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751646AbdJRUnS (ORCPT ); Wed, 18 Oct 2017 16:43:18 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:58682 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751608AbdJRUnQ (ORCPT ); Wed, 18 Oct 2017 16:43:16 -0400 Date: Wed, 18 Oct 2017 22:43:12 +0200 (CEST) From: Thomas Gleixner To: Probir Roy cc: LKML , prasad@linux.vnet.ibm.com, paulus@au1.ibm.com, Peter Zijlstra , Arnaldo Carvalho de Melo Subject: Re: Restriction on setting debug registers (HW breakpoint) at kernel space In-Reply-To: Message-ID: References: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 13 Oct 2017, Probir Roy wrote: > I am patching the perf tool of linux to set HW breakpoints at kernel > space. I found that there is an interface for user-space > (modify_user_hw_breakpoint) but no interface for system wide > breakpoint modification. Older version of linux had this support by K. > Prasad. I was wondering why linux remove this support. Moreover, when > I patch the perf tool for kernel space breakpoint following steps from > "modify_user_hw_breakpoint", kernel panics but nothing is written on > log file. What could be the issue? Is it a race condition while > modifying the address or is it because kernel restricts it to set HW > breakpoint at some kernel address(if so, where is it written)? Can you please provide the patch you use and the perf command line which causes the kernel to panic? Also telling which kernel version and hardware system you are using would be helpful. Thanks, tglx