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]
Date:	Fri, 5 Sep 2014 11:07:56 -0300
From:	Arnaldo Carvalho de Melo <acme@...nel.org>
To:	Adrian Hunter <adrian.hunter@...el.com>
Cc:	Jiri Olsa <jolsa@...hat.com>, linux-kernel@...r.kernel.org,
	David Ahern <dsahern@...il.com>,
	Don Zickus <dzickus@...hat.com>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Mike Galbraith <efault@....de>,
	Namhyung Kim <namhyung@...nel.org>,
	Paul Mackerras <paulus@...ba.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Stephane Eranian <eranian@...gle.com>
Subject: Re: [PATCH 04/10] perf record: Filter out POLLHUP'ed file descriptors

Em Fri, Sep 05, 2014 at 11:42:59AM +0300, Adrian Hunter escreveu:
> On 09/04/2014 06:19 PM, Arnaldo Carvalho de Melo wrote:
> > Em Thu, Sep 04, 2014 at 03:32:08PM +0300, Adrian Hunter escreveu:
> No I was meaning something different. For example, 'perf record' opens an
> event for 2 processes per-cpu and gets 4 file descriptors:
 
> 	task1	task2
> cpu0	fd0	fd1
> cpu1	fd2	fd3
 
> Now, perf record will mmap fd0 and fd2 and set-output fd1->fd0
> and fd3->fd2.
 
> pollfds includes only fd0 and fd2.
 
> But if task2 exits, the POLLHUP will appear on fd1 and fd3.

So? We are not interested in fd1 and fd3, since all our reading is done
on fd0 and fd2 mmaps, no?

I.e. when we ask the kernel to point fd B to fd A's mmap (what you
called set-output) and fd B inserts an event into fd A's mmap ring
buffer, we get fd A poll return as POLLRD, no?

Have to check... Otherwise we would have to poll all fds all the time,
not just the ones mmaping, right?

> I think Jiri's patchset changed pollfds to include all fds for that reason.

It did? I have to look again, probably went together with other changes,
has it?

- Arnaldo
--
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