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: <20160811094345.GQ10429@imgtec.com>
Date:	Thu, 11 Aug 2016 10:43:45 +0100
From:	Eric Engestrom <eric.engestrom@...tec.com>
To:	Gustavo Padovan <gustavo@...ovan.org>
CC:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	<devel@...verdev.osuosl.org>, Daniel Stone <daniels@...labora.com>,
	Daniel Vetter <daniel.vetter@...ll.ch>,
	Riley Andrews <riandrews@...roid.com>,
	<dri-devel@...ts.freedesktop.org>, <linux-kernel@...r.kernel.org>,
	Arve Hjønnevåg <arve@...roid.com>,
	<pavel@....cz>, Gustavo Padovan <gustavo.padovan@...labora.co.uk>,
	John Harrison <John.C.Harrison@...el.com>
Subject: Re: [PATCH v2 5/6] staging/android: add Doc for SW_SYNC ioctl
 interface

On Mon, Aug 08, 2016 at 06:24:21PM -0300, Gustavo Padovan wrote:
> From: Gustavo Padovan <gustavo.padovan@...labora.co.uk>
> 
> This interface is hidden from kernel headers and it is intended for use
> only for testing. So testers would have to add the ioctl information
> internally. This is to prevent misuse of this feature.
> 
> Signed-off-by: Gustavo Padovan <gustavo.padovan@...labora.co.uk>
> ---
>  drivers/staging/android/sw_sync.c | 31 +++++++++++++++++++++++++++++++
>  1 file changed, 31 insertions(+)
> 
> diff --git a/drivers/staging/android/sw_sync.c b/drivers/staging/android/sw_sync.c
> index 43491b6..2ac5608 100644
> --- a/drivers/staging/android/sw_sync.c
> +++ b/drivers/staging/android/sw_sync.c
> @@ -25,6 +25,36 @@
>  #define CREATE_TRACE_POINTS
>  #include "sync_trace.h"
>  
> +/*
> + * SW SYNC validation framework
> + *
> + * A sync object driver that uses a 32bit counter to coordinate
> + * synchronization.  Useful when there is no hardware primitive backing
> + * the synchronization.
> + *
> + * To start the framework just open:
> + *
> + * <debugfs>/sync/sw_sync
> + *
> + * That will create a sync timeline, all fences created under this timeline
> + * file descriptor will belong to the this timeline.
> + *
> + * The 'sw_sync' file can be opened many times as to create different
> + * timelines.
> + *
> + * Fences can be created with SW_SYNC_IOC_CREATE_FENCE ioctl with struct
> + * sw_sync_ioctl_create_fence as parameter.
> + *
> + * To increment the timeline counter SW_SYNC_IOC_INC ioctl should be used
> + * with the increment as u32. This will update the last signaled value
> + * from the timeline and signal any fence that has seqno, smaller of equal
> + * it.

This last paragraph could use some love: comma before "SW_SYNC_IOC_INC",
"that has seqno smaller or equal to it."

> + *
> + * struct sw_sync_ioctl_create_fence
> + * @value:	the seqno to initiate the fence with

s/initiate/initialise/

With these fixed,
Reviewed-by: Eric Engestrom <eric.engestrom@...tec.com>

> + * @name:	the name of the new sync point
> + * @fence:	return the fd of the new sync_file with the created fence
> + */
>  struct sw_sync_create_fence_data {
>  	__u32	value;
>  	char	name[32];
> @@ -35,6 +65,7 @@ struct sw_sync_create_fence_data {
>  
>  #define SW_SYNC_IOC_CREATE_FENCE	_IOWR(SW_SYNC_IOC_MAGIC, 0,\
>  		struct sw_sync_create_fence_data)
> +
>  #define SW_SYNC_IOC_INC			_IOW(SW_SYNC_IOC_MAGIC, 1, __u32)
>  
>  static const struct fence_ops timeline_fence_ops;
> -- 
> 2.5.5

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ