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] [day] [month] [year] [list]
Message-ID: <aWlDgFZVC+TK088Z@lizhi-Precision-Tower-5810>
Date: Thu, 15 Jan 2026 14:44:00 -0500
From: Frank Li <Frank.li@....com>
To: Niklas Cassel <cassel@...nel.org>
Cc: Koichiro Den <den@...inux.co.jp>, jingoohan1@...il.com, mani@...nel.org,
	lpieralisi@...nel.org, kwilczynski@...nel.org, robh@...nel.org,
	bhelgaas@...gle.com, vigneshr@...com, s-vadapalli@...com,
	hongxing.zhu@....com, l.stach@...gutronix.de, shawnguo@...nel.org,
	s.hauer@...gutronix.de, kernel@...gutronix.de, festevam@...il.com,
	minghuan.Lian@....com, mingkai.hu@....com, roy.zang@....com,
	jesper.nilsson@...s.com, heiko@...ech.de,
	srikanth.thokala@...el.com, marek.vasut+renesas@...il.com,
	yoshihiro.shimoda.uh@...esas.com, geert+renesas@...der.be,
	magnus.damm@...il.com, christian.bruel@...s.st.com,
	mcoquelin.stm32@...il.com, alexandre.torgue@...s.st.com,
	thierry.reding@...il.com, jonathanh@...dia.com,
	hayashi.kunihiko@...ionext.com, mhiramat@...nel.org,
	kishon@...nel.org, jirislaby@...nel.org, rongqianfeng@...o.com,
	18255117159@....com, shawn.lin@...k-chips.com,
	nicolas.frattaroli@...labora.com, linux.amoon@...il.com,
	vidyas@...dia.com, linux-omap@...r.kernel.org,
	linux-pci@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	linux-kernel@...r.kernel.org, imx@...ts.linux.dev,
	linuxppc-dev@...ts.ozlabs.org, linux-arm-kernel@...s.com,
	linux-rockchip@...ts.infradead.org, linux-arm-msm@...r.kernel.org,
	linux-renesas-soc@...r.kernel.org,
	linux-stm32@...md-mailman.stormreply.com,
	linux-tegra@...r.kernel.org
Subject: Re: [PATCH v8 2/5] PCI: endpoint: Add BAR subrange mapping support

On Thu, Jan 15, 2026 at 04:21:21PM +0100, Niklas Cassel wrote:
> On Thu, Jan 15, 2026 at 09:52:58AM -0500, Frank Li wrote:
> > > @@ -127,6 +150,10 @@ struct pci_epf_bar {
> > >  	size_t		mem_size;
> > >  	enum pci_barno	barno;
> > >  	int		flags;
> > > +
> > > +	/* Optional sub-range mapping */
> > > +	unsigned int	num_submap;
> > > +	struct pci_epf_bar_submap	*submap;
> >
> > struct pci_epf_bar_submap submap[] __counted_by(num_submap);
> >
> > Not sure if use this simplify alloc/free.
>
> Your suggestion changes the submap from a pointer to a flexible array
> member.
>
> A flexible array member must always be last in the struct,
> and you can only have one flexible array member per struct.
>
> Additionally, using a flexible array member requires the struct to
> always be allocated on the heap. You can't allocate a struct with a
> flexible array member on the stack.
>
> So I'm not sure that if your suggestion is something we want.

Yes, forget my comments if not fit.

Frank
>
>
> Kind regards,
> Niklas

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ