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:	Mon, 5 Jan 2015 13:26:07 -0600
From:	Rob Herring <robh@...nel.org>
To:	Andreas Mohr <andi@...as.de>
Cc:	"linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Bjorn Helgaas <bhelgaas@...gle.com>,
	Will Deacon <will.deacon@....com>,
	Arnd Bergmann <arnd@...db.de>
Subject: Re: [PATCH] pci: introduce common pci config space accessors

On Mon, Jan 5, 2015 at 12:48 PM, Andreas Mohr <andi@...as.de> wrote:
> Hi,
>
>> +     if (size == 1)
>> +             *val = readb(addr);
>> +     else if (size == 2)
>> +             *val = readw(addr);
>> +     else
>> +             *val = readl(addr);
> (pci_generic_config_read() and pci_generic_config_write())
>
> switch()
> default: WARN_ON(1);
> ?

If you look at PCI_OP_READ/PCI_OP_WRITE defines, the caller can only
have size of 1, 2 or 4. AFAIK, config accesses don't go thru any other
caller.

Rob
--
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