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: <2412fafd-6544-1d62-a8c6-5162d2d8cfb4@st.com>
Date:   Wed, 8 Feb 2017 09:00:53 +0000
From:   Hugues FRUCHET <hugues.fruchet@...com>
To:     Loic PALLARDY <loic.pallardy@...com>,
        "bjorn.andersson@...aro.org" <bjorn.andersson@...aro.org>,
        "ohad@...ery.com" <ohad@...ery.com>,
        "lee.jones@...aro.org" <lee.jones@...aro.org>
CC:     "linux-remoteproc@...r.kernel.org" <linux-remoteproc@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "kernel@...inux.com" <kernel@...inux.com>,
        Patrice CHOTARD <patrice.chotard@...com>,
        "peter.griffin@...aro.org" <peter.griffin@...aro.org>
Subject: Re: [v3, 4/4] remoteproc: core: don't allocate carveout if pa or da
 are defined



On 01/31/2017 01:35 PM, Loic PALLARDY wrote:
> Remoteproc doesn't check if firmware requests fixed
> addresses for carveout regions.
> Current assumption is that platform specific driver is in
> charge of coprocessor specific memory region allocation and
> remoteproc core doesn't have to handle them.
> If a da or a pa is specified in firmware resource table, remoteproc
> core doesn't have to perform any allocation.
> Access to carveout will be done thanks to rproc_da_to_pa function,
> which will provide virtual address on carveout region allocated
> by platform specific driver.
>
> Signed-off-by: Loic Pallardy <loic.pallardy@...com>

Acked-and-tested-by: Hugues Fruchet <hugues.fruchet@...com>

Tested on B2260 ST Platform with st-delta video decoder V4L2 kernel 
driver 
(http://www.mail-archive.com/linux-media@vger.kernel.org/msg107644.html).

> ---
> No change since V1
>
>  drivers/remoteproc/remoteproc_core.c | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c
> index 90b05c7..dd63ceed 100644
> --- a/drivers/remoteproc/remoteproc_core.c
> +++ b/drivers/remoteproc/remoteproc_core.c
> @@ -622,6 +622,11 @@ static int rproc_handle_carveout(struct rproc *rproc,
>  	dev_dbg(dev, "carveout rsc: name: %s, da 0x%x, pa 0x%x, len 0x%x, flags 0x%x\n",
>  		rsc->name, rsc->da, rsc->pa, rsc->len, rsc->flags);
>
> +	if (rsc->pa != FW_RSC_ADDR_ANY || rsc->da != FW_RSC_ADDR_ANY) {
> +		dev_dbg(dev, "carveout already allocated by low level driver\n");
> +		return 0;
> +	}
> +
>  	carveout = kzalloc(sizeof(*carveout), GFP_KERNEL);
>  	if (!carveout)
>  		return -ENOMEM;
>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ