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:
 <TY3PR01MB1134688B49138EA368C0E838686122@TY3PR01MB11346.jpnprd01.prod.outlook.com>
Date: Wed, 8 Jan 2025 10:57:28 +0000
From: Biju Das <biju.das.jz@...renesas.com>
To: "Lad, Prabhakar" <prabhakar.csengg@...il.com>
CC: "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 Prabhakar,

> -----Original Message-----
> From: Lad, Prabhakar <prabhakar.csengg@...il.com>
> Sent: 08 January 2025 10:51
> Subject: Re: Re: [PATCH v4] PCI: rcar-ep: Fix the issue of the name parameter when calling
> devm_request_mem_region
> 
> On Wed, Jan 8, 2025 at 10:45 AM Biju Das <biju.das.jz@...renesas.com> wrote:
> >
> >
> >
> > > -----Original Message-----
> > > 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 :
> 48000000-bfffffff : System RAM
>   48210000-496affff : Kernel code
>   496b0000-4987ffff : reserved
>   49880000-49a8ffff : Kernel data
>   b9eca000-b9ed8fff : reserved
>   ba000000-bfffffff : reserved
> e6020000-e602000b : e6020000.watchdog watchdog@...20000 e6050000-e605004f : e6050000.gpio
> gpio@...50000 e6051000-e605104f : e6051000.gpio gpio@...51000 e6052000-e605204f : e6052000.gpio
> gpio@...52000 e6053000-e605304f : e6053000.gpio gpio@...53000 e6054000-e605404f : e6054000.gpio
> gpio@...54000 e6055000-e605504f : e6055000.gpio gpio@...55000 e6055400-e605544f : e6055400.gpio
> gpio@...55400 e6055800-e605584f : e6055800.gpio gpio@...55800 e6060000-e606050b : e6060000.pinctrl
> pinctrl@...60000 e6198000-e61980ff : e6198000.thermal thermal@...98000 e61a0000-e61a00ff :
> e6198000.thermal thermal@...98000 e61a8000-e61a80ff : e6198000.thermal thermal@...98000 e61c0000-
> e61c01ff : e61c0000.interrupt-controller interrupt-controller@...c0000 e6510000-e651003f :
> e6510000.i2c i2c@...10000 e6540000-e654005f : e6540000.serial e6590000-e65901ff : e6590000.usb
> usb@...90000 e65a0000-e65a00ff : e65a0000.dma-controller dma-controller@...a0000 e65b0000-e65b00ff :
> e65b0000.dma-controller dma-controller@...b0000 e65ee000-e65ee08f : e65ee000.usb-phy usb-phy@...ee000
> e66d8000-e66d803f : e66d8000.i2c i2c@...d8000 e6700000-e670ffff : e6700000.dma-controller dma-
> controller@...00000 e6800000-e68007ff : e6800000.ethernet ethernet@...00000 e6c30000-e6c30fff :
> e6c30000.can can@...30000 e6c38000-e6c38fff : e6c38000.can can@...38000
> e6e30000-e6e30007 : e6e30000.pwm pwm@...30000 e6e88000-e6e8803f : e6e88000.serial e7300000-e730ffff :
> e7300000.dma-controller dma-controller@...00000 e7310000-e731ffff : e7310000.dma-controller dma-
> controller@...10000 ec500000-ec500fff : ec500000.sound scu ec540000-ec540fff : ec500000.sound ssiu
> ec541000-ec54127f : ec500000.sound ssi ec5a0000-ec5a00ff : ec500000.sound adg ec700000-ec70ffff :
> ec700000.dma-controller dma-controller@...00000 ec720000-ec72ffff : ec720000.dma-controller dma-
> controller@...20000 ec760000-ec7601ff : ec500000.sound audmapp ee020000-ee0203ff : ee020000.usb
> usb@...20000 ee080000-ee0800ff : ee080000.usb usb@...80000 ee080100-ee0801ff : ee080100.usb
> usb@...80100 ee080200-ee0808ff : ee080200.usb-phy usb-phy@...80200 ee0a0000-ee0a00ff : ee0a0000.usb
> usb@...a0000 ee0a0100-ee0a01ff : ee0a0100.usb usb@...a0100 ee0a0200-ee0a08ff : ee0a0200.usb-phy usb-
> phy@...a0200 ee100000-ee101fff : ee100000.mmc mmc@...00000 ee140000-ee141fff : ee140000.mmc
> mmc@...40000 ee160000-ee161fff : ee160000.mmc mmc@...60000 fe000000-fe07ffff : fe000000.pcie-ep apb-
> base fe100000-fe1fffff :    fe200000-fe3fffff :    fe940000-fe9423ff : fe940000.fdp1 fdp1@...40000
> fe960000-fe967fff : fe960000.vsp vsp@...60000 fe9a0000-fe9a7fff : fe9a0000.vsp vsp@...a0000 fea20000-
> fea24fff : fea20000.vsp vsp@...20000 fea28000-fea2cfff : fea28000.vsp vsp@...28000 fea30000-fea34fff :
> fea30000.vsp vsp@...30000 fead0000-feadffff : fead0000.hdmi hdmi@...d0000 feb00000-feb6ffff :
> feb00000.display display@...00000 600000000-67fffffff : System RAM
>   67b140000-67f5fffff : reserved
>   67f64d000-67f64dfff : reserved
>   67f64e000-67f6ddfff : reserved
>   67f6df000-67f6e2fff : reserved
>   67f6e3000-67f7e6fff : reserved
>   67f7e7000-67f843fff : reserved
>   67f844000-67fffffff : reserved
> 
> With the patch applied:
> 
> $ cat /proc/iomem
> 30000000-37ffffff : memory2
> 38000000-3fffffff : memory3
> 48000000-bfffffff : System RAM
>   48210000-496affff : Kernel code
>   496b0000-4987ffff : reserved
>   49880000-49a8ffff : Kernel data
>   b9eca000-b9ed8fff : reserved
>   ba000000-bfffffff : reserved
> e6020000-e602000b : e6020000.watchdog watchdog@...20000 e6050000-e605004f : e6050000.gpio
> gpio@...50000 e6051000-e605104f : e6051000.gpio gpio@...51000 e6052000-e605204f : e6052000.gpio
> gpio@...52000 e6053000-e605304f : e6053000.gpio gpio@...53000 e6054000-e605404f : e6054000.gpio
> gpio@...54000 e6055000-e605504f : e6055000.gpio gpio@...55000 e6055400-e605544f : e6055400.gpio
> gpio@...55400 e6055800-e605584f : e6055800.gpio gpio@...55800 e6060000-e606050b : e6060000.pinctrl
> pinctrl@...60000 e6198000-e61980ff : e6198000.thermal thermal@...98000 e61a0000-e61a00ff :
> e6198000.thermal thermal@...98000 e61a8000-e61a80ff : e6198000.thermal thermal@...98000 e61c0000-
> e61c01ff : e61c0000.interrupt-controller interrupt-controller@...c0000 e6510000-e651003f :
> e6510000.i2c i2c@...10000 e6540000-e654005f : e6540000.serial e6590000-e65901ff : e6590000.usb
> usb@...90000 e65a0000-e65a00ff : e65a0000.dma-controller dma-controller@...a0000 e65b0000-e65b00ff :
> e65b0000.dma-controller dma-controller@...b0000 e65ee000-e65ee08f : e65ee000.usb-phy usb-phy@...ee000
> e66d8000-e66d803f : e66d8000.i2c i2c@...d8000 e6700000-e670ffff : e6700000.dma-controller dma-
> controller@...00000 e6800000-e68007ff : e6800000.ethernet ethernet@...00000 e6c30000-e6c30fff :
> e6c30000.can can@...30000 e6c38000-e6c38fff : e6c38000.can can@...38000
> e6e30000-e6e30007 : e6e30000.pwm pwm@...30000 e6e88000-e6e8803f : e6e88000.serial e7300000-e730ffff :
> e7300000.dma-controller dma-controller@...00000 e7310000-e731ffff : e7310000.dma-controller dma-
> controller@...10000 ec500000-ec500fff : ec500000.sound scu ec540000-ec540fff : ec500000.sound ssiu
> ec541000-ec54127f : ec500000.sound ssi ec5a0000-ec5a00ff : ec500000.sound adg ec700000-ec70ffff :
> ec700000.dma-controller dma-controller@...00000 ec720000-ec72ffff : ec720000.dma-controller dma-
> controller@...20000 ec760000-ec7601ff : ec500000.sound audmapp ee020000-ee0203ff : ee020000.usb
> usb@...20000 ee080000-ee0800ff : ee080000.usb usb@...80000 ee080100-ee0801ff : ee080100.usb
> usb@...80100 ee080200-ee0808ff : ee080200.usb-phy usb-phy@...80200 ee0a0000-ee0a00ff : ee0a0000.usb
> usb@...a0000 ee0a0100-ee0a01ff : ee0a0100.usb usb@...a0100 ee0a0200-ee0a08ff : ee0a0200.usb-phy usb-
> phy@...a0200 ee100000-ee101fff : ee100000.mmc mmc@...00000 ee140000-ee141fff : ee140000.mmc
> mmc@...40000 ee160000-ee161fff : ee160000.mmc mmc@...60000 fe000000-fe07ffff : fe000000.pcie-ep apb-
> base fe100000-fe1fffff : memory0 fe200000-fe3fffff : memory1 fe940000-fe9423ff : fe940000.fdp1
> fdp1@...40000 fe960000-fe967fff : fe960000.vsp vsp@...60000 fe9a0000-fe9a7fff : fe9a0000.vsp
> vsp@...a0000 fea20000-fea24fff : fea20000.vsp vsp@...20000 fea28000-fea2cfff : fea28000.vsp
> vsp@...28000 fea30000-fea34fff : fea30000.vsp vsp@...30000 fead0000-feadffff : fead0000.hdmi
> hdmi@...d0000 feb00000-feb6ffff : feb00000.display display@...00000 600000000-67fffffff : System RAM
>   67b140000-67f5fffff : reserved
>   67f64d000-67f64dfff : reserved
>   67f64e000-67f6ddfff : reserved
>   67f6df000-67f6e2fff : reserved
>   67f6e3000-67f7e6fff : reserved
>   67f7e7000-67f843fff : reserved
>   67f844000-67fffffff : reserved

Thanks for the logs.

Cool, basically

Before patch:

fe000000-fe07ffff : fe000000.pcie-ep apb-base
fe100000-fe1fffff :
fe200000-fe3fffff :

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.


Cheers,
Biju

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ