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: <3e2a52c5-791a-4e96-a768-8579ec841dd1@zytor.com>
Date: Wed, 9 Apr 2025 20:53:31 -0700
From: Xin Li <xin@...or.com>
To: "H. Peter Anvin" <hpa@...or.com>, Ingo Molnar <mingo@...nel.org>,
        linux-kernel@...r.kernel.org
Cc: Juergen Gross <jgross@...e.com>, Dave Hansen <dave.hansen@...el.com>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Peter Zijlstra <peterz@...radead.org>, Borislav Petkov <bp@...en8.de>,
        Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH 06/20] x86/msr: Standardize on 'u32' MSR indices in
 <asm/msr.h>

On 4/9/2025 8:29 PM, H. Peter Anvin wrote:
> On April 9, 2025 8:18:12 PM PDT, Xin Li <xin@...or.com> wrote:
>> A question NOT related to this patch set, the MSR write API prototype
>> defined in struct pv_cpu_ops as:
>>     void (*write_msr)(unsigned int msr, unsigned low, unsigned high);
>>
>> Will it be better to add "const" to its arguments?  I.e.,
>>     void (*write_msr)(const u32 msr, const u32 low, const u32 high);
>>
> 
> No, that makes no sense (it would have absolutely no effect.)
> 

For the API definition, yes, it has no effect.

While it makes the API definition more explicit, and its implementations
for native and Xen would be:

void {native,xen}_write_msr(const u32 msr, const u32 low, const u32 high)
{
     ....
}

not worth it at all?


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ