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]
Date:   Wed, 7 Jul 2021 01:42:24 +0000
From:   "Peng Fan (OSS)" <peng.fan@....nxp.com>
To:     "Peng Fan (OSS)" <peng.fan@....nxp.com>,
        "ohad@...ery.com" <ohad@...ery.com>,
        "bjorn.andersson@...aro.org" <bjorn.andersson@...aro.org>,
        "mathieu.poirier@...aro.org" <mathieu.poirier@...aro.org>,
        "o.rempel@...gutronix.de" <o.rempel@...gutronix.de>
CC:     "shawnguo@...nel.org" <shawnguo@...nel.org>,
        "s.hauer@...gutronix.de" <s.hauer@...gutronix.de>,
        "kernel@...gutronix.de" <kernel@...gutronix.de>,
        "festevam@...il.com" <festevam@...il.com>,
        dl-linux-imx <linux-imx@....com>,
        "linux-remoteproc@...r.kernel.org" <linux-remoteproc@...r.kernel.org>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Aisheng Dong <aisheng.dong@....com>,
        kernel test robot <lkp@...el.com>
Subject: RE: [PATCH V2] remoteproc: elf_loader: fix loading segment when
 is_iomem true

Hi Bjorn,

> Subject: [PATCH V2] remoteproc: elf_loader: fix loading segment when
> is_iomem true

Would you pick up this as a fix?

Thanks,
Peng.

> 
> From: Peng Fan <peng.fan@....com>
> 
> It seems luckliy work on i.MX platform, but it is wrong.
> Need use memcpy_toio, not memcpy_fromio.
> 
> Fixes: 40df0a91b2a52 ("remoteproc: add is_iomem to da_to_va")
> Tested-by: Dong Aisheng <aisheng.dong@....com> (i.MX8MQ)
> Reported-by: kernel test robot <lkp@...el.com>
> Reported-by: Dong Aisheng <aisheng.dong@....com>
> Signed-off-by: Peng Fan <peng.fan@....com>
> ---
> 
> V2:
>  the __iomem cast should be for the 1st parameter.
> 
>  drivers/remoteproc/remoteproc_elf_loader.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/remoteproc/remoteproc_elf_loader.c
> b/drivers/remoteproc/remoteproc_elf_loader.c
> index 469c52e62faf..44e7f9308f4b 100644
> --- a/drivers/remoteproc/remoteproc_elf_loader.c
> +++ b/drivers/remoteproc/remoteproc_elf_loader.c
> @@ -220,7 +220,7 @@ int rproc_elf_load_segments(struct rproc *rproc,
> const struct firmware *fw)
>  		/* put the segment where the remote processor expects it */
>  		if (filesz) {
>  			if (is_iomem)
> -				memcpy_fromio(ptr, (void __iomem *)(elf_data + offset),
> filesz);
> +				memcpy_toio((void __iomem *)ptr, elf_data + offset,
> filesz);
>  			else
>  				memcpy(ptr, elf_data + offset, filesz);
>  		}
> --
> 2.30.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ