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: <3b2e7170-1229-4981-8905-02b16bd2a85d@linux.microsoft.com>
Date: Fri, 4 Oct 2024 17:07:53 -0700
From: Nuno Das Neves <nunodasneves@...ux.microsoft.com>
To: Stanislav Kinsburskii <skinsburskii@...ux.microsoft.com>
Cc: linux-hyperv@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
 linux-kernel@...r.kernel.org, kvm@...r.kernel.org, iommu@...ts.linux.dev,
 netdev@...r.kernel.org, linux-pci@...r.kernel.org,
 linux-arch@...r.kernel.org, virtualization@...ts.linux.dev,
 kys@...rosoft.com, haiyangz@...rosoft.com, wei.liu@...nel.org,
 decui@...rosoft.com, catalin.marinas@....com, will@...nel.org,
 luto@...nel.org, tglx@...utronix.de, mingo@...hat.com, bp@...en8.de,
 dave.hansen@...ux.intel.com, x86@...nel.org, hpa@...or.com,
 seanjc@...gle.com, pbonzini@...hat.com, peterz@...radead.org,
 daniel.lezcano@...aro.org, joro@...tes.org, robin.murphy@....com,
 davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
 pabeni@...hat.com, lpieralisi@...nel.org, kw@...ux.com, robh@...nel.org,
 bhelgaas@...gle.com, arnd@...db.de, sgarzare@...hat.com,
 jinankjain@...ux.microsoft.com, muminulrussell@...il.com,
 mukeshrathor@...rosoft.com
Subject: Re: [PATCH 5/5] hyperv: Use hvhdk.h instead of hyperv-tlfs.h in
 Hyper-V code

On 10/4/2024 8:58 AM, Stanislav Kinsburskii wrote:
> Hi Nuno,
> 
> On Thu, Oct 03, 2024 at 12:51:04PM -0700, Nuno Das Neves wrote:
>> diff --git a/arch/arm64/hyperv/hv_core.c b/arch/arm64/hyperv/hv_core.c
>> index 9d1969b875e9..bb7f28f74bf4 100644
>> --- a/arch/arm64/hyperv/hv_core.c
>> +++ b/arch/arm64/hyperv/hv_core.c
>> @@ -14,6 +14,7 @@
>>  #include <linux/arm-smccc.h>
>>  #include <linux/module.h>
>>  #include <asm-generic/bug.h>
>> +#define HYPERV_NONTLFS_HEADERS
>>  #include <asm/mshyperv.h>
>>  
> 
> Perhaps it would be cleaner to introduce a new header file to be
> included, containing the new define and including <asm/mshyperv.h> instead.
> 
> Stas

If I understand correctly, you're suggesting adding another stub named e.g.
"hv_mshyperv.h", containing:

#define HYPERV_NONTLFS_HEADERS
#include<asm/mshyperv.h>

Then in the roughly 24 places in this patch where we have:

+#define HYPERV_NONTLFS_HEADERS

Instead, we'd have:

-#include <asm/mshyperv.h>
+#include <hyperv/hv_mshyperv.h>

I suppose the current version is a bit opaque - it's not immediately clear
why HYPERV_NONTLFs_HEADERS is defined, and that it must be defined before
including asm/mshyperv.h - someone reading the code would have to go find
hv_defs.h to puzzle that out.

This improves the situation slightly by associating the #define with
asm/mshyperv.h. I'll consider it for v2, thanks!

Nuno

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ