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]
Date:   Thu, 17 Aug 2023 09:37:45 +0800
From:   "lihuisong (C)" <lihuisong@...wei.com>
To:     Arnd Bergmann <arnd@...db.de>, <xuwei5@...ilicon.com>,
        Arnd Bergmann <arnd@...nel.org>
CC:     <linux-kernel@...r.kernel.org>, <soc@...nel.org>,
        <linux-arm-kernel@...ts.infradead.org>, <liuyonglong@...wei.com>,
        <lihuisong@...wei.com>
Subject: Re: [PATCH] soc: kunpeng_hccs: fix some sparse warnings about
 incorrect type


在 2023/8/16 21:17, Arnd Bergmann 写道:
> On Tue, Aug 15, 2023, at 14:52, Huisong Li wrote:
>> @@ -199,8 +200,8 @@ static int hccs_pcc_cmd_send(struct hccs_dev *hdev, u8 cmd,
>>   			     struct hccs_desc *desc)
>>   {
>>   	struct hccs_mbox_client_info *cl_info = &hdev->cl_info;
>> -	struct acpi_pcct_shared_memory *comm_base = cl_info->pcc_comm_addr;
>> -	void *comm_space = (void *)(comm_base + 1);
>> +	void __iomem *comm_space = (u8 *)cl_info->pcc_comm_addr +
>> +					sizeof(struct acpi_pcct_shared_memory);
>>   	struct hccs_fw_inner_head *fw_inner_head;
>>   	struct acpi_pcct_shared_memory tmp = {0};
>>   	u16 comm_space_size;
> The cast still looks wrong, while both comm_space and ->pcc_comm_addr
> are __iomem pointers, casting to a non-__iomem u8 pointer should
> still produce that warning. I'd suggest casting to (u8 __iomem *)
> or (void __iomem *), I assume you still need a cast here to get
> the correct address.
Thanks Arnd.

You are right. So I modify it by dropping (u8 *) here in patch v2.
Please take a look at this again.
If it is ok for you, can you apply this patch to soc/soc.git?

/Huisong

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ