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:   Thu, 15 Nov 2018 16:33:24 +0100
From:   Jiri Olsa <jolsa@...hat.com>
To:     "Liang, Kan" <kan.liang@...ux.intel.com>
Cc:     acme@...nel.org, mingo@...hat.com, peterz@...radead.org,
        linux-kernel@...r.kernel.org, namhyung@...nel.org,
        ak@...ux.intel.com
Subject: Re: [PATCH 1/2] perf vendor events: Add stepping in CPUID string for
 x86

On Thu, Nov 15, 2018 at 10:18:27AM -0500, Liang, Kan wrote:

SNIP

> > > > +int strcmp_cpuid_str(const char *mapcpuid, const char *cpuid)
> > > > +{
> > > > +    regex_t re;
> > > > +    regmatch_t pmatch[1];
> > > > +    int match;
> > > > +    bool full_mapcpuid = is_full_cpuid(mapcpuid);
> > > > +    bool full_cpuid = is_full_cpuid(cpuid);
> > > 
> > > cpuid will be always full from now right? why do we need to check it?
> > > 
> > 
> > User may set cpuid by environment string "PERF_CPUID", which may not be
> > full format.
> > 
> > > also please move this to arch/x86/util/pmu.c
> > > so it matches the weak function object
> > 
> > Sure.
> > 
> 
> It looks like both pmu.c and header.c have cpuid related functions.
> For example,
> get_cpuid_str() has weak function in pmu.c. It's declaration in header.h.
> It's x86 specific function in x86/util/header.c
> get_cpuid() has weak function in header.c. It's declaration in header.h.
> It's x86 specific function in x86/util/header.c
> 
> It looks like most of the cpuid related functions are in header.c/h.
> I think it may be better to move all the cpuid related functions to
> header.c/h.
> 
> If it's OK for you, I will send a clean up patch later to move the weak
> functions strcmp_cpuid_str() and get_cpuid_str() to header.c
> 
> What do you think?

sounds good, thanks

jirka

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ