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: <aV-AApRHXLOTEwm3@ryzen>
Date: Thu, 8 Jan 2026 10:59:30 +0100
From: Niklas Cassel <cassel@...nel.org>
To: Koichiro Den <den@...inux.co.jp>
Cc: jingoohan1@...il.com, mani@...nel.org, lpieralisi@...nel.org,
	kwilczynski@...nel.org, robh@...nel.org, bhelgaas@...gle.com,
	Frank.Li@....com, linux-pci@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 1/2] PCI: endpoint: Add BAR subrange mapping support

On Thu, Jan 08, 2026 at 10:37:35AM +0100, Niklas Cassel wrote:
> The memcpy in dw_pcie_ep_get_features() is a bit ugly.
> I guess the alternative is to change all the DWC based glue drivers
> to return a "struct pci_epc_features*" instead of a "const struct pci_epc_features*"
> such that dw_pcie_ep_get_features() can simply set subrange_mapping = true in the
> struct pci_epc_features returned by the glue driver.

I think the best way it probably to create another patch,
that will be patch 2 out of 3 in the series, which changes:
https://github.com/torvalds/linux/blob/v6.19-rc4/drivers/pci/controller/dwc/pcie-designware.h#L449

from:
const struct pci_epc_features* (*get_features)(struct dw_pcie_ep *ep);

to:
struct pci_epc_features* (*get_features)(struct dw_pcie_ep *ep);

and which does the equivalent change in all the DWC based glue drivers.

That way, dw_pcie_ep_get_features() can simply set subrange_mapping = true
in the struct pci_epc_features returned by the glue driver.



Note that the function dw_pcie_ep_get_features() itself should still return:
"static const struct pci_epc_features*"

(Since this represents the DWC midlayer driver level.)

It is only the DWC based glue drivers (lower level drivers) that should drop
the const.


Kind regards,
Niklas

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ