From: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
To: "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com>, mpe@ellerman.id.au
Cc: mikey@neuling.org, benh@kernel.crashing.org,
christophe.leroy@c-s.fr, linux-kernel@vger.kernel.org,
linuxppc-dev@lists.ozlabs.org, npiggin@gmail.com,
paulus@samba.org, Ravi Bangoria <ravi.bangoria@linux.ibm.com>
Subject: Re: [PATCH v3 2/3] Powerpc64/Watchpoint: Don't ignore extraneous exceptions
Date: Thu, 5 Sep 2019 09:26:44 +0530 [thread overview]
Message-ID: <d0d3619f-3633-54f7-f0a3-563801867c7b@linux.ibm.com> (raw)
In-Reply-To: <1567608022.j44gajn34z.naveen@linux.ibm.com>
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
next prev parent reply other threads:[~2019-09-05 3:56 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-10 4:54 [PATCH v3 0/3] Powerpc64/Watchpoint: Few important fixes Ravi Bangoria
2019-07-10 4:54 ` [PATCH v3 1/3] Powerpc64/Watchpoint: Fix length calculation for unaligned target Ravi Bangoria
2019-07-10 4:54 ` [PATCH v3 2/3] Powerpc64/Watchpoint: Don't ignore extraneous exceptions Ravi Bangoria
2019-07-10 6:27 ` Christophe Leroy
2019-07-10 6:38 ` Ravi Bangoria
2019-09-04 14:42 ` Naveen N. Rao
2019-09-05 3:56 ` Ravi Bangoria [this message]
2019-07-10 4:54 ` [PATCH v3 3/3] Powerpc64/Watchpoint: Rewrite ptrace-hwbreak.c selftest Ravi Bangoria
2019-08-28 6:14 ` Christophe Leroy
2019-09-04 9:10 ` Ravi Bangoria
2019-08-06 3:27 ` [PATCH v3 0/3] Powerpc64/Watchpoint: Few important fixes Ravi Bangoria
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d0d3619f-3633-54f7-f0a3-563801867c7b@linux.ibm.com \
--to=ravi.bangoria@linux.ibm.com \
--cc=benh@kernel.crashing.org \
--cc=christophe.leroy@c-s.fr \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mikey@neuling.org \
--cc=mpe@ellerman.id.au \
--cc=naveen.n.rao@linux.vnet.ibm.com \
--cc=npiggin@gmail.com \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®