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: <CAMuHMdWn8UV2F=YUsOnVkB0hDEd02Lzp1TtpKRPK-keU3Vm-mA@mail.gmail.com>
Date: Wed, 8 Jan 2025 12:09:17 +0100
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Biju Das <biju.das.jz@...renesas.com>
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 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...

> 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.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ