aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlejandro Colomar <alx@kernel.org>2024-05-30 00:54:49 +0200
committerAlejandro Colomar <alx@kernel.org>2024-05-31 01:53:41 +0200
commit6d8e5a75fedd9ee91e338c058834bd436cc9efa6 (patch)
treefdfc66da4c80f3c068f852e7585940b68326b907
parent7c9a9da1b4fac101faf52efcbf00875bad2cbfe7 (diff)
downloadman-pages-6d8e5a75fedd9ee91e338c058834bd436cc9efa6.tar.gz
prctl.2, PR_SET_SECCOMP.2const: Split PR_SET_SECCOMP from prctl(2)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
-rw-r--r--man/man2/prctl.299
-rw-r--r--man/man2const/PR_SET_SECCOMP.2const140
2 files changed, 144 insertions, 95 deletions
diff --git a/man/man2/prctl.2 b/man/man2/prctl.2
index ef2e896e51..1e0f7c10d4 100644
--- a/man/man2/prctl.2
+++ b/man/man2/prctl.2
@@ -16,10 +16,9 @@
.\" PR_SET_UNALIGN, PR_GET_UNALIGN,
.\" 2008-06-13 Erik Bosman, <ejbosman@cs.vu.nl>
.\" Document PR_GET_TSC and PR_SET_TSC.
-.\" 2008-06-15 mtk, Document PR_SET_SECCOMP, PR_GET_SECCOMP
+.\" 2008-06-15 mtk, Document PR_GET_SECCOMP
.\" 2012-04-25 Michael Kerrisk, Document PR_TASK_PERF_EVENTS_DISABLE and
.\" PR_TASK_PERF_EVENTS_ENABLE
-.\" 2012-09-20 Kees Cook, update PR_SET_SECCOMP for mode 2
.\" 2012-10-25 Michael Kerrisk, Document PR_SET_TIMERSLACK and
.\" PR_GET_TIMERSLACK
.\"
@@ -117,59 +116,8 @@ The first argument can be:
.B PR_GET_PDEATHSIG
.TQ
.B PR_SET_PTRACER
-.\" prctl PR_SET_SECCOMP
-.TP
-.BR PR_SET_SECCOMP " (since Linux 2.6.23)"
-.\" See http://thread.gmane.org/gmane.linux.kernel/542632
-.\" [PATCH 0 of 2] seccomp updates
-.\" andrea@cpushare.com
-Set the secure computing (seccomp) mode for the calling thread, to limit
-the available system calls.
-The more recent
-.BR seccomp (2)
-system call provides a superset of the functionality of
-.BR PR_SET_SECCOMP ,
-and is the preferred interface for new applications.
-.IP
-The seccomp mode is selected via
-.IR arg2 .
-(The seccomp constants are defined in
-.IR <linux/seccomp.h> .)
-The following values can be specified:
-.RS
-.TP
-.BR SECCOMP_MODE_STRICT " (since Linux 2.6.23)"
-See the description of
-.B SECCOMP_SET_MODE_STRICT
-in
-.BR seccomp (2).
-.IP
-This operation is available only
-if the kernel is configured with
-.B CONFIG_SECCOMP
-enabled.
-.TP
-.BR SECCOMP_MODE_FILTER " (since Linux 3.5)"
-The allowed system calls are defined by a pointer
-to a Berkeley Packet Filter passed in
-.IR arg3 .
-This argument is a pointer to
-.IR "struct sock_fprog" ;
-it can be designed to filter
-arbitrary system calls and system call arguments.
-See the description of
-.B SECCOMP_SET_MODE_FILTER
-in
-.BR seccomp (2).
-.IP
-This operation is available only
-if the kernel is configured with
-.B CONFIG_SECCOMP_FILTER
-enabled.
-.RE
-.IP
-For further details on seccomp filtering, see
-.BR seccomp (2).
+.TQ
+.B PR_SET_SECCOMP
.\" prctl PR_GET_SECCOMP
.TP
.BR PR_GET_SECCOMP " (since Linux 2.6.23)"
@@ -1065,21 +1013,6 @@ On error, \-1 is returned, and
is set to indicate the error.
.SH ERRORS
.TP
-.B EACCES
-.I op
-is
-.B PR_SET_SECCOMP
-and
-.I arg2
-is
-.BR SECCOMP_MODE_FILTER ,
-but the process does not have the
-.B CAP_SYS_ADMIN
-capability or has not set the
-.I no_new_privs
-attribute (see
-.BR PR_SET_NO_NEW_PRIVS (2const)).
-.TP
.B EFAULT
.I arg2
is an invalid address.
@@ -1087,19 +1020,6 @@ is an invalid address.
.B EFAULT
.I op
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 EFAULT
-.I op
-is
.B PR_SET_SYSCALL_USER_DISPATCH
and
.I arg5
@@ -1122,8 +1042,6 @@ is not a valid value for this
.B EINVAL
.I op
is
-.B PR_SET_SECCOMP
-or
.BR PR_GET_SECCOMP ,
and the kernel was not configured with
.BR CONFIG_SECCOMP .
@@ -1131,16 +1049,6 @@ and the kernel was not configured with
.B EINVAL
.I op
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 op
-is
.B PR_SET_TIMING
and
.I arg2
@@ -1302,4 +1210,5 @@ glibc 2.0.6
.BR PR_SET_PDEATHSIG (2const),
.BR PR_GET_PDEATHSIG (2const),
.BR PR_SET_PTRACER (2const),
+.BR PR_SET_SECCOMP (2const),
.BR core (5)
diff --git a/man/man2const/PR_SET_SECCOMP.2const b/man/man2const/PR_SET_SECCOMP.2const
new file mode 100644
index 0000000000..8af305468a
--- /dev/null
+++ b/man/man2const/PR_SET_SECCOMP.2const
@@ -0,0 +1,140 @@
+.\" Copyright 2008, 2012, 2013, 2015, Michael Kerrisk <mtk.manpages@gmail.com>
+.\" Copyright 2012, Kees Cook <keescook@chromium.org>
+.\"
+.\" SPDX-License-Identifier: Linux-man-pages-copyleft
+.\"
+.\" 2008-06-15 mtk, Document PR_SET_SECCOMP
+.\" 2012-09-20 Kees Cook, update PR_SET_SECCOMP for mode 2
+.\"
+.TH PR_SET_SECCOMP 2const (date) "Linux man-pages (unreleased)"
+.SH NAME
+PR_SET_SECCOMP
+\-
+set the secure computing mode
+.SH LIBRARY
+Standard C library
+.RI ( libc ", " \-lc )
+.SH SYNOPSIS
+.nf
+.B #include <sys/prctl.h>
+.P
+.BI "int prctl(int " op ", ...);"
+.fi
+.SH DESCRIPTION
+.TP
+.BR PR_SET_SECCOMP " (since Linux 2.6.23)"
+.\" See http://thread.gmane.org/gmane.linux.kernel/542632
+.\" [PATCH 0 of 2] seccomp updates
+.\" andrea@cpushare.com
+Set the secure computing (seccomp) mode for the calling thread, to limit
+the available system calls.
+The more recent
+.BR seccomp (2)
+system call provides a superset of the functionality of
+.BR PR_SET_SECCOMP ,
+and is the preferred interface for new applications.
+.IP
+The seccomp mode is selected via
+.IR arg2 .
+(The seccomp constants are defined in
+.IR <linux/seccomp.h> .)
+The following values can be specified:
+.RS
+.TP
+.BR SECCOMP_MODE_STRICT " (since Linux 2.6.23)"
+See the description of
+.B SECCOMP_SET_MODE_STRICT
+in
+.BR seccomp (2).
+.IP
+This operation is available only
+if the kernel is configured with
+.B CONFIG_SECCOMP
+enabled.
+.TP
+.BR SECCOMP_MODE_FILTER " (since Linux 3.5)"
+The allowed system calls are defined by a pointer
+to a Berkeley Packet Filter passed in
+.IR arg3 .
+This argument is a pointer to
+.IR "struct sock_fprog" ;
+it can be designed to filter
+arbitrary system calls and system call arguments.
+See the description of
+.B SECCOMP_SET_MODE_FILTER
+in
+.BR seccomp (2).
+.IP
+This operation is available only
+if the kernel is configured with
+.B CONFIG_SECCOMP_FILTER
+enabled.
+.RE
+.IP
+For further details on seccomp filtering, see
+.BR seccomp (2).
+.SH RETURN VALUE
+On success,
+0 is returned.
+On error, \-1 is returned, and
+.I errno
+is set to indicate the error.
+.SH ERRORS
+.TP
+.B EACCES
+.I op
+is
+.B PR_SET_SECCOMP
+and
+.I arg2
+is
+.BR SECCOMP_MODE_FILTER ,
+but the process does not have the
+.B CAP_SYS_ADMIN
+capability or has not set the
+.I no_new_privs
+attribute (see
+.BR PR_SET_NO_NEW_PRIVS (2const)).
+.TP
+.B EFAULT
+.I op
+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
+.I arg2
+is not a valid value.
+.TP
+.B EINVAL
+.I op
+is
+.B PR_SET_SECCOMP
+or
+.BR PR_GET_SECCOMP ,
+and the kernel was not configured with
+.BR CONFIG_SECCOMP .
+.TP
+.B EINVAL
+.I op
+is
+.BR PR_SET_SECCOMP ,
+.I arg2
+is
+.BR SECCOMP_MODE_FILTER ,
+and the kernel was not configured with
+.BR CONFIG_SECCOMP_FILTER .
+.SH STANDARDS
+Linux.
+.SH HISTORY
+.SH SEE ALSO
+.BR prctl (2),
+.BR PR_GET_SECCOMP (2const),
+.BR seccomp (2)