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: <20130626081223.GB21788@rric.localhost>
Date:	Wed, 26 Jun 2013 10:12:23 +0200
From:	Robert Richter <rric@...nel.org>
To:	Borislav Petkov <bp@...en8.de>
Cc:	Ingo Molnar <mingo@...nel.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Arnaldo Carvalho de Melo <acme@...radead.org>,
	Jiri Olsa <jolsa@...hat.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 00/14] perf, persistent: Kernel updates for perf tool
 integration

On 25.06.13 21:16:54, Borislav Petkov wrote:
> On Tue, Jun 25, 2013 at 07:57:29PM +0200, Robert Richter wrote:
> > But what options there are to detach the event from all processes and
> > make it persistent?
> 
> Something like this:
> 
> 	ioctl(fd, PERF_EVENT_IOC_DETACH, 0);
> 
> I guess this could simply set the persistent flag so that the rest of
> the perf code knows not to destroy event buffers etc.
> 
> I don't have an idea about the reattaching though because you don't have
> a file descriptor there.
> 
> Maybe for that we could really use the sys_perf_event_open() with flags
> set to PERF_FLAG_PERSISTENT to note that we want to reattach to the
> persistent event instead of opening a new one.

We get a new fd by opening the persistent event with the syscall.
There would be 2 new ioctls:

 ioctl(fd, PERF_EVENT_IOC_DETACH, 0);
 ioctl(fd, PERF_EVENT_IOC_ATTACH, 0);

This would be fine and reuses existing infrastructure.

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