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:   Wed, 26 May 2021 16:15:01 +0200
From:   Ard Biesheuvel <ardb@...nel.org>
To:     Christian König <ckoenig.leichtzumerken@...il.com>
Cc:     Peter Geis <pgwipeout@...il.com>,
        Punit Agrawal <punitagrawal@...il.com>,
        Robin Murphy <robin.murphy@....com>,
        Alexandru Elisei <alexandru.elisei@....com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        "open list:ARM/Rockchip SoC..." <linux-rockchip@...ts.infradead.org>,
        arm-mail-list <linux-arm-kernel@...ts.infradead.org>,
        Heiko Stuebner <heiko.stuebner@...obroma-systems.com>,
        Leonardo Bras <leobras.c@...il.com>,
        Rob Herring <robh@...nel.org>, PCI <linux-pci@...r.kernel.org>
Subject: Re: [BUG] rockpro64: PCI BAR reassignment broken by commit
 9d57e61bf723 ("of/pci: Add IORESOURCE_MEM_64 to resource flags for 64-bit
 memory addresses")

On Wed, 26 May 2021 at 15:55, Christian König
<ckoenig.leichtzumerken@...il.com> wrote:
>
> Hi Ard,
>
> Am 25.05.21 um 19:18 schrieb Ard Biesheuvel:
> > [SNIP]
> >>> I seriously doubt that this is what is going on here.
> >>>
> >>> lspci -x will give you the bare BAR values - I suspect that those are
> >>> probably fine.
> >> lspci -x
> >> 00:00.0 PCI bridge: Fuzhou Rockchip Electronics Co., Ltd Device 3566 (rev 01)
> >> 00: 87 1d 66 35 07 05 10 40 01 00 04 06 00 00 01 00
> >> 10: 00 00 00 00 00 00 00 00 00 01 ff 00 10 10 00 20
> >> 20: 00 10 00 10 01 00 f1 0f 00 00 00 00 00 00 00 00
> >> 30: 00 00 00 00 40 00 00 00 00 00 00 00 5f 01 02 00
> >>
> >> 01:00.0 VGA compatible controller: Advanced Micro Devices, Inc.
> >> [AMD/ATI] Turks PRO [Radeon HD 7570]
> >> 00: 02 10 5d 67 07 00 10 20 00 00 00 03 00 00 80 00
> >> 10: 0c 00 00 00 00 00 00 00
> > This is a 64-bit prefetchable BAR programmed with bus address 0x0
> >
> >> 04 00 00 10 00 00 00 00
> > This is a 64-bit non-prefetchable BAR programmed with bus address 0x1000_0000
> >
> > (https://en.wikipedia.org/wiki/PCI_configuration_space describes the
> > meaning of the low order BAR bits)
>
> Sorry for jumping into the middle of the discussion and to be honest I
> haven't fully read it.
>
> This looks a bit odd since on AMD VGA hardware the non-prefetchable BAR
> is usually only 32bit, not 64bit.
>
> But this hardware generation is rather old and I'm not sure what the BAR
> assignment for that generation was. I would need to dig up the register
> description in our archives as well.
>

I have another museum piece in my AMD Seattle:

02:00.0 VGA compatible controller: Advanced Micro Devices, Inc.
[AMD/ATI] Oland XT [Radeon HD 8670 / R7 250/350] (rev 81) (prog-if 00
[VGA controller])
  Subsystem: Dell Oland XT [Radeon HD 8670 / R7 250/350]
  Flags: bus master, fast devsel, latency 0, IRQ 255
  Memory at 100000000 (64-bit, prefetchable) [size=4G]
  Memory at 40000000 (64-bit, non-prefetchable) [size=256K]
  I/O ports at 1000 [disabled] [size=256]
  Expansion ROM at 40060000 [disabled] [size=128K]
  Capabilities: <access denied>
  Kernel modules: radeon, amdgpu

So AMD/ATI ASICs definitely exist that expose a 64-bit pref and a
64-bit non-pref BAR.

-- 
Ard.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ