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: <3b545c1e-dd86-4ca7-b3fd-6f6ff87bddb3@linux.microsoft.com>
Date: Fri, 27 Dec 2024 09:25:16 -0800
From: Roman Kisel <romank@...ux.microsoft.com>
To: Easwar Hariharan <eahariha@...ux.microsoft.com>,
 nunodasneves@...ux.microsoft.com
Cc: hpa@...or.com, kys@...rosoft.com, bp@...en8.de,
 dave.hansen@...ux.intel.com, decui@...rosoft.com, haiyangz@...rosoft.com,
 mingo@...hat.com, mhklinux@...look.com, tglx@...utronix.de,
 tiala@...rosoft.com, wei.liu@...nel.org, linux-hyperv@...r.kernel.org,
 linux-kernel@...r.kernel.org, x86@...nel.org, apais@...rosoft.com,
 benhill@...rosoft.com, ssengar@...rosoft.com, sunilmut@...rosoft.com,
 vdso@...bites.dev
Subject: Re: [PATCH v3 1/5] hyperv: Define struct hv_output_get_vp_registers



On 12/26/2024 2:11 PM, Easwar Hariharan wrote:
> On 12/26/2024 1:31 PM, Roman Kisel wrote:

[...]

>> +#else
>> +	#error "This architecture is not supported"
>> +#endif
>> +};
> 
> I don't love the #error for unsupported architectures when Kconfig takes
> care of that for us, but I suppose it's for completeness since the arm64
> members have to be conditioned on CONFIG_ARM64?
> 
Felt right to do that, but because it raises questions, it should carry
a comment or be removed as, if you pointed out, Kconfig is in charge of
that kind of validation. As Kconfig permits Hyper-V on the correct set
of arch'es, the best choice would be to remove I think.

>> +
>> +/* NOTE: Linux helper struct - NOT from Hyper-V code */
>> +struct hv_output_get_vp_registers {
>> +	DECLARE_FLEX_ARRAY(union hv_register_value, values);
>>   };
> 
> I'm not super familiar with DECLARE_FLEX_ARRAY() but it appears this
> needs to be wrapped in an anonymous struct at the least per this comment
> for the definition of DECLARE_FLEX_ARRAY()
> 
>> * In order to have a flexible array member [...] alone in a
>> * struct, it needs to be wrapped in an anonymous struct with at least 1
>> * named member, but that member can be empty.
> 
> Nuno, since you seem to be more familiar, can you provide some guidance?
I will wrap the struct member of the documentation requires, not to
make the code look suspicious.

> 
> Thanks,
> Easwar

-- 
Thank you,
Roman


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ