linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
To: Tvrtko Ursulin <tursulin@ursulin.net>
Cc: linux-kernel@vger.kernel.org,
	Tvrtko Ursulin <tvrtko.ursulin@intel.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung@kernel.org>,
	Madhavan Srinivasan <maddy@linux.vnet.ibm.com>,
	Andi Kleen <ak@linux.intel.com>,
	Alexey Budankov <alexey.budankov@linux.intel.com>,
	x86@kernel.org, Ravi Bangoria <ravi.bangoria@linux.ibm.com>
Subject: Re: [RFC 2/4] perf: Pass pmu pointer to perf_paranoid_* helpers
Date: Tue, 3 Jul 2018 15:54:16 +0530	[thread overview]
Message-ID: <5b618e5f-0dcd-5acb-96a0-a0560815c0d7@linux.ibm.com> (raw)
In-Reply-To: <20180626153642.5587-3-tvrtko.ursulin@linux.intel.com>

Hi Tvrtko,

> @@ -199,7 +199,7 @@ static inline void perf_get_data_addr(struct pt_regs *regs, u64 *addrp)
>  	if (!(mmcra & MMCRA_SAMPLE_ENABLE) || sdar_valid)
>  		*addrp = mfspr(SPRN_SDAR);
>  
> -	if (perf_paranoid_kernel() && !capable(CAP_SYS_ADMIN) &&
> +	if (perf_paranoid_kernel(ppmu) && !capable(CAP_SYS_ADMIN) &&
>  		is_kernel_addr(mfspr(SPRN_SDAR)))
>  		*addrp = 0;
>  }

This patch fails for me on powerpc:

arch/powerpc/perf/core-book3s.c: In function ‘perf_get_data_addr’:
arch/powerpc/perf/core-book3s.c:202:27: error: passing argument 1 of ‘perf_paranoid_kernel’ from incompatible pointer type [-Werror=incompatible-pointer-types]
  if (perf_paranoid_kernel(ppmu) && !capable(CAP_SYS_ADMIN) &&
                           ^~~~
In file included from arch/powerpc/perf/core-book3s.c:13:0:
./include/linux/perf_event.h:1191:20: note: expected ‘const struct pmu *’ but argument is of type ‘struct power_pmu *’
 static inline bool perf_paranoid_kernel(const struct pmu *pmu)
                    ^~~~~~~~~~~~~~~~~~~~
arch/powerpc/perf/core-book3s.c: In function ‘power_pmu_bhrb_read’:
arch/powerpc/perf/core-book3s.c:470:8: error: too few arguments to function ‘perf_paranoid_kernel’
    if (perf_paranoid_kernel() && !capable(CAP_SYS_ADMIN) &&
        ^~~~~~~~~~~~~~~~~~~~
In file included from arch/powerpc/perf/core-book3s.c:13:0:
./include/linux/perf_event.h:1191:20: note: declared here
 static inline bool perf_paranoid_kernel(const struct pmu *pmu)
                    ^~~~~~~~~~~~~~~~~~~~
  CC      net/ipv6/route.o


  reply	other threads:[~2018-07-03 10:24 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-26 15:36 [RFC 0/4] perf: Per PMU access controls (paranoid setting) Tvrtko Ursulin
2018-06-26 15:36 ` [RFC 1/4] perf: Move some access checks later in perf_event_open Tvrtko Ursulin
2018-06-26 17:24   ` Alexey Budankov
2018-06-27  9:00     ` Tvrtko Ursulin
2018-06-26 15:36 ` [RFC 2/4] perf: Pass pmu pointer to perf_paranoid_* helpers Tvrtko Ursulin
2018-07-03 10:24   ` Ravi Bangoria [this message]
2018-07-03 10:28     ` Tvrtko Ursulin
2018-06-26 15:36 ` [RFC 3/4] perf: Allow per PMU access control Tvrtko Ursulin
2018-06-26 17:25   ` Alexey Budankov
2018-06-27  9:15     ` Tvrtko Ursulin
2018-06-27  9:47       ` Alexey Budankov
2018-06-27 10:05         ` Tvrtko Ursulin
2018-06-27 12:58           ` Alexey Budankov
2018-06-26 15:36 ` [RFC 4/4] perf Documentation: Document the per PMU perf_event_paranoid interface Tvrtko Ursulin
2018-06-27 20:46 ` [RFC 0/4] perf: Per PMU access controls (paranoid setting) Jiri Olsa
2018-09-12  6:52 ` Alexey Budankov
2018-09-12  8:41   ` Tvrtko Ursulin
2018-09-12 16:19     ` Alexey Budankov

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=5b618e5f-0dcd-5acb-96a0-a0560815c0d7@linux.ibm.com \
    --to=ravi.bangoria@linux.ibm.com \
    --cc=acme@kernel.org \
    --cc=ak@linux.intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=alexey.budankov@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maddy@linux.vnet.ibm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=tursulin@ursulin.net \
    --cc=tvrtko.ursulin@intel.com \
    --cc=x86@kernel.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).