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: <89f48b0a-a6b6-2204-7d96-28ebbe96b18a@intel.com>
Date:   Mon, 25 Sep 2023 09:08:31 -0700
From:   "Joseph, Jithu" <jithu.joseph@...el.com>
To:     Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
CC:     Hans de Goede <hdegoede@...hat.com>, <markgross@...nel.org>,
        <tglx@...utronix.de>, <mingo@...hat.com>, <bp@...en8.de>,
        <dave.hansen@...ux.intel.com>, <x86@...nel.org>, <hpa@...or.com>,
        <rostedt@...dmis.org>, <ashok.raj@...el.com>,
        <tony.luck@...el.com>, LKML <linux-kernel@...r.kernel.org>,
        <platform-driver-x86@...r.kernel.org>, <patches@...ts.linux.dev>,
        <ravi.v.shankar@...el.com>, <pengfei.xu@...el.com>
Subject: Re: [PATCH v2 4/9] platform/x86/intel/ifs: Gen2 Scan test support



On 9/25/2023 8:39 AM, Ilpo Järvinen wrote:
> On Fri, 22 Sep 2023, Jithu Joseph wrote:
> 

...

>>  
>> -	activate.rsvd = 0;
>>  	activate.delay = IFS_THREAD_WAIT;
>>  	activate.sigmce = 0;
>> -	activate.start = 0;
>> -	activate.stop = ifsd->valid_chunks - 1;
>> +	to_start = 0;
>> +	to_stop = ifsd->valid_chunks - 1;
>> +
>> +	if (ifsd->generation) {
>> +		activate.gen2.start = to_start;
>> +		activate.gen2.stop = to_stop;
>> +	} else {
>> +		activate.gen0.start = to_start;
>> +		activate.gen0.stop = to_stop;
>> +	}
> 
> Is it okay to not do activate.gen0.rsvd = 0 anymore? If you know it is, it 
> would be nice to record that fact into the changelog so that it can be 
> found in the history.

I did test on a gen0 to check if there is a problem due to this (and it seemed fine).
I will make a note in changelog as you suggest

> 
>>  
>>  	timeout = jiffies + HZ / 2;
>>  	retries = MAX_IFS_RETRIES;
>>  
>> -	while (activate.start <= activate.stop) {
>> +	while (to_start <= to_stop) {
>>  		if (time_after(jiffies, timeout)) {
>>  			status.error_code = IFS_SW_TIMEOUT;
>>  			break;
>> @@ -196,13 +205,14 @@ static void ifs_test_core(int cpu, struct device *dev)
>>  
>>  		status.data = msrvals[1];
>>  
>> -		trace_ifs_status(cpu, activate, status);
>> +		trace_ifs_status(cpu, to_start, to_stop, status.data);
>>  
>>  		/* Some cases can be retried, give up for others */
>>  		if (!can_restart(status))
>>  			break;
>>  
>> -		if (status.chunk_num == activate.start) {
>> +		status_chunk = ifsd->generation ? status.gen2.chunk_num : status.gen0.chunk_num;
>> +		if (status_chunk == to_start) {
>>  			/* Check for forward progress */
>>  			if (--retries == 0) {
>>  				if (status.error_code == IFS_NO_ERROR)
>> @@ -211,7 +221,9 @@ static void ifs_test_core(int cpu, struct device *dev)
>>  			}
>>  		} else {
>>  			retries = MAX_IFS_RETRIES;
>> -			activate.start = status.chunk_num;
>> +			ifsd->generation ? (activate.gen2.start = status_chunk) :
>> +			(activate.gen0.start = status_chunk);
> 
> The alignment of the second line is still not correct but now I notice how 
> the left-hand side is hidden within those expressions. Just do a normal if 
> instead so that it is simpler to understand, please.

In v1 the second line was kept 1 space to the right of previous line.  In v2  I kept
them at the same indent, since your original comment was Misaliged.

I will change these two lines to
if (ifsd->generation)
	activate.gen2.start = status_chunk;
else
	activate.gen0.start = status_chunk


Jithu

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ