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] [day] [month] [year] [list]
Date:   Thu, 10 Mar 2022 13:32:18 -0700
From:   Shuah Khan <skhan@...uxfoundation.org>
To:     "tan.shaopeng@...itsu.com" <tan.shaopeng@...itsu.com>,
        Fenghua Yu <fenghua.yu@...el.com>,
        Reinette Chatre <reinette.chatre@...el.com>,
        Shuah Khan <shuah@...nel.org>
Cc:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-kselftest@...r.kernel.org" <linux-kselftest@...r.kernel.org>,
        Shuah Khan <skhan@...uxfoundation.org>
Subject: Re: [PATCH v3] selftests/resctrl: Print a message if the result of
 MBM&CMT tests is failed on Intel cpu

On 3/10/22 1:18 AM, tan.shaopeng@...itsu.com wrote:
> Hi Shuah,
> 
>> On 3/4/22 3:39 AM, Shaopeng Tan wrote:

>> Also need to be rebased on mainline latest
> 
> I will rebased on mainline latest in next version.
> 

>> Why is this a global? I am not seeing a reason. These detect_*()s could be
>> moved to resctrl.h and get rid of globals.
>>
>> Instead of adding intel check to detect_amd() add detect_intel() or is_intel()
>> and have ut return true of it detects intel.
> 
> "is_amd" and "is_intel" are called many times,
> in this way, detect_vendor is called only once.
> 
You can do the lookup once and save the value to return for
subsequent calls instead of using global values is_amd
and is_intel.

thanks,
-- Shuah

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ