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, 5 Jan 2012 10:10:01 -0700
From:	Bjorn Helgaas <bhelgaas@...gle.com>
To:	Rolf Eike Beer <eike-kernel@...tec.de>
Cc:	Yinghai Lu <yinghai@...nel.org>,
	Jesse Barnes <jbarnes@...tuousgeek.org>,
	linux-kernel@...r.kernel.org, linux-pci@...r.kernel.org
Subject: Re: [PATCH] PCI: Increase resource array mask bit size in pcim_iomap_regions()

On Thu, Jan 5, 2012 at 1:43 AM, Rolf Eike Beer <eike-kernel@...tec.de> wrote:
>> DEVICE_COUNT_RESOURCE will be bigger than 16 when SRIOV supported is
>> enabled.
>>
>> Let them pass with int just like pci_enable_resources().
>>
>> Signed-off-by: Yinghai Lu <yinghai@...nel.org>
>>
>> ---
>>  include/linux/pci.h |    6 +++---
>>  lib/devres.c        |    6 +++---
>>  2 files changed, 6 insertions(+), 6 deletions(-)
>>
>> Index: linux-2.6/include/linux/pci.h
>> ===================================================================
>> --- linux-2.6.orig/include/linux/pci.h
>> +++ linux-2.6/include/linux/pci.h
>> @@ -1433,10 +1433,10 @@ static inline void pci_fixup_device(enum
>>  void __iomem *pcim_iomap(struct pci_dev *pdev, int bar, unsigned long
>> maxlen);
>>  void pcim_iounmap(struct pci_dev *pdev, void __iomem *addr);
>>  void __iomem * const *pcim_iomap_table(struct pci_dev *pdev);
>> -int pcim_iomap_regions(struct pci_dev *pdev, u16 mask, const char *name);
>> -int pcim_iomap_regions_request_all(struct pci_dev *pdev, u16 mask,
>> +int pcim_iomap_regions(struct pci_dev *pdev, int mask, const char *name);
>> +int pcim_iomap_regions_request_all(struct pci_dev *pdev, int mask,
>>                                  const char *name);
> [...]
>
> You are switching from unsigned to signed here, is this intentional? In my
> feeling such masks should end up in an unsigned int, no?

I agree masks should generally be unsigned, but I think it makes sense
to first follow pci_enable_resources() (which uses "int") , and maybe
in the future, convert both to being unsigned.

Bjorn
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ