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: <419e91cb2b698a450497dfc1fb86f2c46eb7d8fb.camel@redhat.com>
Date: Tue, 20 Aug 2024 10:13:40 +0200
From: Philipp Stanner <pstanner@...hat.com>
To: Andy Shevchenko <andy@...nel.org>, Christophe JAILLET
	 <christophe.jaillet@...adoo.fr>
Cc: onathan Corbet <corbet@....net>, Jens Axboe <axboe@...nel.dk>, Wu Hao
 <hao.wu@...el.com>, Tom Rix <trix@...hat.com>, Moritz Fischer
 <mdf@...nel.org>,  Xu Yilun <yilun.xu@...el.com>, Linus Walleij
 <linus.walleij@...aro.org>, Bartosz Golaszewski <brgl@...ev.pl>, "David S.
 Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Jakub
 Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, Alexandre
 Torgue <alexandre.torgue@...s.st.com>, Jose Abreu <joabreu@...opsys.com>,
 Maxime Coquelin <mcoquelin.stm32@...il.com>, Bjorn Helgaas
 <bhelgaas@...gle.com>, Alvaro Karsz <alvaro.karsz@...id-run.com>, "Michael
 S. Tsirkin" <mst@...hat.com>, Jason Wang <jasowang@...hat.com>, Xuan Zhuo
 <xuanzhuo@...ux.alibaba.com>,  Eugenio Pérez
 <eperezma@...hat.com>, Richard Cochran <richardcochran@...il.com>, Mark
 Brown <broonie@...nel.org>, linux-doc@...r.kernel.org,
 linux-kernel@...r.kernel.org,  linux-block@...r.kernel.org,
 linux-fpga@...r.kernel.org,  linux-gpio@...r.kernel.org,
 netdev@...r.kernel.org,  linux-stm32@...md-mailman.stormreply.com,
 linux-arm-kernel@...ts.infradead.org,  linux-pci@...r.kernel.org,
 virtualization@...ts.linux.dev
Subject: Re: [PATCH 8/9] vdap: solidrun: Replace deprecated PCI functions

On Mon, 2024-08-19 at 21:34 +0300, Andy Shevchenko wrote:
> On Mon, Aug 19, 2024 at 08:19:28PM +0200, Christophe JAILLET wrote:
> > Le 19/08/2024 à 18:51, Philipp Stanner a écrit :
> 
> 
> ...
> 
> > Unrelated to the patch, but is is safe to have 'name' be on the
> > stack?
> > 
> > pcim_iomap_region()
> > --> __pcim_request_region()
> > --> __pcim_request_region_range()
> > --> request_region() or __request_mem_region()
> > --> __request_region()
> > --> __request_region_locked()
> > --> res->name = name;
> > 
> > So an address on the stack ends in the 'name' field of a "struct
> > resource".
> > 
> > According to a few grep, it looks really unusual.
> > 
> > I don't know if it is used, but it looks strange to me.
> 
> It might be used when printing /proc/iomem, but I don't remember by
> heart.
> 
> > If it is an issue, it was apparently already there before this
> > patch.
> 
> This series seems to reveal a lot of issues with the probe/remove in
> many
> drivers. I think it's better to make fixes of them before this series
> for
> the sake of easier backporting.

Just so we're in sync:
I think the only real bug here so far is the one found by Christophe.

The usages of pci_disable_device(), pcim_iounmap_regions() and the like
in remove() and error unwind paths are not elegant and make devres kind
of useless – but they are not bugs. So I wouldn't backport them.

P.

> 
> If here is a problem, the devm_kasprintf() should be used.
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ