[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <d0d3619f-3633-54f7-f0a3-563801867c7b@linux.ibm.com>
Date: Thu, 5 Sep 2019 09:26:44 +0530
From: Ravi Bangoria <ravi.bangoria@...ux.ibm.com>
To: "Naveen N. Rao" <naveen.n.rao@...ux.vnet.ibm.com>,
mpe@...erman.id.au
Cc: mikey@...ling.org, benh@...nel.crashing.org,
christophe.leroy@....fr, linux-kernel@...r.kernel.org,
linuxppc-dev@...ts.ozlabs.org, npiggin@...il.com, paulus@...ba.org,
Ravi Bangoria <ravi.bangoria@...ux.ibm.com>
Subject: Re: [PATCH v3 2/3] Powerpc64/Watchpoint: Don't ignore extraneous
exceptions
On 9/4/19 8:12 PM, Naveen N. Rao wrote:
> Ravi Bangoria wrote:
>> On Powerpc64, watchpoint match range is double-word granular. On
>> a watchpoint hit, DAR is set to the first byte of overlap between
>> actual access and watched range. And thus it's quite possible that
>> DAR does not point inside user specified range. Ex, say user creates
>> a watchpoint with address range 0x1004 to 0x1007. So hw would be
>> configured to watch from 0x1000 to 0x1007. If there is a 4 byte
>> access from 0x1002 to 0x1005, DAR will point to 0x1002 and thus
>> interrupt handler considers it as extraneous, but it's actually not,
>> because part of the access belongs to what user has asked. So, let
>> kernel pass it on to user and let user decide what to do with it
>> instead of silently ignoring it. The drawback is, it can generate
>> false positive events.
>
> I think you should do the additional validation here, instead of generating false positives. You should be able to read the instruction, run it through analyse_instr(), and then use OP_IS_LOAD_STORE() and GETSIZE() to understand the access range. This can be used to then perform a better match against what the user asked for.
Ok. Let me see how feasible that is.
But patch 1 and 3 are independent of this and can still go in. mpe?
-Ravi
Powered by blists - more mailing lists