Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755148AbcJMOaR (ORCPT ); Thu, 13 Oct 2016 10:30:17 -0400 Received: from mail-qk0-f180.google.com ([209.85.220.180]:36518 "EHLO mail-qk0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751638AbcJMOaM (ORCPT ); Thu, 13 Oct 2016 10:30:12 -0400 MIME-Version: 1.0 In-Reply-To: <1bc0dce6-eb26-dbf5-dd0c-d36055f5f1fe@redhat.com> References: <1bc0dce6-eb26-dbf5-dd0c-d36055f5f1fe@redhat.com> From: Pavel Labath Date: Thu, 13 Oct 2016 15:29:17 +0100 Message-ID: Subject: Re: [PATCH 3/4] arm64: Allow hw watchpoint of length 3,5,6 and 7 To: Pratyush Anand , Yao Qi Cc: onestero@redhat.com, Will Deacon , Mark Rutland , linux-kernel@vger.kernel.org, Jan Kratochvil , linux-arm-kernel Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1081 Lines: 31 On 13 October 2016 at 11:22, Pratyush Anand wrote: > > > On Wednesday 12 October 2016 04:46 PM, Yao Qi wrote: >> >> On Wed, Oct 12, 2016 at 6:58 AM, Pratyush Anand wrote: >>> >>> Since, arm64 can support all offset within a double word limit. >>> Therefore, >>> now support other lengths within that range as well. >> >> >> How does ptracer (like GDB) detect kernel has already supported all byte >> address select values? I suppose ptrace(NT_ARM_HW_WATCH, ) with >> len is 3 or 5 fail on current kernel but is of success after your patches >> applied. >> > > Thanks for testing these patches. > > I do not know if we can know that other than the failure of > ptrace(PTRACE_SETREGSET, .., NT_ARM_HW_WATCH, ..). I do not see any such > option in `man ptrace`. That's how I intend to implement support for this in LLDB. if (setExactWatchpoint()) return true; // watchpoint set, new kernel if (setApproxWatchpoint()) return true; // watchpoint set, old kernel return false; // watchpoints not working seems straight-forward enough to me.