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: <tencent_E41517B9A991E979CCA31DA8087A1F62E10A@qq.com>
Date: Thu,  9 Jan 2025 08:45:37 +0800
From: kingdix10@...com
To: biju.das.jz@...renesas.com
Cc: bhelgaas@...gle.com,
	geert@...ux-m68k.org,
	helgaas@...nel.org,
	kingdix10@...com,
	kw@...ux.com,
	linux-kernel@...r.kernel.org,
	linux-pci@...r.kernel.org,
	linux-renesas-soc@...r.kernel.org,
	lpieralisi@...nel.org,
	manivannan.sadhasivam@...aro.org,
	marek.vasut+renesas@...il.com,
	prabhakar.csengg@...il.com,
	prabhakar.mahadev-lad.rj@...renesas.com,
	robh@...nel.org,
	yoshihiro.shimoda.uh@...esas.com
Subject: Re: Re: [PATCH v4] PCI: rcar-ep: Fix the issue of the name parameter when calling devm_request_mem_region

On Wed, 2025-01-08 at 11:13 +0000, Biju Das wrote:
> Hi Geert,
> 
> > -----Original Message-----
> > From: Geert Uytterhoeven <geert@...ux-m68k.org>
> > Sent: 08 January 2025 11:09
> > Subject: Re: Re: [PATCH v4] PCI: rcar-ep: Fix the issue of the name
> > parameter when calling
> > devm_request_mem_region
> > 
> > Hi Biju,
> > 
> > On Wed, Jan 8, 2025 at 11:57 AM Biju Das
> > <biju.das.jz@...renesas.com> wrote:
> > > > From: Lad, Prabhakar <prabhakar.csengg@...il.com> On Wed, Jan
> > > > 8,
> > > > 2025 at 10:45 AM Biju Das <biju.das.jz@...renesas.com> wrote:
> > > > > > From: kingdix10@...com <kingdix10@...com>
> > > > > > Sent: 08 January 2025 04:59
> > > > > > Subject: Re: Re: [PATCH v4] PCI: rcar-ep: Fix the issue of
> > > > > > the
> > > > > > name parameter when calling devm_request_mem_region
> > > > > > 
> > > > > > On Tue, 2025-01-07 at 16:56 -0600, Bjorn Helgaas wrote:
> > > > > > > On Tue, Jan 07, 2025 at 09:51:23PM +0800,
> > > > > > > kingdix10@...com wrote:
> > > > > > > > From: King Dix <kingdix10@...com>
> > > > > > > > 
> > > > > > > > When using devm_request_mem_region to request a
> > > > > > > > resource, if
> > > > > > > > the passed variable is a stack string variable, it will
> > > > > > > > lead
> > > > > > > > to an oops issue when executing the command cat
> > > > > > > > /proc/iomem.
> > > > > > > > 
> > > > > > > > Fix this by replacing outbound_name with the name of
> > > > > > > > the
> > > > > > > > previously requested resource.
> > > > > > > 
> > > > > > > Thanks a lot for doing this work!
> > > > > > > 
> > > > > > > Add "()" after function names in subject and commit log.
> > > > > > > 
> > > > > > 
> > > > > > Thanks for your review. I will fix the issue right now.
> > > > > > 
> > > > > > > Please include a couple lines of the oops message to help
> > > > > > > people connect the problem with the fix.
> > > > > 
> > > > > Maybe Prabhakar should be able to provide Oops log, as it is
> > > > > tested on real platform??
> > > > > 
> > > > It doesn't Oops out, it just prints a null string. Below are
> > > > the logs from RZ/G2M:
> > > > 
> > > > $  cat /proc/iomem
> > > > 30000000-37ffffff :
> > > > 38000000-3fffffff :
> > 
> > Prabhakar's original email showed garbage here.
> > Looks like your mailer removed it...
> 
> Oops. My mailer removed junk chars.
> 
> > 
> > > Before patch:
> > > 
> > > fe000000-fe07ffff : fe000000.pcie-ep apb-base fe100000-fe1fffff :
> > > fe200000-fe3fffff :
> > 
> > Same here.
> > 
> > > After applying the patch:
> > > fe000000-fe07ffff : fe000000.pcie-ep apb-base fe100000-fe1fffff :
> > > memory0 fe200000-fe3fffff : memory1
> > > 
> > > kingdix10@...com, maybe you need to update commit description
> > > referring oops.
> > 
> > Depending on the data found in memory at the time of printing, the
> > output will be different.  I guess
> > it might still crash in the (very
> > unlikely) case that no NUL-terminator is found, and the string
> > iterator will access unmapped memory
> > above the stack.
> 
> I agree.
> 
> Cheers,
> Biju

Thank you all very much for the information and suggestions. I'll handle it right away.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ