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]
Message-ID: <20200618170415.GY2428291@smile.fi.intel.com>
Date:   Thu, 18 Jun 2020 20:04:15 +0300
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     Shiju Jose <shiju.jose@...wei.com>
Cc:     "linux-acpi@...r.kernel.org" <linux-acpi@...r.kernel.org>,
        "linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "rjw@...ysocki.net" <rjw@...ysocki.net>,
        "helgaas@...nel.org" <helgaas@...nel.org>,
        "bp@...en8.de" <bp@...en8.de>,
        "james.morse@....com" <james.morse@....com>,
        "lenb@...nel.org" <lenb@...nel.org>,
        "tony.luck@...el.com" <tony.luck@...el.com>,
        "dan.carpenter@...cle.com" <dan.carpenter@...cle.com>,
        "zhangliguang@...ux.alibaba.com" <zhangliguang@...ux.alibaba.com>,
        "Wangkefeng (OS Kernel Lab)" <wangkefeng.wang@...wei.com>,
        "jroedel@...e.de" <jroedel@...e.de>,
        Linuxarm <linuxarm@...wei.com>,
        yangyicong <yangyicong@...wei.com>,
        Jonathan Cameron <jonathan.cameron@...wei.com>,
        tanxiaofei <tanxiaofei@...wei.com>
Subject: Re: [PATCH v10 2/2] PCI: hip: Add handling of HiSilicon HIP PCIe
 controller errors

On Thu, Jun 18, 2020 at 04:35:31PM +0000, Shiju Jose wrote:
> >-----Original Message-----
> >From: Andy Shevchenko [mailto:andriy.shevchenko@...ux.intel.com]
> >Sent: 18 June 2020 16:56
> >To: Shiju Jose <shiju.jose@...wei.com>
> >Cc: linux-acpi@...r.kernel.org; linux-pci@...r.kernel.org; linux-
> >kernel@...r.kernel.org; rjw@...ysocki.net; helgaas@...nel.org;
> >bp@...en8.de; james.morse@....com; lenb@...nel.org;
> >tony.luck@...el.com; dan.carpenter@...cle.com;
> >zhangliguang@...ux.alibaba.com; Wangkefeng (OS Kernel Lab)
> ><wangkefeng.wang@...wei.com>; jroedel@...e.de; Linuxarm
> ><linuxarm@...wei.com>; yangyicong <yangyicong@...wei.com>; Jonathan
> >Cameron <jonathan.cameron@...wei.com>; tanxiaofei
> ><tanxiaofei@...wei.com>
> >Subject: Re: [PATCH v10 2/2] PCI: hip: Add handling of HiSilicon HIP PCIe
> >controller errors
> >
> >On Thu, Jun 18, 2020 at 04:40:51PM +0100, Shiju Jose wrote:

...

> >> Reviewed-by: Andy Shevchenko <andriy.shevchenko@...el.com>
> >
> >Hmm... Did I give a tag?

Yes, and please, be sure that you got explicit tags from reviewers.

...

> >> +	for_each_set_bit_from(idx, (const unsigned long *)&edata->val_bits,
> >
> >Can't you make val_bits unsigned long? Because this casting is incorrect.
> >Otherwise, make a local copy into unsigned long variable.
> 
> The data val_bits in the error record is 64 bits, thus used u64.
> Casting is added because of a compilation warning on _find_nex_bit_ function as it 
> expects the type of the address as const unsigned long*.
> Probably I will make local copy of val_bits into unsigned long variable.

I see.  So, something like this:

	unsigned long bits[] = { BITMAP_FROM_U64(edata->val_bits) };
	...
	for_each_set_bit_from(i, bits, ...)
		...

looks plausible. Or if you have better idea...

-- 
With Best Regards,
Andy Shevchenko


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ