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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8761x014xv.fsf@sejong.aot.lge.com>
Date:	Thu, 27 Jun 2013 14:46:36 +0900
From:	Namhyung Kim <namhyung@...nel.org>
To:	Robert Richter <rric@...nel.org>
Cc:	Ingo Molnar <mingo@...nel.org>, Borislav Petkov <bp@...en8.de>,
	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

Hi Robert,

On Wed, 26 Jun 2013 14:44:24 +0200, Robert Richter wrote:
> On 26.06.13 13:45:38, Ingo Molnar wrote:
>> [ How about to additional logic: attr.persistent=1 && attr.config==0 means 
>>   a new persistent event is created straight away - no ioctl is needed to 
>>   detach it explicitly. ]
>
> That's correct. We could also do the following:
>
> To connect to an existing event:
>
>  attr.type=<persistent-pmu> && attr.config==<event-id>
>
> (This might be harder to implement except the persistent event pmu
> type will be fix, PERF_TYPE_PERSISTENT=6.)
>
> To create a new persistent event:
>
>  attr.persistent=1 && attr=<some event setup: pmu, config, flags, etc>

How about using 2 bits for perfsistent flag, 1 for connecting to an
existing one, 2 for creating new one.


>> >  * The persistent event is opened with the syscall, the process gets a
>> >    new fd of the event.
>> >  * The process attaches to the event buffer with mmap.
>> 
>> Yes. And gets the pre-existing event and mmap buffer.
>
> That's what I mean.
>
> A problem here is that mmap'ed buffer size (number of pages) must be
> be equal to the pre-existing buffer size and thus to be known somehow.

What about also exporting the buffer size via sysfs pmu directory?

Thanks,
Namhyung
--
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