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  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:   Sat, 1 Aug 2020 14:56:57 +0200
From:   Borislav Petkov <>
To:     "Saheed O. Bolarinwa" <>
Cc:, Kalle Valo <>,
        "David S. Miller" <>,
        Jakub Kicinski <>,
        Wolfgang Grandegger <>,
        Marc Kleine-Budde <>,
        Miquel Raynal <>,
        Richard Weinberger <>,
        Vignesh Raghavendra <>,
        Joerg Roedel <>,,,,,,,,,,,,,,,,,,,,,
Subject: Re: [RFC PATCH 00/17] Drop uses of pci_read_config_*() return value

On Sat, Aug 01, 2020 at 01:24:29PM +0200, Saheed O. Bolarinwa wrote:
> The return value of pci_read_config_*() may not indicate a device error.
> However, the value read by these functions is more likely to indicate
> this kind of error. This presents two overlapping ways of reporting
> errors and complicates error checking.

So why isn't the *value check done in the pci_read_config_* functions
instead of touching gazillion callers?

For example, pci_conf{1,2}_read() could check whether the u32 *value it
just read depending on the access method, whether that value is ~0 and
return proper PCIBIOS_ error in that case.

The check you're replicating

	if (val32 == (u32)~0)

everywhere, instead, is just ugly and tests a naked value ~0 which
doesn't mean anything...


Powered by blists - more mailing lists