Re: [PATCH] perf tools: enable close-on-exec flag on perf file descriptor

2014-01-06 Thread Arnaldo Carvalho de Melo
Em Mon, Jan 06, 2014 at 10:01:35PM +0100, Yann Droneaud escreveu: > Hi, > > Le lundi 06 janvier 2014 à 11:43 -0300, Arnaldo Carvalho de Melo a > écrit : > > Em Mon, Jan 06, 2014 at 12:24:36PM +0100, Peter Zijlstra escreveu: > > > > acme, ACK? I was thinking I'd keep these two patches together so

Re: [PATCH] perf tools: enable close-on-exec flag on perf file descriptor

2014-01-06 Thread Yann Droneaud
Hi, Le lundi 06 janvier 2014 à 11:43 -0300, Arnaldo Carvalho de Melo a écrit : > Em Mon, Jan 06, 2014 at 12:24:36PM +0100, Peter Zijlstra escreveu: > > acme, ACK? I was thinking I'd keep these two patches together so the > > entire things lands in tip in one go? > > Nope, it should notice the EI

Re: [PATCH] perf tools: enable close-on-exec flag on perf file descriptor

2014-01-06 Thread Yann Droneaud
Hi, Le lundi 06 janvier 2014 à 08:52 -0800, Andi Kleen a écrit : > > AFAICT its got nothing to do with threaded or not, but only with exec() > > and we do in fact call exec() quite a lot in perf. > > > > It ensures we do not leak open perf FDs into our child processes. Now > > I'm not entirely su

Re: [PATCH] perf tools: enable close-on-exec flag on perf file descriptor

2014-01-06 Thread Andi Kleen
> AFAICT its got nothing to do with threaded or not, but only with exec() > and we do in fact call exec() quite a lot in perf. > > It ensures we do not leak open perf FDs into our child processes. Now > I'm not entirely sure how we do the exec these days but I think we were > good about not not le

Re: [PATCH] perf tools: enable close-on-exec flag on perf file descriptor

2014-01-06 Thread Peter Zijlstra
On Mon, Jan 06, 2014 at 08:27:54AM -0800, Andi Kleen wrote: > On Mon, Jan 06, 2014 at 11:51:25AM +0100, Yann Droneaud wrote: > > In a previous patch [1][2], flag PERF_FLAG_FD_CLOEXEC was > > added to perf_event_open(2) syscall to allows userspace > > to enable close-on-exec behavor atomically when

Re: [PATCH] perf tools: enable close-on-exec flag on perf file descriptor

2014-01-06 Thread Andi Kleen
On Mon, Jan 06, 2014 at 11:51:25AM +0100, Yann Droneaud wrote: > In a previous patch [1][2], flag PERF_FLAG_FD_CLOEXEC was > added to perf_event_open(2) syscall to allows userspace > to enable close-on-exec behavor atomically when creating > the file descriptor. > > This patch makes perf tools use

Re: [PATCH] perf tools: enable close-on-exec flag on perf file descriptor

2014-01-06 Thread Yann Droneaud
Hi, Le lundi 06 janvier 2014 à 15:22 +0100, Jiri Olsa a écrit : > On Mon, Jan 06, 2014 at 11:51:25AM +0100, Yann Droneaud wrote: > > In a previous patch [1][2], flag PERF_FLAG_FD_CLOEXEC was > > added to perf_event_open(2) syscall to allows userspace > > to enable close-on-exec behavor atomically

Re: [PATCH] perf tools: enable close-on-exec flag on perf file descriptor

2014-01-06 Thread Arnaldo Carvalho de Melo
Em Mon, Jan 06, 2014 at 12:24:36PM +0100, Peter Zijlstra escreveu: > On Mon, Jan 06, 2014 at 11:51:25AM +0100, Yann Droneaud wrote: > > In a previous patch [1][2], flag PERF_FLAG_FD_CLOEXEC was > > added to perf_event_open(2) syscall to allows userspace > > to enable close-on-exec behavor atomicall

Re: [PATCH] perf tools: enable close-on-exec flag on perf file descriptor

2014-01-06 Thread Jiri Olsa
On Mon, Jan 06, 2014 at 11:51:25AM +0100, Yann Droneaud wrote: > In a previous patch [1][2], flag PERF_FLAG_FD_CLOEXEC was > added to perf_event_open(2) syscall to allows userspace > to enable close-on-exec behavor atomically when creating > the file descriptor. > > This patch makes perf tools use

Re: [PATCH] perf tools: enable close-on-exec flag on perf file descriptor

2014-01-06 Thread Peter Zijlstra
On Mon, Jan 06, 2014 at 11:51:25AM +0100, Yann Droneaud wrote: > In a previous patch [1][2], flag PERF_FLAG_FD_CLOEXEC was > added to perf_event_open(2) syscall to allows userspace > to enable close-on-exec behavor atomically when creating > the file descriptor. > > This patch makes perf tools use