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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5b6d7dfb-b2d2-a596-1f41-0428426a791f@linux.intel.com>
Date: Mon, 27 Oct 2025 19:55:05 +0200 (EET)
From: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
To: Klaus Kudielka <klaus.kudielka@...il.com>
cc: Bjorn Helgaas <bhelgaas@...gle.com>, linux-pci@...r.kernel.org, 
    LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/1] PCI: Do not size non-existing prefetchable window

On Mon, 27 Oct 2025, Klaus Kudielka wrote:

> On Mon, 2025-10-27 at 15:24 +0200, Ilpo Järvinen wrote:
> > pbus_size_mem() should only be called for bridge windows that exist but
> > __pci_bus_size_bridges() may point 'pref' to a resource that does not
> > exist (has zero flags) in case of non-root buses.
> > 
> > When prefetchable bridge window does not exist, the same
> > non-prefetchable bridge window is sized more than once which may result
> > in duplicating entries into the realloc_head list. Duplicated entries
> > are shown in this log and trigger a WARN_ON() because realloc_head had
> > residual entries after the resource assignment algorithm:
> > 
> > pci 0000:00:03.0: [11ab:6820] type 01 class 0x060400 PCIe Root Port
> > pci 0000:00:03.0: PCI bridge to [bus 00]
> > pci 0000:00:03.0:   bridge window [io  0x0000-0x0fff]
> > pci 0000:00:03.0:   bridge window [mem 0x00000000-0x000fffff]
> > pci 0000:00:03.0: bridge window [mem 0x00200000-0x003fffff] to [bus 02] add_size 200000 add_align 200000
> > pci 0000:00:03.0: bridge window [mem 0x00200000-0x003fffff] to [bus 02] add_size 200000 add_align 200000
> > pci 0000:00:03.0: bridge window [mem 0xe0000000-0xe03fffff]: assigned
> > pci 0000:00:03.0: PCI bridge to [bus 02]
> > pci 0000:00:03.0:   bridge window [mem 0xe0000000-0xe03fffff]
> > ------------[ cut here ]------------
> > WARNING: CPU: 0 PID: 1 at drivers/pci/setup-bus.c:2373 pci_assign_unassigned_root_bus_resources+0x1bc/0x234
> 
> With this patch on top of v6.18-rc3, the boot log looks clean again:
> 
> pci 0000:00:03.0: [11ab:6820] type 01 class 0x060400 PCIe Root Port
> pci 0000:00:03.0: PCI bridge to [bus 00]
> pci 0000:00:03.0:   bridge window [io  0x0000-0x0fff]
> pci 0000:00:03.0:   bridge window [mem 0x00000000-0x000fffff]
> pci 0000:00:03.0: bridge configuration invalid ([bus 00-00]), reconfiguring
> pci 0000:00:03.0: bridge window [mem 0x00200000-0x003fffff] to [bus 02] add_size 200000 add_align 200000
> pci 0000:00:03.0: bridge window [mem 0xe0000000-0xe03fffff]: assigned
> pci 0000:00:03.0: PCI bridge to [bus 02]
> pci 0000:00:03.0:   bridge window [mem 0xe0000000-0xe03fffff]
> 
> (and no WARNING thereafter)
> Thanks a lot!
> 
> Tested-by: Klaus Kudielka <klaus.kudielka@...il.com>

Thanks for testing.

-- 
 i.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ