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] [day] [month] [year] [list]
Message-ID: <c823311c-7685-17fa-aa62-25746d768474@linux.intel.com>
Date:   Tue, 8 Jun 2021 15:50:52 -0400
From:   "Liang, Kan" <kan.liang@...ux.intel.com>
To:     Rikard Falkeborn <rikard.falkeborn@...il.com>
Cc:     Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Jiri Olsa <jolsa@...hat.com>,
        Namhyung Kim <namhyung@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Borislav Petkov <bp@...en8.de>, x86@...nel.org,
        "H. Peter Anvin" <hpa@...or.com>, linux-perf-users@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Alexander Antonov <alexander.antonov@...ux.intel.com>
Subject: Re: [PATCH 1/4] perf/x86/intel/uncore: Constify intel_uncore_ops



On 6/8/2021 3:17 PM, Rikard Falkeborn wrote:
> On Mon, Jun 07, 2021 at 03:09:11PM -0400, Liang, Kan wrote:
>>
>> On 6/5/2021 11:56 AM, Rikard Falkeborn wrote:
>>> These are not modified, so make them const to allow the compiler to put
>>> them in read-only memory.
>> For most of the cases, yes, but the ops are modified for the TGL/RKL. We may
>> want to create a read-only ops for the TGL/RKL as below, and make both
>> skl_uncore_msr_ops and rkl_uncore_msr_ops const as well.
>>
> Thanks for the feedback.
> 
> Yes, that was the odd one out, the commit message could have been
> clearer. What I meant above was "Constify all intel_uncore_ops that are
> not modified", which was all but skl_uncore_msr_ops. So the patch is
> correct, but in order to also constify skl_uncore_msr_ops, we could do
> as you suggested. Is it worth doing?

Since the patch set changes the intel_uncore_ops *ops to const, I think 
it's better to change them all at once. It will bring confusion if some 
of them are read-only but others can be modified.

> And if so, in a V2 of this patch,
> or as a follow-up patch?

Either is fine for me.

Thanks,
Kan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ