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: <66cdc4e6-58a4-e365-8a76-112daf71baf9@intel.com>
Date:   Wed, 21 Jun 2017 19:41:04 +0300
From:   Adrian Hunter <adrian.hunter@...el.com>
To:     Arnaldo Carvalho de Melo <acme@...nel.org>
Cc:     Andi Kleen <ak@...ux.intel.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Jiri Olsa <jolsa@...nel.org>,
        Namhyung Kim <namhyung@...nel.org>,
        Wang Nan <wangnan0@...wei.com>,
        David Ahern <dsahern@...il.com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH V3 20/37] perf script: Add 'synth' event type for
 synthesized events

On 06/21/2017 04:51 PM, Arnaldo Carvalho de Melo wrote:
> Em Wed, Jun 21, 2017 at 01:17:19PM +0300, Adrian Hunter escreveu:
>> +++ b/tools/perf/util/event.h
>> @@ -252,6 +252,9 @@ enum auxtrace_error_type {
>>        PERF_AUXTRACE_ERROR_MAX
>> };
> 
>> +/* Attribute type for custom synthesized events */
>> +#define PERF_TYPE_SYNTH		3000000000
> 
> Why don't you make it PERF_TYPE_MAX and bump PERF_TYPE_MAX by one? I.e.
> this way we have what can be in attr.type in a nice enumeration, can
> validate it more easily (attr.type < PERF_TYPE_MAX) and will not need to 
> do those conversions to/from OUTPUT_TYPE_/PERF_TYPE_).

PERF_TYPE_ is dynamically allocated above PERF_TYPE_MAX for PMUs.  Presently
perf_pmu_register() calls idr_alloc() with end=0 which limits the allocation
to INT_MAX.

> Peter: now its not the PERF_RECORD_ namespace that userspaces want a
> chunk of, its PERF_TYPE_, which so far has been pretty stable, grabing
> _one_ for event synthesizing things like Intel PT (and ARM's coresight,
> I think) directly at include/uapi/linux/perf_event.h's perf_type_id enum
> looks cleaner, no?


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ