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: <20170622145930.GS13640@kernel.org>
Date:   Thu, 22 Jun 2017 11:59:30 -0300
From:   Arnaldo Carvalho de Melo <acme@...nel.org>
To:     Adrian Hunter <adrian.hunter@...el.com>
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

Em Wed, Jun 21, 2017 at 11:20:03PM +0300, Adrian Hunter escreveu:
> On 06/21/2017 08:29 PM, Arnaldo Carvalho de Melo wrote:
> > Em Wed, Jun 21, 2017 at 07:41:04PM +0300, Adrian Hunter escreveu:
> >> 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.

> > Oh, forgot about that, guess a comment right beside PERF_TYPE_MAX is in
> > demand :-\

> > So why not:

> > /*
> >  * 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.
> >  */
> > #define PERF_TYPE_SYNTH		(INT_MAX + 1L)

> > I.e. wouldn't be some arbitrarily huge value, but one right after what
> > was defined as the area for the dynamicly allocated PERF_TYPE_
> > "namespace" for PMUs, right?
 
> That seems fine.  Pedantically it should be (INT_MAX + 1U) otherwise it will
> be negative on a 32-bit system.

oh, not pedantic at all, thanks for the fix, will update your patch and
continue from there, Ingo already pulled everything up to this point,
btw.

- Arnaldo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ