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: <4a87af74-7656-491a-8bab-48074a4341a2@open-hieco.net>
Date: Mon, 8 Dec 2025 16:06:59 +0800
From: Xiaochen Shen <shenxiaochen@...n-hieco.net>
To: Fenghua Yu <fenghuay@...dia.com>, tony.luck@...el.com,
 reinette.chatre@...el.com, bp@...en8.de, shuah@...nel.org,
 skhan@...uxfoundation.org
Cc: babu.moger@....com, james.morse@....com, Dave.Martin@....com,
 x86@...nel.org, linux-kernel@...r.kernel.org,
 linux-kselftest@...r.kernel.org, shenxiaochen@...n-hieco.net
Subject: Re: [PATCH v2 3/3] selftests/resctrl: Fix non-contiguous CBM check
 for Hygon

Hi Fenghua,

On 12/6/2025 3:39 AM, Fenghua Yu wrote:
>>     static bool arch_supports_noncont_cat(const struct resctrl_test *test)
>>   {
>> -    /* AMD always supports non-contiguous CBM. */
>> -    if (get_vendor() == ARCH_AMD)
>> +    /* AMD and Hygon always supports non-contiguous CBM. */
>> +    if (get_vendor() == ARCH_AMD || get_vendor() == ARCH_HYGON)
> 
> nit. Better to avoid call get_vendor() twice (or even more in the future)?
> 
> unsigned int vendor_id = get_vendor();
> 
> if (vendor_id == ARCH_AMD || vendor_id == ARCH_HYGON)

Thank you! I will update the code as you suggested.

> 
> 
>>           return true;
>>     #if defined(__i386__) || defined(__x86_64__) /* arch */
> Reviewed-by: Fenghua Yu <fenghuay@...dia.com>

Thank you!


> 
> Thanks.
> 
> -Fenghua


Best regards,
Xiaochen Shen

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ