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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a2bdcbaf-2a00-4b12-84e9-14c40610d599@zytor.com>
Date: Fri, 2 May 2025 10:50:02 -0700
From: Xin Li <xin@...or.com>
To: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
        mingo@...hat.com
Cc: LKML <linux-kernel@...r.kernel.org>, kvm@...r.kernel.org,
        linux-perf-users@...r.kernel.org, linux-hyperv@...r.kernel.org,
        virtualization@...ts.linux.dev, linux-pm@...r.kernel.org,
        linux-edac@...r.kernel.org, xen-devel@...ts.xenproject.org,
        linux-acpi@...r.kernel.org, linux-hwmon@...r.kernel.org,
        Netdev <netdev@...r.kernel.org>, platform-driver-x86@...r.kernel.org,
        tglx@...utronix.de, bp@...en8.de, dave.hansen@...ux.intel.com,
        x86@...nel.org, hpa@...or.com, acme@...nel.org, jgross@...e.com,
        andrew.cooper3@...rix.com, peterz@...radead.org, namhyung@...nel.org,
        mark.rutland@....com, alexander.shishkin@...ux.intel.com,
        jolsa@...nel.org, irogers@...gle.com, adrian.hunter@...el.com,
        kan.liang@...ux.intel.com, wei.liu@...nel.org, ajay.kaher@...adcom.com,
        bcm-kernel-feedback-list@...adcom.com, tony.luck@...el.com,
        pbonzini@...hat.com, vkuznets@...hat.com, seanjc@...gle.com,
        luto@...nel.org, boris.ostrovsky@...cle.com, kys@...rosoft.com,
        haiyangz@...rosoft.com, decui@...rosoft.com,
        dapeng1.mi@...ux.intel.com
Subject: Re: [PATCH v4A 01/15] x86/msr: Add missing includes of <asm/msr.h>

On 5/2/2025 6:13 AM, Ilpo Järvinen wrote:
>> diff --git a/arch/x86/kernel/trace_clock.c b/arch/x86/kernel/trace_clock.c
>> index b8e7abe00b06..708d61743d15 100644
>> --- a/arch/x86/kernel/trace_clock.c
>> +++ b/arch/x86/kernel/trace_clock.c
>> @@ -4,7 +4,7 @@
>>    */
>>   #include <asm/trace_clock.h>
>>   #include <asm/barrier.h>
>> -#include <asm/msr.h>
>> +#include <asm/tsc.h>
> Does this change belong to this patch?
> 
> It might even cause a build failure until the second patch which moves
> the tsc related things to the other file (unless there's indirect include
> path to asm/msr.h).

Ah, you're right as I have separated the relocation of rdtsc_ordered()
into a following patch.

> 
>> diff --git a/arch/x86/lib/kaslr.c b/arch/x86/lib/kaslr.c
>> index a58f451a7dd3..b5893928d55c 100644
>> --- a/arch/x86/lib/kaslr.c
>> +++ b/arch/x86/lib/kaslr.c
>> @@ -8,7 +8,7 @@
>>    */
>>   #include <asm/asm.h>
>>   #include <asm/kaslr.h>
>> -#include <asm/msr.h>
>> +#include <asm/tsc.h>
> Same thing here.
> 
>>   #include <asm/archrandom.h>
>>   #include <asm/e820/api.h>
>>   #include <asm/shared/io.h>
>> diff --git a/drivers/accel/habanalabs/common/habanalabs_ioctl.c b/drivers/accel/habanalabs/common/habanalabs_ioctl.c
>> index 8729a0c57d78..dc80ca921d90 100644
>> --- a/drivers/accel/habanalabs/common/habanalabs_ioctl.c
>> +++ b/drivers/accel/habanalabs/common/habanalabs_ioctl.c
>> @@ -17,8 +17,6 @@
>>   #include <linux/uaccess.h>
>>   #include <linux/vmalloc.h>
>>   
>> -#include <asm/msr.h>
>> -
> I suggested making a separate patch out of these removals. Currently you
> do them without any clear warning in the changelog which only talks about
> adding asm/msr.h.
>

I didn't want to add an extra patch to the v4 series, but I really
should have mentioned the removal at least.


>> diff --git a/drivers/acpi/processor_throttling.c b/drivers/acpi/processor_throttling.c
>> index 00d045e5f524..ecd7fe256153 100644
>> --- a/drivers/acpi/processor_throttling.c
>> +++ b/drivers/acpi/processor_throttling.c
>> @@ -18,9 +18,13 @@
>>   #include <linux/sched.h>
>>   #include <linux/cpufreq.h>
>>   #include <linux/acpi.h>
>> +#include <linux/uaccess.h>
>>   #include <acpi/processor.h>
>>   #include <asm/io.h>
>> -#include <linux/uaccess.h>
>> +#include <asm/asm.h>
> ???

Damn me!

Not to find an excuse but I guess I got somewhat tired when doing it.

> 
>> +#ifdef CONFIG_X86
>> +#include <asm/msr.h>
>> +#endif
> 
> I really appreciate you took the effort to do this change the correct
> way! 🙂

Same here for pushing it the right direction!


Hi Ingo,

Since you *wisely* didn't remove msr.h from tsc.h, maybe you could just
zap this patch and I will send an afterwards patch set to replace this
patch?

Apology for the noise.

Thanks!
     Xin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ