lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140811122212.GA26811@krava.brq.redhat.com>
Date:	Mon, 11 Aug 2014 14:22:12 +0200
From:	Jiri Olsa <jolsa@...hat.com>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	Jiri Olsa <jolsa@...nel.org>, linux-kernel@...r.kernel.org,
	Adrian Hunter <adrian.hunter@...el.com>,
	Arnaldo Carvalho de Melo <acme@...nel.org>,
	Corey Ashford <cjashfor@...ux.vnet.ibm.com>,
	David Ahern <dsahern@...il.com>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Ingo Molnar <mingo@...nel.org>,
	Jean Pihet <jean.pihet@...aro.org>,
	Namhyung Kim <namhyung@...nel.org>,
	Paul Mackerras <paulus@...ba.org>
Subject: Re: [PATCH 01/20] perf: Add PERF_EVENT_STATE_EXIT state for events
 with exited task

On Mon, Aug 11, 2014 at 02:01:02PM +0200, Peter Zijlstra wrote:

SNIP

> >  	struct perf_event *event = file->private_data;
> >  	struct ring_buffer *rb;
> > -	unsigned int events = POLL_HUP;
> > +	unsigned int events = POLLHUP;
> 
> Should not that be an independent bugfix? It is a silly little thing
> indeed, but it does change behaviour.

ok, I'll send it in a separate patch plus your suggestion
below in v2

> 
> >  	poll_wait(file, &event->waitq, wait);
> > +
> > +	if (event->state == PERF_EVENT_STATE_EXIT)
> > +		return POLLHUP;
> > +
> 
> So, seeing how events is already POLLHUP here, why not return that?
> 
> >  	/*
> >  	 * Pin the event->rb by taking event->mmap_mutex; otherwise
> >  	 * perf_event_set_output() can swizzle our rb and make us miss wakeups.
> > @@ -7484,6 +7489,9 @@ __perf_event_exit_task(struct perf_event *child_event,
> >  	if (child_event->parent) {
> >  		sync_child_event(child_event, child);
> >  		free_event(child_event);
> > +	} else {
> > +		child_event->state = PERF_EVENT_STATE_EXIT;
> > +		perf_event_wakeup(child_event);
> >  	}
> >  }
> 
> In any case, ACK on this patch, I'll assume you want to take the lot
> through acme seeing how its mostly tools bits.

yep

thanks,
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ