prctl.2: Document SECCOMP_MODE_FILTER vs EFAULT

This notes the distinction made between EINVAL and EFAULT when
attempting to use SECCOMP_MODE_FILTER with PR_SET_SECCOMP.

Suggested-by: Andy Lutomirski <luto@amacapital.net>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Kees Cook 2014-09-25 15:47:47 -07:00 committed by Michael Kerrisk
parent 15b236f3ac
commit e35a05129d
1 changed files with 23 additions and 0 deletions

View File

@ -827,6 +827,19 @@ is set appropriately.
.I arg2
is an invalid address.
.TP
.B EFAULT
.I option
is
.BR PR_SET_SECCOMP ,
.I arg2
is
.BR SECCOMP_MODE_FILTER ,
the system was built with
.BR CONFIG_SECCOMP_FILTER
and
.I arg3
is an invalid address.
.TP
.B EINVAL
The value of
.I option
@ -861,6 +874,16 @@ and the kernel was not configured with
.B EINVAL
.I option
is
.BR PR_SET_SECCOMP ,
.I arg2
is
.BR SECCOMP_MODE_FILTER ,
and the kernel was not configured with
.BR CONFIG_SECCOMP_FILTER .
.TP
.B EINVAL
.I option
is
.BR PR_SET_MM ,
and one of the following is true
.RS