Re: [PATCH 1/1] fanotify_init.2: checking event_f_flags

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/15/2014 07:35 PM, Heinrich Schuchardt wrote:
> With a new patch included in the mm tree event_f_flags is checked for
> allowable values.

Thanks Heinrich. Applied, with minor tweaks.

Cheers,

Michael


> 
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@xxxxxx>
> ---
>  man2/fanotify_init.2 | 34 +++++++++++++++++++++++++++-------
>  1 file changed, 27 insertions(+), 7 deletions(-)
> 
> diff --git a/man2/fanotify_init.2 b/man2/fanotify_init.2
> index 2cb2887..9e0a36c 100644
> --- a/man2/fanotify_init.2
> +++ b/man2/fanotify_init.2
> @@ -152,7 +152,9 @@ For details of these flags, see the description of the
>  .I flags
>  values in
>  .BR open (2).
> -Useful values are:
> +.I event_f_flags
> +comprises a multi-bit field for the access mode.
> +This field can take the following values:
>  .TP
>  .B O_RDONLY
>  This value allows only read access.
> @@ -162,9 +164,10 @@ This value allows only write access.
>  .TP
>  .B O_RDWR
>  This value allows read and write access.
> -.TP
> -.B O_CLOEXEC
> -Enable the close-on-exec flag for the file descriptor.
> +.PP
> +Additional bits can be set in
> +.IR event_f_flags .
> +The most useful values are:
>  .TP
>  .B O_LARGEFILE
>  Enable support for files exceeding 2 GB.
> @@ -172,6 +175,20 @@ Failing to set this flag will result in an
>  .B EOVERFLOW
>  error when trying to open a large file which is monitored by
>  an fanotify group on a 32-bit system.
> +.TP
> +.B O_CLOEXEC
> +Enable the close-on-exec flag for the file descriptor.
> +.PP
> +The following are also allowable:
> +.BR O_APPEND ,
> +.BR O_DSYNC ,
> +.BR O_NOATIME ,
> +.BR O_NONBLOCK ,
> +and
> +.BR O_SYNC .
> +All other values will lead to an error
> +.B EINVAL
> +(but see BUGS).
>  .SH RETURN VALUE
>  On success,
>  .BR fanotify_init ()
> @@ -183,9 +200,12 @@ is set to indicate the error.
>  .TP
>  .B EINVAL
>  An invalid value was passed in
> -.IR flags .
> +.I flags
> +or
> +.IR event_f_flags .
>  .B FAN_ALL_INIT_FLAGS
> -defines all allowable bits.
> +defines all allowable bits for
> +.IR flags .
>  .TP
>  .B EMFILE
>  The number of fanotify groups for this user exceeds 128.
> @@ -213,7 +233,7 @@ This system call is Linux-specific.
>  As of Linux 3.15,
>  the following bug exists:
>  .IP * 3
> -.\" FIXME: Patch proposed.
> +.\" FIXME: Patch accepted to mm tree.
>  The
>  .I event_f_flags
>  argument is not checked for invalid flags.
> 


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux