From: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Madhavan Srinivasan <maddy@linux.ibm.com>,
omosnace@redhat.com, acme@kernel.org, jolsa@kernel.org,
linuxppc-dev@lists.ozlabs.org, kan.liang@linux.intel.com
Subject: Re: [PATCH V2] powerpc/perf: Fix handling of privilege level checks in perf interrupt context
Date: Mon, 1 Mar 2021 07:52:27 +0530 [thread overview]
Message-ID: <47F7754C-9F97-4548-ACA4-E88CA1D393C1@linux.vnet.ibm.com> (raw)
In-Reply-To: <YDjA0giNnkfHeYM5@hirez.programming.kicks-ass.net>
> On 26-Feb-2021, at 3:05 PM, Peter Zijlstra <peterz@infradead.org> wrote:
>
> On Thu, Feb 25, 2021 at 05:10:39AM -0500, Athira Rajeev wrote:
>> diff --git a/arch/powerpc/perf/core-book3s.c b/arch/powerpc/perf/core-book3s.c
>> index 4b4319d8..c8be44c 100644
>> --- a/arch/powerpc/perf/core-book3s.c
>> +++ b/arch/powerpc/perf/core-book3s.c
>> @@ -222,7 +222,7 @@ static inline void perf_get_data_addr(struct perf_event *event, struct pt_regs *
>> if (!(mmcra & MMCRA_SAMPLE_ENABLE) || sdar_valid)
>> *addrp = mfspr(SPRN_SDAR);
>>
>> - if (is_kernel_addr(mfspr(SPRN_SDAR)) && perf_allow_kernel(&event->attr) != 0)
>> + if (is_kernel_addr(mfspr(SPRN_SDAR)) && event->attr.exclude_kernel)
>> *addrp = 0;
>> }
>>
>> @@ -507,7 +507,7 @@ static void power_pmu_bhrb_read(struct perf_event *event, struct cpu_hw_events *
>> * addresses, hence include a check before filtering code
>> */
>> if (!(ppmu->flags & PPMU_ARCH_31) &&
>> - is_kernel_addr(addr) && perf_allow_kernel(&event->attr) != 0)
>> + is_kernel_addr(addr) && event->attr.exclude_kernel)
>> continue;
>>
>> /* Branches are read most recent first (ie. mfbhrb 0 is
>
> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Thanks Peter for reviewing the patch.
Athira.
next prev parent reply other threads:[~2021-03-01 2:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-25 10:10 [PATCH V2] powerpc/perf: Fix handling of privilege level checks in perf interrupt context Athira Rajeev
2021-02-26 9:35 ` Peter Zijlstra
2021-03-01 2:22 ` Athira Rajeev [this message]
2021-03-14 10:01 ` Michael Ellerman
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=47F7754C-9F97-4548-ACA4-E88CA1D393C1@linux.vnet.ibm.com \
--to=atrajeev@linux.vnet.ibm.com \
--cc=acme@kernel.org \
--cc=jolsa@kernel.org \
--cc=kan.liang@linux.intel.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=omosnace@redhat.com \
--cc=peterz@infradead.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;
as well as URLs for NNTP newsgroup(s).