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]
Message-ID: <d8336f83-9f31-e168-1ed7-29e97189e233@kernel.org>
Date:   Tue, 22 Feb 2022 10:14:16 +0100
From:   Jiri Slaby <jirislaby@...nel.org>
To:     Christoph Hellwig <hch@...radead.org>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc:     linux-serial@...r.kernel.org, linux-kernel@...r.kernel.org,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: Re: [PATCH v2 2/2] serial: 8250_lpss: Switch to pcim_iomap() instead
 of pci_ioremap_bar()

On 16. 02. 22, 9:53, Christoph Hellwig wrote:
> On Tue, Feb 15, 2022 at 03:43:59PM +0200, Andy Shevchenko wrote:
>> The pci_iounmap() doesn't cover all the cases where resource should
>> be unmapped. Instead of spreading it more, replace the pci_ioremap_bar()
>> with pcim_iomap() which uses managed resource approach.
> 
> pcim_iomap requires the use of ioreadX/iowriteX and thus runtime
> overhead.  So in doubt please add a pcim_ioremap_bar instead of forcing
> the legacy iomap/ioread/iowrite API onto modern drivers tht can't
> support legacy port I/O.

Hmm, the driver combines pci_ioremap_bar with pci_iounmap. pci_iounmap 
does the right thing after all, but is that correct? And this driver is 
not alone, this shows more:
git grep -E 'pci_iounmap|pci_ioremap_bar' `git grep -l pci_iounmap \`git 
grep -l pci_ioremap_bar\``

-- 
js
suse labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ