On 04.06.13 11:35:22, Borislav Petkov wrote:
> On Tue, Jun 04, 2013 at 11:19:21AM +0200, Jiri Olsa wrote:
> > 'cpu' did not pass ay check here..
>
> Oh, I see.
>
> You mean something like
>
> if (cpu < NR_CPUS && cpu_online(cpu))
In perf_event_alloc() there is:
if ((unsigned)cpu
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
On Tue, Jun 04, 2013 at 11:19:21AM +0200, Jiri Olsa wrote:
> 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;
>
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.
> (unrelated to this patch, but I couldn't f
On Fri, May 31, 2013 at 10:47:36AM +0200, Robert Richter wrote:
> From: Robert Richter
SNIP
> out:
> mutex_unlock(&per_cpu(pers_events_lock, cpu));
> }
> @@ -182,18 +195,31 @@ fail:
> int perf_get_persistent_event_fd(unsigned cpu, struct perf_event_attr *attr)
> {
> struct pers_e
From: Robert Richter
Usually a fd close leads to the release of the event too. For
persistent events this is different as the events should be
permanently enabled in the system. Using reference counting to avoid
releasing an event during a fd close. This also allows it to have
multiple users (ope
6 matches
Mail list logo