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:
 <TY3PR01MB11346F0645DD928C6849D9EAF86122@TY3PR01MB11346.jpnprd01.prod.outlook.com>
Date: Wed, 8 Jan 2025 11:13:07 +0000
From: Biju Das <biju.das.jz@...renesas.com>
To: Geert Uytterhoeven <geert@...ux-m68k.org>
CC: "Lad, Prabhakar" <prabhakar.csengg@...il.com>, "kingdix10@...com"
	<kingdix10@...com>, "helgaas@...nel.org" <helgaas@...nel.org>,
	"bhelgaas@...gle.com" <bhelgaas@...gle.com>, "kw@...ux.com" <kw@...ux.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
	"linux-renesas-soc@...r.kernel.org" <linux-renesas-soc@...r.kernel.org>,
	"lpieralisi@...nel.org" <lpieralisi@...nel.org>,
	"manivannan.sadhasivam@...aro.org" <manivannan.sadhasivam@...aro.org>,
	"marek.vasut+renesas@...il.com" <marek.vasut+renesas@...il.com>, Prabhakar
 Mahadev Lad <prabhakar.mahadev-lad.rj@...renesas.com>, "robh@...nel.org"
	<robh@...nel.org>, Yoshihiro Shimoda <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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ