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: <CAL_JsqJ1btLjZO_Z7H+qYZhWwTn0Wpq4Ji=deKdUxTwLHw-pTA@mail.gmail.com>
Date: Wed, 20 Aug 2025 14:31:07 -0500
From: Rob Herring <robh@...nel.org>
To: Daniel Baluta <daniel.baluta@...il.com>
Cc: Dmitry Baryshkov <dmitry.baryshkov@....qualcomm.com>, 
	Bjorn Andersson <andersson@...nel.org>, Mathieu Poirier <mathieu.poirier@...aro.org>, 
	Shawn Guo <shawnguo@...nel.org>, Sascha Hauer <s.hauer@...gutronix.de>, 
	Pengutronix Kernel Team <kernel@...gutronix.de>, Fabio Estevam <festevam@...il.com>, 
	Geert Uytterhoeven <geert+renesas@...der.be>, Magnus Damm <magnus.damm@...il.com>, 
	Patrice Chotard <patrice.chotard@...s.st.com>, Maxime Coquelin <mcoquelin.stm32@...il.com>, 
	Alexandre Torgue <alexandre.torgue@...s.st.com>, 
	Arnaud Pouliquen <arnaud.pouliquen@...s.st.com>, Peng Fan <peng.fan@....com>, 
	linux-remoteproc@...r.kernel.org, imx@...ts.linux.dev, 
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org, 
	linux-arm-msm@...r.kernel.org, linux-renesas-soc@...r.kernel.org, 
	linux-stm32@...md-mailman.stormreply.com, 
	Iuliana Prodan <iuliana.prodan@....com>, Laurentiu Mihalcea <laurentiu.mihalcea@....com>, 
	Aisheng Dong <aisheng.dong@....com>
Subject: Re: [PATCH v5] remoteproc: Use of_reserved_mem_region_* functions for "memory-region"

On Wed, Aug 20, 2025 at 3:19 AM Daniel Baluta <daniel.baluta@...il.com> wrote:
>
> Hi Rob,
>
> This patch will break IMX RPROC support.
> <snip>
>
> > --- a/drivers/remoteproc/imx_rproc.c
> > +++ b/drivers/remoteproc/imx_rproc.c
>
> <snip>
> >  static int imx_rproc_parse_fw(struct rproc *rproc, const struct firmware *fw)
> <snip>
>
> > -               priv->mem[b].cpu_addr = devm_ioremap_wc(&pdev->dev, res.start, resource_size(&res));
> > +               priv->mem[b].cpu_addr = devm_ioremap_resource_wc(&pdev->dev, &res);
>
> devm_ioremap_resource_wc works only for IORESOURCE_MEM resources:
>
> lib/devres.c:124
> static void __iomem *
> __devm_ioremap_resource(struct device *dev, const struct resource *res,
>
> »       if (!res || resource_type(res) != IORESOURCE_MEM) {
> »       »       ret = dev_err_probe(dev, -EINVAL, "invalid resource
> %pR\n", res);
> »       »       return IOMEM_ERR_PTR(ret);
> »       }
>
> while the devm_ioremap_wc doesn't care about this.
>
> So we cannot use devm_ioremap_resource_wc here unless you add
> IORESOURCE_MEM flags
> to  of_reserved_mem_region_to_resource as discussed here:
>
> https://lkml.org/lkml/2025/4/28/759
>
> The same issue we are already experiencing with Sound Open Firmware
> where the change was already merged
> and we have a bug already reported.
>
> How should we fix this:
>
> 1) Add  res->flags = IORESOURCE_MEM; in  of_reserved_mem_region_to_resource

Sigh. I thought I rolled that change into it. I just sent a fix[1].

Rob

[1] https://lore.kernel.org/all/20250820192805.565568-1-robh@kernel.org/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ