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: <2107949.TNqhOsq2WF@harkonnen>
Date:	Thu, 13 Sep 2012 17:46:32 +0200
From:	Federico Vaga <federico.vaga@...il.com>
To:	Marek Szyprowski <m.szyprowski@...sung.com>
Cc:	'Mauro Carvalho Chehab' <mchehab@...radead.org>,
	'Pawel Osciak' <pawel@...iak.com>,
	'Hans Verkuil' <hans.verkuil@...co.com>,
	'Giancarlo Asnaghi' <giancarlo.asnaghi@...com>,
	linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
	'Jonathan Corbet' <corbet@....net>
Subject: Re: [PATCH 3/4] videobuf2-dma-streaming: new videobuf2 memory allocator

> On Thursday, September 13, 2012 3:53 PM Federico Vaga wrote:
> > Signed-off-by: Federico Vaga <federico.vaga@...il.com>
> 
> A few words explaining why this memory handling module is required or
> beneficial will definitely improve the commit :)

ok, I will write some lines

> > +static void *vb2_dma_streaming_cookie(void *buf_priv)
> > +{
> > +	struct vb2_streaming_buf *buf = buf_priv;
> > +
> > +	return (void *)buf->dma_handle;
> > +}
> 
> Please change this function to:
> 
> static void *vb2_dma_streaming_cookie(void *buf_priv)
> {
> 	struct vb2_streaming_buf *buf = buf_priv;
> 	return &buf->dma_handle;
> }
> 
> and add a following static inline to
> include/media/videobuf2-dma-streaming.h:
> 
> static inline dma_addr_t
> vb2_dma_streaming_plane_paddr(struct vb2_buffer *vb, unsigned int
> plane_no) {
>         dma_addr_t *dma_addr = vb2_plane_cookie(vb, plane_no);
>         return *dma_addr;
> }
> 
> Do not use 'cookie' callback directly in the driver, the driver should
> use the above proxy.
> 
> The &buf->dma_handle workaround is required for some possible
> configurations with 64bit dma addresses, see commit 472af2b05bdefc.

ACK.

-- 
Federico Vaga
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ