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] [day] [month] [year] [list]
Message-ID: <c5654255-5708-4c04-8311-ccd52f771277@huawei.com>
Date: Wed, 13 Nov 2024 15:23:16 +0800
From: "zhenglifeng (A)" <zhenglifeng1@...wei.com>
To: Clément Léger <cleger@...osinc.com>,
	<rafael@...nel.org>, <lenb@...nel.org>
CC: <linux-acpi@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
	<zhanjie9@...ilicon.com>, <lihuisong@...wei.com>, <fanghao11@...wei.com>
Subject: Re: [PATCH] ACPI: CPPC: fix bug that causes the value written in cpc
 register to be wrong.



On 2024/11/13 15:05, Clément Léger wrote:
> 
> 
> On 13/11/2024 03:49, Lifeng Zheng wrote:
>> With these codes, the value written in cpc register will be the result of
>> the OR operatiion on input value and prev_val. This will causes the value
>> to be wrong.
>>
>> Signed-off-by: Lifeng Zheng <zhenglifeng1@...wei.com>
>> ---
>>  drivers/acpi/cppc_acpi.c | 1 -
>>  1 file changed, 1 deletion(-)
>>
>> diff --git a/drivers/acpi/cppc_acpi.c b/drivers/acpi/cppc_acpi.c
>> index 01192fd047a6..f69ef7cc0caf 100644
>> --- a/drivers/acpi/cppc_acpi.c
>> +++ b/drivers/acpi/cppc_acpi.c
>> @@ -1146,7 +1146,6 @@ static int cpc_write(int cpu, struct cpc_register_resource *reg_res, u64 val)
>>  			return -EFAULT;
>>  		}
>>  		val = MASK_VAL_WRITE(reg, prev_val, val);
>> -		val |= prev_val;
> 
> Hi Lifeng,
> 
> Indeed, MASK_VAL_WRITE() already takes care of ORing prev_val with the
> register mask. You can also add a Fixes:
> 
> Fixes: 60949b7b8054 ("ACPI: CPPC: Fix MASK_VAL() usage")
> 
> Thanks,
> 
> Clément
> 
>>  	}
>>  
>>  	switch (size) {
> 

Thanks for reminder. I'll add this Fixes and resend this patch.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ