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  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:   Tue, 11 Aug 2020 20:51:31 -0700
From:   Joe Perches <joe@...ches.com>
To:     Zhang Rui <rui.zhang@...el.com>, peterz@...radead.org,
        mingo@...hat.com, acme@...nel.org
Cc:     linux-pm@...r.kernel.org, mark.rutland@....com,
        alexander.shishkin@...ux.intel.com, jolsa@...hat.com,
        namhyung@...nel.org, linux-kernel@...r.kernel.org,
        kan.liang@...ux.intel.com, len.brown@...el.com, rafael@...nel.org
Subject: Re: [PATCH v2 2/3] perf/x86/rapl: Support multiple rapl unit quirks

On Wed, 2020-08-12 at 11:29 +0800, Zhang Rui wrote:
> Hi,
> 
> Thanks for reviewing.
> 
> On Tue, 2020-08-11 at 11:19 -0700, Joe Perches wrote:
> > On Tue, 2020-08-11 at 23:31 +0800, Zhang Rui wrote:
> > > There will be more platforms with different fixed energy units.
> > > Enhance the code to support different rapl unit quirks for
> > > different
> > > platforms.
> > 
> > This seems like one quirk per platform.
> > 
> > Should multiple quirks on individual platforms be supported?
> > 
> enum rapl_unit_quirk is just used as a flag.
> multiple quirks can be deployed with the same flag, just like what I
> did in patch 3/3.
> Also different platforms can either have different flags or share the
> same flag.

Sure, but it does lead to possible code duplication in the quirks
as enums can not be combined like bit flags.

No worries, your code, your choice...

Powered by blists - more mailing lists