[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130604091921.GC1103@krava.brq.redhat.com>
Date: Tue, 4 Jun 2013 11:19:21 +0200
From: Jiri Olsa <jolsa@...hat.com>
To: Borislav Petkov <bp@...en8.de>
Cc: Robert Richter <rric@...nel.org>, Ingo Molnar <mingo@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
linux-kernel@...r.kernel.org,
Robert Richter <robert.richter@...xeda.com>
Subject: Re: [PATCH 16/16] perf, persistent: Allow multiple users for an event
On Tue, Jun 04, 2013 at 10:20:42AM +0200, Borislav Petkov wrote:
> On Mon, Jun 03, 2013 at 03:49:25PM +0200, Jiri Olsa wrote:
> > maybe check for valid cpu, since perf_get_persistent_event_fd is
> > called directly from syscall allowing anything in cpu
>
> That should be fine - we're traversing a per-cpu list of events there.
hum, can't see it:
perf SYSCALL:
...
return perf_get_persistent_event_fd(cpu, &attr);
...
int perf_get_persistent_event_fd(unsigned cpu, struct perf_event_attr *attr)
{
struct pers_event_desc *desc;
struct perf_event *event;
int event_fd = -ENODEV;
mutex_lock(&per_cpu(pers_events_lock, cpu));
...
'cpu' did not pass ay check here..
jirka
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists