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]
Date:	Fri, 22 Apr 2016 23:45:59 -0500
From:	Andy Gross <andy.gross@...aro.org>
To:	Bjorn Andersson <bjorn.andersson@...aro.org>
Cc:	linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org,
	Stephen Boyd <sboyd@...eaurora.org>,
	devicetree@...r.kernel.org,
	Bjorn Andersson <bjorn.andersson@...ymobile.com>,
	jilai wang <jilaiw@...eaurora.org>
Subject: Re: [PATCH 6/8] firmware: qcom: scm: Add memory allocation API

On Fri, Apr 22, 2016 at 04:23:31PM -0700, Bjorn Andersson wrote:
> On Fri 22 Apr 15:17 PDT 2016, Andy Gross wrote:
> 
> > This patch adds APIs for the scm-32 and scm-64 to use for coherent memory
> > allocation.
> > 
> > Signed-off-by: Andy Gross <andy.gross@...aro.org>
> 
> This patch must come before the ARM64 implementation.

Oops I got my order a little mixed up.  I can shift it around or just redo the
commit message.  I am going to switch the scm-32 to use this as well.

> 
> > ---
> >  drivers/firmware/qcom_scm.c | 17 +++++++++++++++++
> >  drivers/firmware/qcom_scm.h |  4 ++++
> >  2 files changed, 21 insertions(+)
> > 
> > diff --git a/drivers/firmware/qcom_scm.c b/drivers/firmware/qcom_scm.c
> [..]
> > +
> > +void qcom_scm_free_buffer(size_t size, void *cpu_addr,
> > +				 dma_addr_t dma_addr)
> > +{
> > +	if (__scm)
> 
> This would be quite bad and the caller expects that the memory is
> released when you return from here. This should also only happen if the
> arch specific implementation is buggy, so just let it go BANG!

Agreed.

> 
> > +		dma_free_writecombine(__scm->dev, size, cpu_addr, dma_addr);
> > +}
> > +

Thanks for the review

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ