* [PATCH 00/10] man2: SYNOPSIS: Use syscall, and fix includes.
@ 2021-05-21 23:25 Alejandro Colomar
2021-05-21 23:25 ` [PATCH 01/10] open.2: Remove unused <sys/stat.h> Alejandro Colomar
` (9 more replies)
0 siblings, 10 replies; 34+ messages in thread
From: Alejandro Colomar @ 2021-05-21 23:25 UTC (permalink / raw)
To: mtk.manpages; +Cc: Alejandro Colomar, linux-man
Hi Michael,
Almost finished these:
$ man_lsfunc man2 | sed -n '/socketcall/,$p' | wc -l
67
$ man_lsfunc man2 | wc -l
401
$
A remainder for myself of commands needed to do this:
.../man-pages$ man_section man2 SYNOPSIS 'CONFORMING TO' NOTES \
| sed -n '/SOCKETCALL/,$p' \
| sponge | less;
.../glibc$ man_lsfunc ../../linux/man-pages/man2 \
| while read -r syscall; do \
echo "============================= ${syscall}"; \
grep_glibc_prototype ${syscall}; \
done \
| sed -e 's/\bextern //' -e 's/\b_*//g' \
| sed -n '/socketcall/,$p' \
| sponge | less;
Kind regards,
Alex
Alejandro Colomar (10):
open.2: Remove unused <sys/stat.h>
rt_sigqueueinfo.2: Use syscall(SYS_...); for system calls without a
wrapper
seccomp.2: Document why each header is needed
(not sending this one; already sent last week)
<https://lore.kernel.org/linux-man/20210515182254.186607-1-alx.manpages@gmail.com/T/#u>
seccomp.2: Use syscall(SYS_...); for system calls without a wrapper
(depends on the previous one)
set_thread_area.2: Use syscall(SYS_...); for system calls without a
wrapper
set_tid_address.2: Use syscall(SYS_...); for system calls without a
wrapper
sgetmask.2: Use syscall(SYS_...); for system calls without a wrapper
shmop.2: Remove unused include
sigprocmask.2: Use syscall(SYS_...); for raw system calls
socketcall.2: Use syscall(SYS_...); for system calls without a wrapper
man2/open.2 | 1 -
man2/rt_sigqueueinfo.2 | 11 ++++++++---
man2/seccomp.2 | 24 +++++++++++++-----------
man2/set_thread_area.2 | 24 ++++++++++++------------
man2/set_tid_address.2 | 13 +++++++------
man2/sgetmask.2 | 15 ++++++++-------
man2/shmop.2 | 1 -
man2/sigprocmask.2 | 8 ++++++--
man2/socketcall.2 | 15 ++++++++-------
9 files changed, 62 insertions(+), 50 deletions(-)
--
2.31.1
^ permalink raw reply [flat|nested] 34+ messages in thread
* [PATCH 01/10] open.2: Remove unused <sys/stat.h>
2021-05-21 23:25 [PATCH 00/10] man2: SYNOPSIS: Use syscall, and fix includes Alejandro Colomar
@ 2021-05-21 23:25 ` Alejandro Colomar
2021-05-21 23:25 ` [PATCH 02/10] rt_sigqueueinfo.2: Use syscall(SYS_...); for system calls without a wrapper Alejandro Colomar
` (8 subsequent siblings)
9 siblings, 0 replies; 34+ messages in thread
From: Alejandro Colomar @ 2021-05-21 23:25 UTC (permalink / raw)
To: mtk.manpages; +Cc: Alejandro Colomar, linux-man
I can't see a reason to include it. <fcntl.h> provides O_*
constants for 'flags', S_* constants for 'mode', and mode_t.
Probably a long time ago, some of those weren't defined in
<fcntl.h>, and both headers needed to be included, or maybe it's
a historical error.
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
---
man2/open.2 | 1 -
1 file changed, 1 deletion(-)
diff --git a/man2/open.2 b/man2/open.2
index bac1ee806..1bcd995f4 100644
--- a/man2/open.2
+++ b/man2/open.2
@@ -53,7 +53,6 @@
open, openat, creat \- open and possibly create a file
.SH SYNOPSIS
.nf
-.B #include <sys/stat.h>
.B #include <fcntl.h>
.PP
.BI "int open(const char *" pathname ", int " flags );
--
2.31.1
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH 02/10] rt_sigqueueinfo.2: Use syscall(SYS_...); for system calls without a wrapper
2021-05-21 23:25 [PATCH 00/10] man2: SYNOPSIS: Use syscall, and fix includes Alejandro Colomar
2021-05-21 23:25 ` [PATCH 01/10] open.2: Remove unused <sys/stat.h> Alejandro Colomar
@ 2021-05-21 23:25 ` Alejandro Colomar
2021-05-21 23:25 ` [PATCH 04/10] seccomp.2: " Alejandro Colomar
` (7 subsequent siblings)
9 siblings, 0 replies; 34+ messages in thread
From: Alejandro Colomar @ 2021-05-21 23:25 UTC (permalink / raw)
To: mtk.manpages; +Cc: Alejandro Colomar, linux-man
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
---
man2/rt_sigqueueinfo.2 | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/man2/rt_sigqueueinfo.2 b/man2/rt_sigqueueinfo.2
index 2dd1a5877..d48ecbdcd 100644
--- a/man2/rt_sigqueueinfo.2
+++ b/man2/rt_sigqueueinfo.2
@@ -27,9 +27,14 @@
rt_sigqueueinfo, rt_tgsigqueueinfo \- queue a signal and data
.SH SYNOPSIS
.nf
-.BI "int rt_sigqueueinfo(pid_t " tgid ", int " sig ", siginfo_t *" info );
-.BI "int rt_tgsigqueueinfo(pid_t " tgid ", pid_t " tid ", int " sig \
-", siginfo_t *" info );
+.BR "#include <linux/signal.h>" " /* Definition of " SI_* " constants */"
+.BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */"
+.B #include <unistd.h>
+.PP
+.BI "int syscall(SYS_rt_sigqueueinfo, pid_t " tgid ,
+.BI " int " sig ", siginfo_t *" info );
+.BI "int syscall(SYS_rt_tgsigqueueinfo, pid_t " tgid ", pid_t " tid ,
+.BI " int " sig ", siginfo_t *" info );
.fi
.PP
.IR Note :
--
2.31.1
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH 04/10] seccomp.2: Use syscall(SYS_...); for system calls without a wrapper
2021-05-21 23:25 [PATCH 00/10] man2: SYNOPSIS: Use syscall, and fix includes Alejandro Colomar
2021-05-21 23:25 ` [PATCH 01/10] open.2: Remove unused <sys/stat.h> Alejandro Colomar
2021-05-21 23:25 ` [PATCH 02/10] rt_sigqueueinfo.2: Use syscall(SYS_...); for system calls without a wrapper Alejandro Colomar
@ 2021-05-21 23:25 ` Alejandro Colomar
2021-05-21 23:25 ` [PATCH 05/10] set_thread_area.2: " Alejandro Colomar
` (6 subsequent siblings)
9 siblings, 0 replies; 34+ messages in thread
From: Alejandro Colomar @ 2021-05-21 23:25 UTC (permalink / raw)
To: mtk.manpages; +Cc: Alejandro Colomar, linux-man
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
---
man2/seccomp.2 | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/man2/seccomp.2 b/man2/seccomp.2
index 1be7d6766..476e5c2f0 100644
--- a/man2/seccomp.2
+++ b/man2/seccomp.2
@@ -37,13 +37,18 @@ seccomp \- operate on Secure Computing state of the process
.BR "#include <sys/ptrace.h>" " /* Definition of " PTRACE_* " constants */"
.\" Kees Cook noted: Anything that uses SECCOMP_RET_TRACE returns will
.\" need <sys/ptrace.h>
+.BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */"
+.B #include <unistd.h>
.PP
-.BI "int seccomp(unsigned int " operation ", unsigned int " flags \
-", void *" args );
+.BI "int syscall(SYS_seccomp, unsigned int " operation ", unsigned int " flags ,
+.BI " void *" args );
.fi
.PP
.IR Note :
-There is no glibc wrapper for this system call; see NOTES.
+glibc provides no wrapper for
+.BR seccomp (2),
+necessitating the use of
+.BR syscall (2).
.SH DESCRIPTION
The
.BR seccomp ()
@@ -858,9 +863,6 @@ Tile (since Linux 4.3)
PA-RISC (since Linux 4.6)
.\" User mode Linux since Linux 4.6
.PD
-.PP
-Glibc does not provide a wrapper for this system call; call it using
-.BR syscall (2).
.\"
.SS Caveats
There are various subtleties to consider when applying seccomp filters
--
2.31.1
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH 05/10] set_thread_area.2: Use syscall(SYS_...); for system calls without a wrapper
2021-05-21 23:25 [PATCH 00/10] man2: SYNOPSIS: Use syscall, and fix includes Alejandro Colomar
` (2 preceding siblings ...)
2021-05-21 23:25 ` [PATCH 04/10] seccomp.2: " Alejandro Colomar
@ 2021-05-21 23:25 ` Alejandro Colomar
2021-05-21 23:25 ` [PATCH 06/10] set_tid_address.2: " Alejandro Colomar
` (5 subsequent siblings)
9 siblings, 0 replies; 34+ messages in thread
From: Alejandro Colomar @ 2021-05-21 23:25 UTC (permalink / raw)
To: mtk.manpages; +Cc: Alejandro Colomar, linux-man
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
---
man2/set_thread_area.2 | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/man2/set_thread_area.2 b/man2/set_thread_area.2
index 284dea390..43f3009f7 100644
--- a/man2/set_thread_area.2
+++ b/man2/set_thread_area.2
@@ -11,28 +11,31 @@
get_thread_area, set_thread_area \- manipulate thread-local storage information
.SH SYNOPSIS
.nf
-.B #include <linux/unistd.h>
+.BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */"
+.B #include <unistd.h>
.PP
.B #if defined __i386__ || defined __x86_64__
-.B # include <asm/ldt.h>
+.BR "# include <asm/ldt.h>" " /* Definition of " "struct user_desc" " */"
.PP
-.BI "int get_thread_area(struct user_desc *" u_info );
-.BI "int set_thread_area(struct user_desc *" u_info );
+.BI "int syscall(SYS_get_thread_area, struct user_desc *" u_info );
+.BI "int syscall(SYS_set_thread_area, struct user_desc *" u_info );
.PP
.B #elif defined __m68k__
.PP
-.B "int get_thread_area(void);"
-.BI "int set_thread_area(unsigned long " tp );
+.B "int syscall(SYS_get_thread_area);"
+.BI "int syscall(SYS_set_thread_area, unsigned long " tp );
.PP
.B #elif defined __mips__
.PP
-.BI "int set_thread_area(unsigned long " addr );
+.BI "int syscall(SYS_set_thread_area, unsigned long " addr );
.PP
.B #endif
.fi
.PP
.IR Note :
-There are no glibc wrappers for these system calls; see NOTES.
+glibc provides no wrappers for these system calls,
+necessitating the use of
+.BR syscall (2).
.SH DESCRIPTION
These calls provide architecture-specific support for a thread-local storage
implementation.
@@ -172,10 +175,7 @@ and
are Linux-specific and should not be used in programs that are intended
to be portable.
.SH NOTES
-Glibc does not provide wrappers for these system calls,
-since they are generally intended for use only by threading libraries.
-In the unlikely event that you want to call them directly, use
-.BR syscall (2).
+These system calls are generally intended for use only by threading libraries.
.PP
.BR arch_prctl (2)
can interfere with
--
2.31.1
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH 06/10] set_tid_address.2: Use syscall(SYS_...); for system calls without a wrapper
2021-05-21 23:25 [PATCH 00/10] man2: SYNOPSIS: Use syscall, and fix includes Alejandro Colomar
` (3 preceding siblings ...)
2021-05-21 23:25 ` [PATCH 05/10] set_thread_area.2: " Alejandro Colomar
@ 2021-05-21 23:25 ` Alejandro Colomar
2021-05-21 23:25 ` [PATCH 07/10] sgetmask.2: " Alejandro Colomar
` (4 subsequent siblings)
9 siblings, 0 replies; 34+ messages in thread
From: Alejandro Colomar @ 2021-05-21 23:25 UTC (permalink / raw)
To: mtk.manpages; +Cc: Alejandro Colomar, linux-man
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
---
man2/set_tid_address.2 | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/man2/set_tid_address.2 b/man2/set_tid_address.2
index 258c9b9ef..4b81865dc 100644
--- a/man2/set_tid_address.2
+++ b/man2/set_tid_address.2
@@ -27,13 +27,17 @@
set_tid_address \- set pointer to thread ID
.SH SYNOPSIS
.nf
-.B #include <linux/unistd.h>
+.BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */"
+.B #include <unistd.h>
.PP
-.BI "pid_t set_tid_address(int *" tidptr );
+.BI "pid_t syscall(SYS_set_tid_address, int *" tidptr );
.fi
.PP
.IR Note :
-There is no glibc wrapper for this system call; see NOTES.
+glibc provides no wrapper for
+.BR set_tid_address (2),
+necessitating the use of
+.BR syscall (2).
.SH DESCRIPTION
For each thread, the kernel maintains two attributes (addresses) called
.I set_child_tid
@@ -99,9 +103,6 @@ This call is present since Linux 2.5.48.
Details as given here are valid since Linux 2.5.49.
.SH CONFORMING TO
This system call is Linux-specific.
-.SH NOTES
-Glibc does not provide a wrapper for this system call; call it using
-.BR syscall (2).
.SH SEE ALSO
.BR clone (2),
.BR futex (2),
--
2.31.1
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH 07/10] sgetmask.2: Use syscall(SYS_...); for system calls without a wrapper
2021-05-21 23:25 [PATCH 00/10] man2: SYNOPSIS: Use syscall, and fix includes Alejandro Colomar
` (4 preceding siblings ...)
2021-05-21 23:25 ` [PATCH 06/10] set_tid_address.2: " Alejandro Colomar
@ 2021-05-21 23:25 ` Alejandro Colomar
2021-05-21 23:25 ` [PATCH 08/10] shmop.2: Remove unused include Alejandro Colomar
` (3 subsequent siblings)
9 siblings, 0 replies; 34+ messages in thread
From: Alejandro Colomar @ 2021-05-21 23:25 UTC (permalink / raw)
To: mtk.manpages; +Cc: Alejandro Colomar, linux-man
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
---
man2/sgetmask.2 | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/man2/sgetmask.2 b/man2/sgetmask.2
index 7563b57ff..59b58ceaf 100644
--- a/man2/sgetmask.2
+++ b/man2/sgetmask.2
@@ -27,12 +27,17 @@
sgetmask, ssetmask \- manipulation of signal mask (obsolete)
.SH SYNOPSIS
.nf
-.B "long sgetmask(void);"
-.BI "long ssetmask(long " newmask );
+.BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */"
+.B #include <unistd.h>
+.PP
+.B "long syscall(SYS_sgetmask, void);"
+.BI "long syscall(SYS_ssetmask, long " newmask );
.fi
.PP
.IR Note :
-There are no glibc wrappers for these system calls; see NOTES.
+glibc provides no wrappers for these functions,
+necessitating the use of
+.BR syscall (2).
.SH DESCRIPTION
These system calls are obsolete.
.IR "Do not use them" ;
@@ -73,10 +78,6 @@ option.
.SH CONFORMING TO
These system calls are Linux-specific.
.SH NOTES
-Glibc does not provide wrappers for these obsolete system calls;
-in the unlikely event that you want to call them, use
-.BR syscall (2).
-.PP
These system calls are unaware of signal numbers greater than 31
(i.e., real-time signals).
.PP
--
2.31.1
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH 08/10] shmop.2: Remove unused include
2021-05-21 23:25 [PATCH 00/10] man2: SYNOPSIS: Use syscall, and fix includes Alejandro Colomar
` (5 preceding siblings ...)
2021-05-21 23:25 ` [PATCH 07/10] sgetmask.2: " Alejandro Colomar
@ 2021-05-21 23:25 ` Alejandro Colomar
2021-05-21 23:25 ` [PATCH 09/10] sigprocmask.2: Use syscall(SYS_...); for raw system calls Alejandro Colomar
` (2 subsequent siblings)
9 siblings, 0 replies; 34+ messages in thread
From: Alejandro Colomar @ 2021-05-21 23:25 UTC (permalink / raw)
To: mtk.manpages; +Cc: Alejandro Colomar, linux-man
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
---
man2/shmop.2 | 1 -
1 file changed, 1 deletion(-)
diff --git a/man2/shmop.2 b/man2/shmop.2
index c7e66af0e..52baed96c 100644
--- a/man2/shmop.2
+++ b/man2/shmop.2
@@ -42,7 +42,6 @@
shmat, shmdt \- System V shared memory operations
.SH SYNOPSIS
.nf
-.B #include <sys/types.h>
.B #include <sys/shm.h>
.PP
.BI "void *shmat(int " shmid ", const void *" shmaddr ", int " shmflg );
--
2.31.1
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH 09/10] sigprocmask.2: Use syscall(SYS_...); for raw system calls
2021-05-21 23:25 [PATCH 00/10] man2: SYNOPSIS: Use syscall, and fix includes Alejandro Colomar
` (6 preceding siblings ...)
2021-05-21 23:25 ` [PATCH 08/10] shmop.2: Remove unused include Alejandro Colomar
@ 2021-05-21 23:25 ` Alejandro Colomar
2021-05-21 23:25 ` [PATCH 10/10] socketcall.2: Use syscall(SYS_...); for system calls without a wrapper Alejandro Colomar
2021-05-24 19:09 ` [PATCH 00/10] man2: SYNOPSIS: Use syscall, and fix includes Alejandro Colomar (man-pages)
9 siblings, 0 replies; 34+ messages in thread
From: Alejandro Colomar @ 2021-05-21 23:25 UTC (permalink / raw)
To: mtk.manpages; +Cc: Alejandro Colomar, linux-man
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
---
man2/sigprocmask.2 | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/man2/sigprocmask.2 b/man2/sigprocmask.2
index a622e4c18..b82386f14 100644
--- a/man2/sigprocmask.2
+++ b/man2/sigprocmask.2
@@ -37,12 +37,16 @@ sigprocmask, rt_sigprocmask \- examine and change blocked signals
.BI "int sigprocmask(int " how ", const sigset_t *restrict " set ,
.BI " sigset_t *restrict " oldset );
.PP
+.BR "#include <signal.h>" " /* Definition of " SIG_* " constants */"
+.BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */"
+.B #include <unistd.h>
+.PP
/* Prototype for the underlying system call */
-.BI "int rt_sigprocmask(int " how ", const kernel_sigset_t *" set ,
+.BI "int syscall(SYS_rt_sigprocmask, int " how ", const kernel_sigset_t *" set ,
.BI " kernel_sigset_t *" oldset ", size_t " sigsetsize );
.PP
/* Prototype for the legacy system call (deprecated) */
-.BI "int sigprocmask(int " how ", const old_kernel_sigset_t *" set ,
+.BI "int syscall(SYS_sigprocmask, int " how ", const old_kernel_sigset_t *" set ,
.BI " old_kernel_sigset_t *" oldset );
.fi
.PP
--
2.31.1
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH 10/10] socketcall.2: Use syscall(SYS_...); for system calls without a wrapper
2021-05-21 23:25 [PATCH 00/10] man2: SYNOPSIS: Use syscall, and fix includes Alejandro Colomar
` (7 preceding siblings ...)
2021-05-21 23:25 ` [PATCH 09/10] sigprocmask.2: Use syscall(SYS_...); for raw system calls Alejandro Colomar
@ 2021-05-21 23:25 ` Alejandro Colomar
2021-05-24 18:19 ` [PATCH v2 01/10] open.2: Remove unused <sys/stat.h> Alejandro Colomar
` (9 more replies)
2021-05-24 19:09 ` [PATCH 00/10] man2: SYNOPSIS: Use syscall, and fix includes Alejandro Colomar (man-pages)
9 siblings, 10 replies; 34+ messages in thread
From: Alejandro Colomar @ 2021-05-21 23:25 UTC (permalink / raw)
To: mtk.manpages; +Cc: Alejandro Colomar, linux-man
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
---
man2/socketcall.2 | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/man2/socketcall.2 b/man2/socketcall.2
index 8ef3d65d3..f632ba011 100644
--- a/man2/socketcall.2
+++ b/man2/socketcall.2
@@ -27,13 +27,18 @@
socketcall \- socket system calls
.SH SYNOPSIS
.nf
-.B #include <linux/net.h>
+.BR "#include <linux/net.h>" " /* Definition of " SYS_* " constants */"
+.BR "#include <sys/syscall.h>" " /* Definition of " SYS_socketcall " */"
+.B #include <unistd.h>
.PP
-.BI "int socketcall(int " call ", unsigned long *" args );
+.BI "int syscall(SYS_socketcall, int " call ", unsigned long *" args );
.fi
.PP
.IR Note :
-There is no glibc wrapper for this system call; see NOTES.
+glibc provides no wrapper for
+.BR socketcall (2),
+necessitating the use of
+.BR syscall (2).
.SH DESCRIPTION
.BR socketcall ()
is a common kernel entry point for the socket system calls.
@@ -156,10 +161,6 @@ T}
This call is specific to Linux, and should not be used in programs
intended to be portable.
.SH NOTES
-Glibc does not provide a wrapper for this system call;
-in the unlikely event that you want to call it directly, do so using
-.BR syscall (2).
-.PP
On some architectures\(emfor example, x86-64 and ARM\(emthere is no
.BR socketcall ()
system call; instead
--
2.31.1
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH v2 01/10] open.2: Remove unused <sys/stat.h>
2021-05-21 23:25 ` [PATCH 10/10] socketcall.2: Use syscall(SYS_...); for system calls without a wrapper Alejandro Colomar
@ 2021-05-24 18:19 ` Alejandro Colomar
2021-06-09 22:23 ` Michael Kerrisk (man-pages)
2021-05-24 18:19 ` [PATCH v2 02/10] rt_sigqueueinfo.2: Use syscall(SYS_...); for system calls without a wrapper Alejandro Colomar
` (8 subsequent siblings)
9 siblings, 1 reply; 34+ messages in thread
From: Alejandro Colomar @ 2021-05-24 18:19 UTC (permalink / raw)
To: mtk.manpages; +Cc: Alejandro Colomar, linux-man
I can't see a reason to include it. <fcntl.h> provides O_*
constants for 'flags', S_* constants for 'mode', and mode_t.
Probably a long time ago, some of those weren't defined in
<fcntl.h>, and both headers needed to be included, or maybe it's
a historical error.
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
---
man2/open.2 | 1 -
1 file changed, 1 deletion(-)
diff --git a/man2/open.2 b/man2/open.2
index bac1ee806..1bcd995f4 100644
--- a/man2/open.2
+++ b/man2/open.2
@@ -53,7 +53,6 @@
open, openat, creat \- open and possibly create a file
.SH SYNOPSIS
.nf
-.B #include <sys/stat.h>
.B #include <fcntl.h>
.PP
.BI "int open(const char *" pathname ", int " flags );
--
2.31.1
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH v2 02/10] rt_sigqueueinfo.2: Use syscall(SYS_...); for system calls without a wrapper
2021-05-21 23:25 ` [PATCH 10/10] socketcall.2: Use syscall(SYS_...); for system calls without a wrapper Alejandro Colomar
2021-05-24 18:19 ` [PATCH v2 01/10] open.2: Remove unused <sys/stat.h> Alejandro Colomar
@ 2021-05-24 18:19 ` Alejandro Colomar
2021-06-09 22:24 ` Michael Kerrisk (man-pages)
2021-05-24 18:19 ` [PATCH v2 03/10] seccomp.2: Document why each header is needed Alejandro Colomar
` (7 subsequent siblings)
9 siblings, 1 reply; 34+ messages in thread
From: Alejandro Colomar @ 2021-05-24 18:19 UTC (permalink / raw)
To: mtk.manpages; +Cc: Alejandro Colomar, linux-man
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
---
man2/rt_sigqueueinfo.2 | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/man2/rt_sigqueueinfo.2 b/man2/rt_sigqueueinfo.2
index 2dd1a5877..d48ecbdcd 100644
--- a/man2/rt_sigqueueinfo.2
+++ b/man2/rt_sigqueueinfo.2
@@ -27,9 +27,14 @@
rt_sigqueueinfo, rt_tgsigqueueinfo \- queue a signal and data
.SH SYNOPSIS
.nf
-.BI "int rt_sigqueueinfo(pid_t " tgid ", int " sig ", siginfo_t *" info );
-.BI "int rt_tgsigqueueinfo(pid_t " tgid ", pid_t " tid ", int " sig \
-", siginfo_t *" info );
+.BR "#include <linux/signal.h>" " /* Definition of " SI_* " constants */"
+.BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */"
+.B #include <unistd.h>
+.PP
+.BI "int syscall(SYS_rt_sigqueueinfo, pid_t " tgid ,
+.BI " int " sig ", siginfo_t *" info );
+.BI "int syscall(SYS_rt_tgsigqueueinfo, pid_t " tgid ", pid_t " tid ,
+.BI " int " sig ", siginfo_t *" info );
.fi
.PP
.IR Note :
--
2.31.1
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH v2 03/10] seccomp.2: Document why each header is needed
2021-05-21 23:25 ` [PATCH 10/10] socketcall.2: Use syscall(SYS_...); for system calls without a wrapper Alejandro Colomar
2021-05-24 18:19 ` [PATCH v2 01/10] open.2: Remove unused <sys/stat.h> Alejandro Colomar
2021-05-24 18:19 ` [PATCH v2 02/10] rt_sigqueueinfo.2: Use syscall(SYS_...); for system calls without a wrapper Alejandro Colomar
@ 2021-05-24 18:19 ` Alejandro Colomar
2021-05-24 19:34 ` Alejandro Colomar (man-pages)
2021-05-24 18:19 ` [PATCH v2 04/10] seccomp.2: Use syscall(SYS_...); for system calls without a wrapper Alejandro Colomar
` (6 subsequent siblings)
9 siblings, 1 reply; 34+ messages in thread
From: Alejandro Colomar @ 2021-05-24 18:19 UTC (permalink / raw)
To: mtk.manpages
Cc: Alejandro Colomar, linux-man, Kees Cook, Tyler Hicks, Will Drewry
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Tyler Hicks <tyhicks@canonical.com>
Cc: Will Drewry <wad@chromium.org>
Cc: Michael Kerrisk <mtk.manpages@gmail.com>
---
man2/seccomp.2 | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/man2/seccomp.2 b/man2/seccomp.2
index 584a16f22..1be7d6766 100644
--- a/man2/seccomp.2
+++ b/man2/seccomp.2
@@ -30,11 +30,11 @@
seccomp \- operate on Secure Computing state of the process
.SH SYNOPSIS
.nf
-.B #include <linux/seccomp.h>
-.B #include <linux/filter.h>
-.B #include <linux/audit.h>
-.B #include <linux/signal.h>
-.B #include <sys/ptrace.h>
+.BR "#include <linux/seccomp.h>" " /* Definition of " SECCOMP_* " constants */"
+.BR "#include <linux/filter.h>" " /* Definition of " "struct sock_fprog" " */"
+.BR "#include <linux/audit.h>" " /* Definition of " AUDIT_* " constants */"
+.BR "#include <linux/signal.h>" " /* Definition of " SIG* " constants */"
+.BR "#include <sys/ptrace.h>" " /* Definition of " PTRACE_* " constants */"
.\" Kees Cook noted: Anything that uses SECCOMP_RET_TRACE returns will
.\" need <sys/ptrace.h>
.PP
--
2.31.1
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH v2 04/10] seccomp.2: Use syscall(SYS_...); for system calls without a wrapper
2021-05-21 23:25 ` [PATCH 10/10] socketcall.2: Use syscall(SYS_...); for system calls without a wrapper Alejandro Colomar
` (2 preceding siblings ...)
2021-05-24 18:19 ` [PATCH v2 03/10] seccomp.2: Document why each header is needed Alejandro Colomar
@ 2021-05-24 18:19 ` Alejandro Colomar
2021-06-09 22:31 ` Michael Kerrisk (man-pages)
2021-05-24 18:19 ` [PATCH v2 05/10] set_thread_area.2: " Alejandro Colomar
` (5 subsequent siblings)
9 siblings, 1 reply; 34+ messages in thread
From: Alejandro Colomar @ 2021-05-24 18:19 UTC (permalink / raw)
To: mtk.manpages; +Cc: Alejandro Colomar, linux-man
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
---
man2/seccomp.2 | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/man2/seccomp.2 b/man2/seccomp.2
index 1be7d6766..0f3f30767 100644
--- a/man2/seccomp.2
+++ b/man2/seccomp.2
@@ -37,13 +37,18 @@ seccomp \- operate on Secure Computing state of the process
.BR "#include <sys/ptrace.h>" " /* Definition of " PTRACE_* " constants */"
.\" Kees Cook noted: Anything that uses SECCOMP_RET_TRACE returns will
.\" need <sys/ptrace.h>
+.BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */"
+.B #include <unistd.h>
.PP
-.BI "int seccomp(unsigned int " operation ", unsigned int " flags \
-", void *" args );
+.BI "int syscall(SYS_seccomp, unsigned int " operation ", unsigned int " flags ,
+.BI " void *" args );
.fi
.PP
.IR Note :
-There is no glibc wrapper for this system call; see NOTES.
+glibc provides no wrapper for
+.BR seccomp (),
+necessitating the use of
+.BR syscall (2).
.SH DESCRIPTION
The
.BR seccomp ()
@@ -858,9 +863,6 @@ Tile (since Linux 4.3)
PA-RISC (since Linux 4.6)
.\" User mode Linux since Linux 4.6
.PD
-.PP
-Glibc does not provide a wrapper for this system call; call it using
-.BR syscall (2).
.\"
.SS Caveats
There are various subtleties to consider when applying seccomp filters
--
2.31.1
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH v2 05/10] set_thread_area.2: Use syscall(SYS_...); for system calls without a wrapper
2021-05-21 23:25 ` [PATCH 10/10] socketcall.2: Use syscall(SYS_...); for system calls without a wrapper Alejandro Colomar
` (3 preceding siblings ...)
2021-05-24 18:19 ` [PATCH v2 04/10] seccomp.2: Use syscall(SYS_...); for system calls without a wrapper Alejandro Colomar
@ 2021-05-24 18:19 ` Alejandro Colomar
2021-06-09 22:24 ` Michael Kerrisk (man-pages)
2021-05-24 18:19 ` [PATCH v2 06/10] set_tid_address.2: " Alejandro Colomar
` (4 subsequent siblings)
9 siblings, 1 reply; 34+ messages in thread
From: Alejandro Colomar @ 2021-05-24 18:19 UTC (permalink / raw)
To: mtk.manpages; +Cc: Alejandro Colomar, linux-man
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
---
man2/set_thread_area.2 | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/man2/set_thread_area.2 b/man2/set_thread_area.2
index 284dea390..43f3009f7 100644
--- a/man2/set_thread_area.2
+++ b/man2/set_thread_area.2
@@ -11,28 +11,31 @@
get_thread_area, set_thread_area \- manipulate thread-local storage information
.SH SYNOPSIS
.nf
-.B #include <linux/unistd.h>
+.BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */"
+.B #include <unistd.h>
.PP
.B #if defined __i386__ || defined __x86_64__
-.B # include <asm/ldt.h>
+.BR "# include <asm/ldt.h>" " /* Definition of " "struct user_desc" " */"
.PP
-.BI "int get_thread_area(struct user_desc *" u_info );
-.BI "int set_thread_area(struct user_desc *" u_info );
+.BI "int syscall(SYS_get_thread_area, struct user_desc *" u_info );
+.BI "int syscall(SYS_set_thread_area, struct user_desc *" u_info );
.PP
.B #elif defined __m68k__
.PP
-.B "int get_thread_area(void);"
-.BI "int set_thread_area(unsigned long " tp );
+.B "int syscall(SYS_get_thread_area);"
+.BI "int syscall(SYS_set_thread_area, unsigned long " tp );
.PP
.B #elif defined __mips__
.PP
-.BI "int set_thread_area(unsigned long " addr );
+.BI "int syscall(SYS_set_thread_area, unsigned long " addr );
.PP
.B #endif
.fi
.PP
.IR Note :
-There are no glibc wrappers for these system calls; see NOTES.
+glibc provides no wrappers for these system calls,
+necessitating the use of
+.BR syscall (2).
.SH DESCRIPTION
These calls provide architecture-specific support for a thread-local storage
implementation.
@@ -172,10 +175,7 @@ and
are Linux-specific and should not be used in programs that are intended
to be portable.
.SH NOTES
-Glibc does not provide wrappers for these system calls,
-since they are generally intended for use only by threading libraries.
-In the unlikely event that you want to call them directly, use
-.BR syscall (2).
+These system calls are generally intended for use only by threading libraries.
.PP
.BR arch_prctl (2)
can interfere with
--
2.31.1
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH v2 06/10] set_tid_address.2: Use syscall(SYS_...); for system calls without a wrapper
2021-05-21 23:25 ` [PATCH 10/10] socketcall.2: Use syscall(SYS_...); for system calls without a wrapper Alejandro Colomar
` (4 preceding siblings ...)
2021-05-24 18:19 ` [PATCH v2 05/10] set_thread_area.2: " Alejandro Colomar
@ 2021-05-24 18:19 ` Alejandro Colomar
2021-06-09 22:25 ` Michael Kerrisk (man-pages)
2021-05-24 18:19 ` [PATCH v2 07/10] sgetmask.2: " Alejandro Colomar
` (3 subsequent siblings)
9 siblings, 1 reply; 34+ messages in thread
From: Alejandro Colomar @ 2021-05-24 18:19 UTC (permalink / raw)
To: mtk.manpages; +Cc: Alejandro Colomar, linux-man
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
---
man2/set_tid_address.2 | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/man2/set_tid_address.2 b/man2/set_tid_address.2
index 258c9b9ef..65b4931eb 100644
--- a/man2/set_tid_address.2
+++ b/man2/set_tid_address.2
@@ -27,13 +27,17 @@
set_tid_address \- set pointer to thread ID
.SH SYNOPSIS
.nf
-.B #include <linux/unistd.h>
+.BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */"
+.B #include <unistd.h>
.PP
-.BI "pid_t set_tid_address(int *" tidptr );
+.BI "pid_t syscall(SYS_set_tid_address, int *" tidptr );
.fi
.PP
.IR Note :
-There is no glibc wrapper for this system call; see NOTES.
+glibc provides no wrapper for
+.BR set_tid_address (),
+necessitating the use of
+.BR syscall (2).
.SH DESCRIPTION
For each thread, the kernel maintains two attributes (addresses) called
.I set_child_tid
@@ -99,9 +103,6 @@ This call is present since Linux 2.5.48.
Details as given here are valid since Linux 2.5.49.
.SH CONFORMING TO
This system call is Linux-specific.
-.SH NOTES
-Glibc does not provide a wrapper for this system call; call it using
-.BR syscall (2).
.SH SEE ALSO
.BR clone (2),
.BR futex (2),
--
2.31.1
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH v2 07/10] sgetmask.2: Use syscall(SYS_...); for system calls without a wrapper
2021-05-21 23:25 ` [PATCH 10/10] socketcall.2: Use syscall(SYS_...); for system calls without a wrapper Alejandro Colomar
` (5 preceding siblings ...)
2021-05-24 18:19 ` [PATCH v2 06/10] set_tid_address.2: " Alejandro Colomar
@ 2021-05-24 18:19 ` Alejandro Colomar
2021-06-09 22:25 ` Michael Kerrisk (man-pages)
2021-05-24 18:19 ` [PATCH v2 08/10] shmop.2: Remove unused include Alejandro Colomar
` (2 subsequent siblings)
9 siblings, 1 reply; 34+ messages in thread
From: Alejandro Colomar @ 2021-05-24 18:19 UTC (permalink / raw)
To: mtk.manpages; +Cc: Alejandro Colomar, linux-man
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
---
man2/sgetmask.2 | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/man2/sgetmask.2 b/man2/sgetmask.2
index 7563b57ff..59b58ceaf 100644
--- a/man2/sgetmask.2
+++ b/man2/sgetmask.2
@@ -27,12 +27,17 @@
sgetmask, ssetmask \- manipulation of signal mask (obsolete)
.SH SYNOPSIS
.nf
-.B "long sgetmask(void);"
-.BI "long ssetmask(long " newmask );
+.BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */"
+.B #include <unistd.h>
+.PP
+.B "long syscall(SYS_sgetmask, void);"
+.BI "long syscall(SYS_ssetmask, long " newmask );
.fi
.PP
.IR Note :
-There are no glibc wrappers for these system calls; see NOTES.
+glibc provides no wrappers for these functions,
+necessitating the use of
+.BR syscall (2).
.SH DESCRIPTION
These system calls are obsolete.
.IR "Do not use them" ;
@@ -73,10 +78,6 @@ option.
.SH CONFORMING TO
These system calls are Linux-specific.
.SH NOTES
-Glibc does not provide wrappers for these obsolete system calls;
-in the unlikely event that you want to call them, use
-.BR syscall (2).
-.PP
These system calls are unaware of signal numbers greater than 31
(i.e., real-time signals).
.PP
--
2.31.1
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH v2 08/10] shmop.2: Remove unused include
2021-05-21 23:25 ` [PATCH 10/10] socketcall.2: Use syscall(SYS_...); for system calls without a wrapper Alejandro Colomar
` (6 preceding siblings ...)
2021-05-24 18:19 ` [PATCH v2 07/10] sgetmask.2: " Alejandro Colomar
@ 2021-05-24 18:19 ` Alejandro Colomar
2021-06-09 22:25 ` Michael Kerrisk (man-pages)
2021-05-24 18:19 ` [PATCH v2 09/10] sigprocmask.2: Use syscall(SYS_...); for raw system calls Alejandro Colomar
2021-05-24 18:19 ` [PATCH v2 10/10] socketcall.2: Use syscall(SYS_...); for system calls without a wrapper Alejandro Colomar
9 siblings, 1 reply; 34+ messages in thread
From: Alejandro Colomar @ 2021-05-24 18:19 UTC (permalink / raw)
To: mtk.manpages; +Cc: Alejandro Colomar, linux-man
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
---
man2/shmop.2 | 1 -
1 file changed, 1 deletion(-)
diff --git a/man2/shmop.2 b/man2/shmop.2
index c7e66af0e..52baed96c 100644
--- a/man2/shmop.2
+++ b/man2/shmop.2
@@ -42,7 +42,6 @@
shmat, shmdt \- System V shared memory operations
.SH SYNOPSIS
.nf
-.B #include <sys/types.h>
.B #include <sys/shm.h>
.PP
.BI "void *shmat(int " shmid ", const void *" shmaddr ", int " shmflg );
--
2.31.1
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH v2 09/10] sigprocmask.2: Use syscall(SYS_...); for raw system calls
2021-05-21 23:25 ` [PATCH 10/10] socketcall.2: Use syscall(SYS_...); for system calls without a wrapper Alejandro Colomar
` (7 preceding siblings ...)
2021-05-24 18:19 ` [PATCH v2 08/10] shmop.2: Remove unused include Alejandro Colomar
@ 2021-05-24 18:19 ` Alejandro Colomar
2021-06-09 22:26 ` Michael Kerrisk (man-pages)
2021-05-24 18:19 ` [PATCH v2 10/10] socketcall.2: Use syscall(SYS_...); for system calls without a wrapper Alejandro Colomar
9 siblings, 1 reply; 34+ messages in thread
From: Alejandro Colomar @ 2021-05-24 18:19 UTC (permalink / raw)
To: mtk.manpages; +Cc: Alejandro Colomar, linux-man
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
---
man2/sigprocmask.2 | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/man2/sigprocmask.2 b/man2/sigprocmask.2
index a622e4c18..b82386f14 100644
--- a/man2/sigprocmask.2
+++ b/man2/sigprocmask.2
@@ -37,12 +37,16 @@ sigprocmask, rt_sigprocmask \- examine and change blocked signals
.BI "int sigprocmask(int " how ", const sigset_t *restrict " set ,
.BI " sigset_t *restrict " oldset );
.PP
+.BR "#include <signal.h>" " /* Definition of " SIG_* " constants */"
+.BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */"
+.B #include <unistd.h>
+.PP
/* Prototype for the underlying system call */
-.BI "int rt_sigprocmask(int " how ", const kernel_sigset_t *" set ,
+.BI "int syscall(SYS_rt_sigprocmask, int " how ", const kernel_sigset_t *" set ,
.BI " kernel_sigset_t *" oldset ", size_t " sigsetsize );
.PP
/* Prototype for the legacy system call (deprecated) */
-.BI "int sigprocmask(int " how ", const old_kernel_sigset_t *" set ,
+.BI "int syscall(SYS_sigprocmask, int " how ", const old_kernel_sigset_t *" set ,
.BI " old_kernel_sigset_t *" oldset );
.fi
.PP
--
2.31.1
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH v2 10/10] socketcall.2: Use syscall(SYS_...); for system calls without a wrapper
2021-05-21 23:25 ` [PATCH 10/10] socketcall.2: Use syscall(SYS_...); for system calls without a wrapper Alejandro Colomar
` (8 preceding siblings ...)
2021-05-24 18:19 ` [PATCH v2 09/10] sigprocmask.2: Use syscall(SYS_...); for raw system calls Alejandro Colomar
@ 2021-05-24 18:19 ` Alejandro Colomar
2021-06-09 22:27 ` Michael Kerrisk (man-pages)
9 siblings, 1 reply; 34+ messages in thread
From: Alejandro Colomar @ 2021-05-24 18:19 UTC (permalink / raw)
To: mtk.manpages; +Cc: Alejandro Colomar, linux-man
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
---
man2/socketcall.2 | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/man2/socketcall.2 b/man2/socketcall.2
index 8ef3d65d3..883c2aafe 100644
--- a/man2/socketcall.2
+++ b/man2/socketcall.2
@@ -27,13 +27,18 @@
socketcall \- socket system calls
.SH SYNOPSIS
.nf
-.B #include <linux/net.h>
+.BR "#include <linux/net.h>" " /* Definition of " SYS_* " constants */"
+.BR "#include <sys/syscall.h>" " /* Definition of " SYS_socketcall " */"
+.B #include <unistd.h>
.PP
-.BI "int socketcall(int " call ", unsigned long *" args );
+.BI "int syscall(SYS_socketcall, int " call ", unsigned long *" args );
.fi
.PP
.IR Note :
-There is no glibc wrapper for this system call; see NOTES.
+glibc provides no wrapper for
+.BR socketcall (),
+necessitating the use of
+.BR syscall (2).
.SH DESCRIPTION
.BR socketcall ()
is a common kernel entry point for the socket system calls.
@@ -156,10 +161,6 @@ T}
This call is specific to Linux, and should not be used in programs
intended to be portable.
.SH NOTES
-Glibc does not provide a wrapper for this system call;
-in the unlikely event that you want to call it directly, do so using
-.BR syscall (2).
-.PP
On some architectures\(emfor example, x86-64 and ARM\(emthere is no
.BR socketcall ()
system call; instead
@@ -198,3 +199,4 @@ and also provides a (very) small performance improvement.
.BR shutdown (2),
.BR socket (2),
.BR socketpair (2)
+
--
2.31.1
^ permalink raw reply related [flat|nested] 34+ messages in thread
* Re: [PATCH 00/10] man2: SYNOPSIS: Use syscall, and fix includes.
2021-05-21 23:25 [PATCH 00/10] man2: SYNOPSIS: Use syscall, and fix includes Alejandro Colomar
` (8 preceding siblings ...)
2021-05-21 23:25 ` [PATCH 10/10] socketcall.2: Use syscall(SYS_...); for system calls without a wrapper Alejandro Colomar
@ 2021-05-24 19:09 ` Alejandro Colomar (man-pages)
2021-06-09 22:28 ` Michael Kerrisk (man-pages)
2021-06-09 22:29 ` Michael Kerrisk (man-pages)
9 siblings, 2 replies; 34+ messages in thread
From: Alejandro Colomar (man-pages) @ 2021-05-24 19:09 UTC (permalink / raw)
To: mtk.manpages; +Cc: linux-man
Hi Michael,
On 5/22/21 1:25 AM, Alejandro Colomar wrote:
> Hi Michael,
>
> Almost finished these:
> $ man_lsfunc man2 | sed -n '/socketcall/,$p' | wc -l
> 67
> $ man_lsfunc man2 | wc -l
> 401
> $
Right now I have around 20-30 more patches about this pending, and
that's all; I've finished.
I'll hold them until you apply (or reject) the various patch sets that
are pending to avoid creating conflicts.
After that, I think we should release v5.12 :).
And after the release, I have 4 branches to develop a few things for
5.13/14 (some of them depending on what we decide about some RFCs):
- library: Use LIBRARY section (similar to FreeBSD)
- stdint: Use standard (<stdint.h>) types, as well as standard attributes.
- system_data_types: Document more types (I was documenting those you
mark in TLPI as important).
- examples: Fix the includes in the EXAMPLES sections to use the
minimum number of includes, by using iwyu(1).
Cheers,
Alex
--
Alejandro Colomar
Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH v2 03/10] seccomp.2: Document why each header is needed
2021-05-24 18:19 ` [PATCH v2 03/10] seccomp.2: Document why each header is needed Alejandro Colomar
@ 2021-05-24 19:34 ` Alejandro Colomar (man-pages)
2021-06-09 22:30 ` Michael Kerrisk (man-pages)
0 siblings, 1 reply; 34+ messages in thread
From: Alejandro Colomar (man-pages) @ 2021-05-24 19:34 UTC (permalink / raw)
To: mtk.manpages; +Cc: linux-man, Kees Cook, Tyler Hicks, Will Drewry
Hi Michael,
On 5/24/21 8:19 PM, Alejandro Colomar wrote:
> Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
> Cc: Kees Cook <keescook@chromium.org>
> Cc: Tyler Hicks <tyhicks@canonical.com>
> Cc: Will Drewry <wad@chromium.org>
> Cc: Michael Kerrisk <mtk.manpages@gmail.com>
> ---
Please discards this one, for the same reasons as in v1: repeated.
See
<https://lore.kernel.org/linux-man/20210515182254.186607-1-alx.manpages@gmail.com/T/#u>
instead.
That one has a better mail.
Thanks,
Alex
> man2/seccomp.2 | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/man2/seccomp.2 b/man2/seccomp.2
> index 584a16f22..1be7d6766 100644
> --- a/man2/seccomp.2
> +++ b/man2/seccomp.2
> @@ -30,11 +30,11 @@
> seccomp \- operate on Secure Computing state of the process
> .SH SYNOPSIS
> .nf
> -.B #include <linux/seccomp.h>
> -.B #include <linux/filter.h>
> -.B #include <linux/audit.h>
> -.B #include <linux/signal.h>
> -.B #include <sys/ptrace.h>
> +.BR "#include <linux/seccomp.h>" " /* Definition of " SECCOMP_* " constants */"
> +.BR "#include <linux/filter.h>" " /* Definition of " "struct sock_fprog" " */"
> +.BR "#include <linux/audit.h>" " /* Definition of " AUDIT_* " constants */"
> +.BR "#include <linux/signal.h>" " /* Definition of " SIG* " constants */"
> +.BR "#include <sys/ptrace.h>" " /* Definition of " PTRACE_* " constants */"
> .\" Kees Cook noted: Anything that uses SECCOMP_RET_TRACE returns will
> .\" need <sys/ptrace.h>
> .PP
>
--
Alejandro Colomar
Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH v2 01/10] open.2: Remove unused <sys/stat.h>
2021-05-24 18:19 ` [PATCH v2 01/10] open.2: Remove unused <sys/stat.h> Alejandro Colomar
@ 2021-06-09 22:23 ` Michael Kerrisk (man-pages)
0 siblings, 0 replies; 34+ messages in thread
From: Michael Kerrisk (man-pages) @ 2021-06-09 22:23 UTC (permalink / raw)
To: Alejandro Colomar; +Cc: mtk.manpages, linux-man
Hi Alex,
On 5/25/21 6:19 AM, Alejandro Colomar wrote:
> I can't see a reason to include it. <fcntl.h> provides O_*
> constants for 'flags', S_* constants for 'mode', and mode_t.
>
> Probably a long time ago, some of those weren't defined in
> <fcntl.h>, and both headers needed to be included, or maybe it's
> a historical error.
>
Applied.
Thanks,
Michael
> Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
> ---
> man2/open.2 | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/man2/open.2 b/man2/open.2
> index bac1ee806..1bcd995f4 100644
> --- a/man2/open.2
> +++ b/man2/open.2
> @@ -53,7 +53,6 @@
> open, openat, creat \- open and possibly create a file
> .SH SYNOPSIS
> .nf
> -.B #include <sys/stat.h>
> .B #include <fcntl.h>
> .PP
> .BI "int open(const char *" pathname ", int " flags );
>
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH v2 02/10] rt_sigqueueinfo.2: Use syscall(SYS_...); for system calls without a wrapper
2021-05-24 18:19 ` [PATCH v2 02/10] rt_sigqueueinfo.2: Use syscall(SYS_...); for system calls without a wrapper Alejandro Colomar
@ 2021-06-09 22:24 ` Michael Kerrisk (man-pages)
0 siblings, 0 replies; 34+ messages in thread
From: Michael Kerrisk (man-pages) @ 2021-06-09 22:24 UTC (permalink / raw)
To: Alejandro Colomar; +Cc: mtk.manpages, linux-man
Hi Alex,
On 5/25/21 6:19 AM, Alejandro Colomar wrote:
> Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Applied.
Thanks,
Michael
> ---
> man2/rt_sigqueueinfo.2 | 11 ++++++++---
> 1 file changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/man2/rt_sigqueueinfo.2 b/man2/rt_sigqueueinfo.2
> index 2dd1a5877..d48ecbdcd 100644
> --- a/man2/rt_sigqueueinfo.2
> +++ b/man2/rt_sigqueueinfo.2
> @@ -27,9 +27,14 @@
> rt_sigqueueinfo, rt_tgsigqueueinfo \- queue a signal and data
> .SH SYNOPSIS
> .nf
> -.BI "int rt_sigqueueinfo(pid_t " tgid ", int " sig ", siginfo_t *" info );
> -.BI "int rt_tgsigqueueinfo(pid_t " tgid ", pid_t " tid ", int " sig \
> -", siginfo_t *" info );
> +.BR "#include <linux/signal.h>" " /* Definition of " SI_* " constants */"
> +.BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */"
> +.B #include <unistd.h>
> +.PP
> +.BI "int syscall(SYS_rt_sigqueueinfo, pid_t " tgid ,
> +.BI " int " sig ", siginfo_t *" info );
> +.BI "int syscall(SYS_rt_tgsigqueueinfo, pid_t " tgid ", pid_t " tid ,
> +.BI " int " sig ", siginfo_t *" info );
> .fi
> .PP
> .IR Note :
>
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH v2 05/10] set_thread_area.2: Use syscall(SYS_...); for system calls without a wrapper
2021-05-24 18:19 ` [PATCH v2 05/10] set_thread_area.2: " Alejandro Colomar
@ 2021-06-09 22:24 ` Michael Kerrisk (man-pages)
0 siblings, 0 replies; 34+ messages in thread
From: Michael Kerrisk (man-pages) @ 2021-06-09 22:24 UTC (permalink / raw)
To: Alejandro Colomar; +Cc: mtk.manpages, linux-man
Hi Alex,
On 5/25/21 6:19 AM, Alejandro Colomar wrote:
> Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
> ---
> man2/set_thread_area.2 | 24 ++++++++++++------------
> 1 file changed, 12 insertions(+), 12 deletions(-)
Applied.
Thanks,
Michael
> diff --git a/man2/set_thread_area.2 b/man2/set_thread_area.2
> index 284dea390..43f3009f7 100644
> --- a/man2/set_thread_area.2
> +++ b/man2/set_thread_area.2
> @@ -11,28 +11,31 @@
> get_thread_area, set_thread_area \- manipulate thread-local storage information
> .SH SYNOPSIS
> .nf
> -.B #include <linux/unistd.h>
> +.BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */"
> +.B #include <unistd.h>
> .PP
> .B #if defined __i386__ || defined __x86_64__
> -.B # include <asm/ldt.h>
> +.BR "# include <asm/ldt.h>" " /* Definition of " "struct user_desc" " */"
> .PP
> -.BI "int get_thread_area(struct user_desc *" u_info );
> -.BI "int set_thread_area(struct user_desc *" u_info );
> +.BI "int syscall(SYS_get_thread_area, struct user_desc *" u_info );
> +.BI "int syscall(SYS_set_thread_area, struct user_desc *" u_info );
> .PP
> .B #elif defined __m68k__
> .PP
> -.B "int get_thread_area(void);"
> -.BI "int set_thread_area(unsigned long " tp );
> +.B "int syscall(SYS_get_thread_area);"
> +.BI "int syscall(SYS_set_thread_area, unsigned long " tp );
> .PP
> .B #elif defined __mips__
> .PP
> -.BI "int set_thread_area(unsigned long " addr );
> +.BI "int syscall(SYS_set_thread_area, unsigned long " addr );
> .PP
> .B #endif
> .fi
> .PP
> .IR Note :
> -There are no glibc wrappers for these system calls; see NOTES.
> +glibc provides no wrappers for these system calls,
> +necessitating the use of
> +.BR syscall (2).
> .SH DESCRIPTION
> These calls provide architecture-specific support for a thread-local storage
> implementation.
> @@ -172,10 +175,7 @@ and
> are Linux-specific and should not be used in programs that are intended
> to be portable.
> .SH NOTES
> -Glibc does not provide wrappers for these system calls,
> -since they are generally intended for use only by threading libraries.
> -In the unlikely event that you want to call them directly, use
> -.BR syscall (2).
> +These system calls are generally intended for use only by threading libraries.
> .PP
> .BR arch_prctl (2)
> can interfere with
>
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH v2 06/10] set_tid_address.2: Use syscall(SYS_...); for system calls without a wrapper
2021-05-24 18:19 ` [PATCH v2 06/10] set_tid_address.2: " Alejandro Colomar
@ 2021-06-09 22:25 ` Michael Kerrisk (man-pages)
0 siblings, 0 replies; 34+ messages in thread
From: Michael Kerrisk (man-pages) @ 2021-06-09 22:25 UTC (permalink / raw)
To: Alejandro Colomar; +Cc: mtk.manpages, linux-man
Hi Alex,
On 5/25/21 6:19 AM, Alejandro Colomar wrote:
> Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Applied.
Thanks,
Michael
> ---
> man2/set_tid_address.2 | 13 +++++++------
> 1 file changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/man2/set_tid_address.2 b/man2/set_tid_address.2
> index 258c9b9ef..65b4931eb 100644
> --- a/man2/set_tid_address.2
> +++ b/man2/set_tid_address.2
> @@ -27,13 +27,17 @@
> set_tid_address \- set pointer to thread ID
> .SH SYNOPSIS
> .nf
> -.B #include <linux/unistd.h>
> +.BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */"
> +.B #include <unistd.h>
> .PP
> -.BI "pid_t set_tid_address(int *" tidptr );
> +.BI "pid_t syscall(SYS_set_tid_address, int *" tidptr );
> .fi
> .PP
> .IR Note :
> -There is no glibc wrapper for this system call; see NOTES.
> +glibc provides no wrapper for
> +.BR set_tid_address (),
> +necessitating the use of
> +.BR syscall (2).
> .SH DESCRIPTION
> For each thread, the kernel maintains two attributes (addresses) called
> .I set_child_tid
> @@ -99,9 +103,6 @@ This call is present since Linux 2.5.48.
> Details as given here are valid since Linux 2.5.49.
> .SH CONFORMING TO
> This system call is Linux-specific.
> -.SH NOTES
> -Glibc does not provide a wrapper for this system call; call it using
> -.BR syscall (2).
> .SH SEE ALSO
> .BR clone (2),
> .BR futex (2),
>
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH v2 07/10] sgetmask.2: Use syscall(SYS_...); for system calls without a wrapper
2021-05-24 18:19 ` [PATCH v2 07/10] sgetmask.2: " Alejandro Colomar
@ 2021-06-09 22:25 ` Michael Kerrisk (man-pages)
0 siblings, 0 replies; 34+ messages in thread
From: Michael Kerrisk (man-pages) @ 2021-06-09 22:25 UTC (permalink / raw)
To: Alejandro Colomar; +Cc: mtk.manpages, linux-man
Hi Alex,
On 5/25/21 6:19 AM, Alejandro Colomar wrote:
> Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Applied.
Thanks,
Michael
> ---
> man2/sgetmask.2 | 15 ++++++++-------
> 1 file changed, 8 insertions(+), 7 deletions(-)
>
> diff --git a/man2/sgetmask.2 b/man2/sgetmask.2
> index 7563b57ff..59b58ceaf 100644
> --- a/man2/sgetmask.2
> +++ b/man2/sgetmask.2
> @@ -27,12 +27,17 @@
> sgetmask, ssetmask \- manipulation of signal mask (obsolete)
> .SH SYNOPSIS
> .nf
> -.B "long sgetmask(void);"
> -.BI "long ssetmask(long " newmask );
> +.BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */"
> +.B #include <unistd.h>
> +.PP
> +.B "long syscall(SYS_sgetmask, void);"
> +.BI "long syscall(SYS_ssetmask, long " newmask );
> .fi
> .PP
> .IR Note :
> -There are no glibc wrappers for these system calls; see NOTES.
> +glibc provides no wrappers for these functions,
> +necessitating the use of
> +.BR syscall (2).
> .SH DESCRIPTION
> These system calls are obsolete.
> .IR "Do not use them" ;
> @@ -73,10 +78,6 @@ option.
> .SH CONFORMING TO
> These system calls are Linux-specific.
> .SH NOTES
> -Glibc does not provide wrappers for these obsolete system calls;
> -in the unlikely event that you want to call them, use
> -.BR syscall (2).
> -.PP
> These system calls are unaware of signal numbers greater than 31
> (i.e., real-time signals).
> .PP
>
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH v2 08/10] shmop.2: Remove unused include
2021-05-24 18:19 ` [PATCH v2 08/10] shmop.2: Remove unused include Alejandro Colomar
@ 2021-06-09 22:25 ` Michael Kerrisk (man-pages)
0 siblings, 0 replies; 34+ messages in thread
From: Michael Kerrisk (man-pages) @ 2021-06-09 22:25 UTC (permalink / raw)
To: Alejandro Colomar; +Cc: mtk.manpages, linux-man
Hi Alex,
On 5/25/21 6:19 AM, Alejandro Colomar wrote:
> Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Applied.
Thanks,
Michael
> ---
> man2/shmop.2 | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/man2/shmop.2 b/man2/shmop.2
> index c7e66af0e..52baed96c 100644
> --- a/man2/shmop.2
> +++ b/man2/shmop.2
> @@ -42,7 +42,6 @@
> shmat, shmdt \- System V shared memory operations
> .SH SYNOPSIS
> .nf
> -.B #include <sys/types.h>
> .B #include <sys/shm.h>
> .PP
> .BI "void *shmat(int " shmid ", const void *" shmaddr ", int " shmflg );
>
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH v2 09/10] sigprocmask.2: Use syscall(SYS_...); for raw system calls
2021-05-24 18:19 ` [PATCH v2 09/10] sigprocmask.2: Use syscall(SYS_...); for raw system calls Alejandro Colomar
@ 2021-06-09 22:26 ` Michael Kerrisk (man-pages)
0 siblings, 0 replies; 34+ messages in thread
From: Michael Kerrisk (man-pages) @ 2021-06-09 22:26 UTC (permalink / raw)
To: Alejandro Colomar; +Cc: mtk.manpages, linux-man
Hi Alex,
On 5/25/21 6:19 AM, Alejandro Colomar wrote:
> Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Applied.
Thanks,
Michael
> ---
> man2/sigprocmask.2 | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/man2/sigprocmask.2 b/man2/sigprocmask.2
> index a622e4c18..b82386f14 100644
> --- a/man2/sigprocmask.2
> +++ b/man2/sigprocmask.2
> @@ -37,12 +37,16 @@ sigprocmask, rt_sigprocmask \- examine and change blocked signals
> .BI "int sigprocmask(int " how ", const sigset_t *restrict " set ,
> .BI " sigset_t *restrict " oldset );
> .PP
> +.BR "#include <signal.h>" " /* Definition of " SIG_* " constants */"
> +.BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */"
> +.B #include <unistd.h>
> +.PP
> /* Prototype for the underlying system call */
> -.BI "int rt_sigprocmask(int " how ", const kernel_sigset_t *" set ,
> +.BI "int syscall(SYS_rt_sigprocmask, int " how ", const kernel_sigset_t *" set ,
> .BI " kernel_sigset_t *" oldset ", size_t " sigsetsize );
> .PP
> /* Prototype for the legacy system call (deprecated) */
> -.BI "int sigprocmask(int " how ", const old_kernel_sigset_t *" set ,
> +.BI "int syscall(SYS_sigprocmask, int " how ", const old_kernel_sigset_t *" set ,
> .BI " old_kernel_sigset_t *" oldset );
> .fi
> .PP
>
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH v2 10/10] socketcall.2: Use syscall(SYS_...); for system calls without a wrapper
2021-05-24 18:19 ` [PATCH v2 10/10] socketcall.2: Use syscall(SYS_...); for system calls without a wrapper Alejandro Colomar
@ 2021-06-09 22:27 ` Michael Kerrisk (man-pages)
0 siblings, 0 replies; 34+ messages in thread
From: Michael Kerrisk (man-pages) @ 2021-06-09 22:27 UTC (permalink / raw)
To: Alejandro Colomar; +Cc: mtk.manpages, linux-man
Hi Alex,
On 5/25/21 6:19 AM, Alejandro Colomar wrote:
> Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Applied.
Thanks,
Michael
> ---
> man2/socketcall.2 | 16 +++++++++-------
> 1 file changed, 9 insertions(+), 7 deletions(-)
>
> diff --git a/man2/socketcall.2 b/man2/socketcall.2
> index 8ef3d65d3..883c2aafe 100644
> --- a/man2/socketcall.2
> +++ b/man2/socketcall.2
> @@ -27,13 +27,18 @@
> socketcall \- socket system calls
> .SH SYNOPSIS
> .nf
> -.B #include <linux/net.h>
> +.BR "#include <linux/net.h>" " /* Definition of " SYS_* " constants */"
> +.BR "#include <sys/syscall.h>" " /* Definition of " SYS_socketcall " */"
> +.B #include <unistd.h>
> .PP
> -.BI "int socketcall(int " call ", unsigned long *" args );
> +.BI "int syscall(SYS_socketcall, int " call ", unsigned long *" args );
> .fi
> .PP
> .IR Note :
> -There is no glibc wrapper for this system call; see NOTES.
> +glibc provides no wrapper for
> +.BR socketcall (),
> +necessitating the use of
> +.BR syscall (2).
> .SH DESCRIPTION
> .BR socketcall ()
> is a common kernel entry point for the socket system calls.
> @@ -156,10 +161,6 @@ T}
> This call is specific to Linux, and should not be used in programs
> intended to be portable.
> .SH NOTES
> -Glibc does not provide a wrapper for this system call;
> -in the unlikely event that you want to call it directly, do so using
> -.BR syscall (2).
> -.PP
> On some architectures\(emfor example, x86-64 and ARM\(emthere is no
> .BR socketcall ()
> system call; instead
> @@ -198,3 +199,4 @@ and also provides a (very) small performance improvement.
> .BR shutdown (2),
> .BR socket (2),
> .BR socketpair (2)
> +
>
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH 00/10] man2: SYNOPSIS: Use syscall, and fix includes.
2021-05-24 19:09 ` [PATCH 00/10] man2: SYNOPSIS: Use syscall, and fix includes Alejandro Colomar (man-pages)
@ 2021-06-09 22:28 ` Michael Kerrisk (man-pages)
2021-06-09 22:29 ` Michael Kerrisk (man-pages)
1 sibling, 0 replies; 34+ messages in thread
From: Michael Kerrisk (man-pages) @ 2021-06-09 22:28 UTC (permalink / raw)
To: Alejandro Colomar (man-pages); +Cc: mtk.manpages, linux-man
Hi Alex,
On 5/25/21 7:09 AM, Alejandro Colomar (man-pages) wrote:
> Hi Michael,
>
> On 5/22/21 1:25 AM, Alejandro Colomar wrote:
>> Hi Michael,
>>
>> Almost finished these:
>> $ man_lsfunc man2 | sed -n '/socketcall/,$p' | wc -l
>> 67
>> $ man_lsfunc man2 | wc -l
>> 401
>> $
From v2, I applied all except 3+4. Could you please resend
whatever should be applied to seccomp.2.
Thanks,
Michael
> Right now I have around 20-30 more patches about this pending, and
> that's all; I've finished.
>
> I'll hold them until you apply (or reject) the various patch sets that
> are pending to avoid creating conflicts.
>
> After that, I think we should release v5.12 :).
>
> And after the release, I have 4 branches to develop a few things for
> 5.13/14 (some of them depending on what we decide about some RFCs):
> - library: Use LIBRARY section (similar to FreeBSD)
> - stdint: Use standard (<stdint.h>) types, as well as standard attributes.
> - system_data_types: Document more types (I was documenting those you
> mark in TLPI as important).
> - examples: Fix the includes in the EXAMPLES sections to use the
> minimum number of includes, by using iwyu(1).
>
>
>
> Cheers,
>
> Alex
>
>
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH 00/10] man2: SYNOPSIS: Use syscall, and fix includes.
2021-05-24 19:09 ` [PATCH 00/10] man2: SYNOPSIS: Use syscall, and fix includes Alejandro Colomar (man-pages)
2021-06-09 22:28 ` Michael Kerrisk (man-pages)
@ 2021-06-09 22:29 ` Michael Kerrisk (man-pages)
1 sibling, 0 replies; 34+ messages in thread
From: Michael Kerrisk (man-pages) @ 2021-06-09 22:29 UTC (permalink / raw)
To: Alejandro Colomar (man-pages); +Cc: mtk.manpages, linux-man
[I hit send too soon....]
On 5/25/21 7:09 AM, Alejandro Colomar (man-pages) wrote:
> Hi Michael,
>
> On 5/22/21 1:25 AM, Alejandro Colomar wrote:
>> Hi Michael,
>>
>> Almost finished these:
>> $ man_lsfunc man2 | sed -n '/socketcall/,$p' | wc -l
>> 67
>> $ man_lsfunc man2 | wc -l
>> 401
>> $
>
> Right now I have around 20-30 more patches about this pending, and
> that's all; I've finished.
Good!
> I'll hold them until you apply (or reject) the various patch sets that
> are pending to avoid creating conflicts.
>
> After that, I think we should release v5.12 :).
>
> And after the release, I have 4 branches to develop a few things for
> 5.13/14 (some of them depending on what we decide about some RFCs):
> - library: Use LIBRARY section (similar to FreeBSD)
> - stdint: Use standard (<stdint.h>) types, as well as standard attributes.
> - system_data_types: Document more types (I was documenting those you
> mark in TLPI as important).
> - examples: Fix the includes in the EXAMPLES sections to use the
> minimum number of includes, by using iwyu(1).
Okay.
Thanks,
Michael
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH v2 03/10] seccomp.2: Document why each header is needed
2021-05-24 19:34 ` Alejandro Colomar (man-pages)
@ 2021-06-09 22:30 ` Michael Kerrisk (man-pages)
0 siblings, 0 replies; 34+ messages in thread
From: Michael Kerrisk (man-pages) @ 2021-06-09 22:30 UTC (permalink / raw)
To: Alejandro Colomar (man-pages)
Cc: mtk.manpages, linux-man, Kees Cook, Tyler Hicks, Will Drewry
On 5/25/21 7:34 AM, Alejandro Colomar (man-pages) wrote:
> Hi Michael,
>
> On 5/24/21 8:19 PM, Alejandro Colomar wrote:
>> Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
>> Cc: Kees Cook <keescook@chromium.org>
>> Cc: Tyler Hicks <tyhicks@canonical.com>
>> Cc: Will Drewry <wad@chromium.org>
>> Cc: Michael Kerrisk <mtk.manpages@gmail.com>
>> ---
>
> Please discards this one, for the same reasons as in v1: repeated.
> See
> <https://lore.kernel.org/linux-man/20210515182254.186607-1-alx.manpages@gmail.com/T/#u>
> instead.
>
> That one has a better mail.
Dropped.
Thanks,
Michael
>> man2/seccomp.2 | 10 +++++-----
>> 1 file changed, 5 insertions(+), 5 deletions(-)
>>
>> diff --git a/man2/seccomp.2 b/man2/seccomp.2
>> index 584a16f22..1be7d6766 100644
>> --- a/man2/seccomp.2
>> +++ b/man2/seccomp.2
>> @@ -30,11 +30,11 @@
>> seccomp \- operate on Secure Computing state of the process
>> .SH SYNOPSIS
>> .nf
>> -.B #include <linux/seccomp.h>
>> -.B #include <linux/filter.h>
>> -.B #include <linux/audit.h>
>> -.B #include <linux/signal.h>
>> -.B #include <sys/ptrace.h>
>> +.BR "#include <linux/seccomp.h>" " /* Definition of " SECCOMP_* " constants */"
>> +.BR "#include <linux/filter.h>" " /* Definition of " "struct sock_fprog" " */"
>> +.BR "#include <linux/audit.h>" " /* Definition of " AUDIT_* " constants */"
>> +.BR "#include <linux/signal.h>" " /* Definition of " SIG* " constants */"
>> +.BR "#include <sys/ptrace.h>" " /* Definition of " PTRACE_* " constants */"
>> .\" Kees Cook noted: Anything that uses SECCOMP_RET_TRACE returns will
>> .\" need <sys/ptrace.h>
>> .PP
>>
>
>
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH v2 04/10] seccomp.2: Use syscall(SYS_...); for system calls without a wrapper
2021-05-24 18:19 ` [PATCH v2 04/10] seccomp.2: Use syscall(SYS_...); for system calls without a wrapper Alejandro Colomar
@ 2021-06-09 22:31 ` Michael Kerrisk (man-pages)
0 siblings, 0 replies; 34+ messages in thread
From: Michael Kerrisk (man-pages) @ 2021-06-09 22:31 UTC (permalink / raw)
To: Alejandro Colomar; +Cc: mtk.manpages, linux-man
On 5/25/21 6:19 AM, Alejandro Colomar wrote:
> Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
This patch doesn't apply. Probably because I dropped 3/10?
Thanks,
Michael
> ---
> man2/seccomp.2 | 14 ++++++++------
> 1 file changed, 8 insertions(+), 6 deletions(-)
>
> diff --git a/man2/seccomp.2 b/man2/seccomp.2
> index 1be7d6766..0f3f30767 100644
> --- a/man2/seccomp.2
> +++ b/man2/seccomp.2
> @@ -37,13 +37,18 @@ seccomp \- operate on Secure Computing state of the process
> .BR "#include <sys/ptrace.h>" " /* Definition of " PTRACE_* " constants */"
> .\" Kees Cook noted: Anything that uses SECCOMP_RET_TRACE returns will
> .\" need <sys/ptrace.h>
> +.BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */"
> +.B #include <unistd.h>
> .PP
> -.BI "int seccomp(unsigned int " operation ", unsigned int " flags \
> -", void *" args );
> +.BI "int syscall(SYS_seccomp, unsigned int " operation ", unsigned int " flags ,
> +.BI " void *" args );
> .fi
> .PP
> .IR Note :
> -There is no glibc wrapper for this system call; see NOTES.
> +glibc provides no wrapper for
> +.BR seccomp (),
> +necessitating the use of
> +.BR syscall (2).
> .SH DESCRIPTION
> The
> .BR seccomp ()
> @@ -858,9 +863,6 @@ Tile (since Linux 4.3)
> PA-RISC (since Linux 4.6)
> .\" User mode Linux since Linux 4.6
> .PD
> -.PP
> -Glibc does not provide a wrapper for this system call; call it using
> -.BR syscall (2).
> .\"
> .SS Caveats
> There are various subtleties to consider when applying seccomp filters
>
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
^ permalink raw reply [flat|nested] 34+ messages in thread
end of thread, other threads:[~2021-06-09 22:31 UTC | newest]
Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-21 23:25 [PATCH 00/10] man2: SYNOPSIS: Use syscall, and fix includes Alejandro Colomar
2021-05-21 23:25 ` [PATCH 01/10] open.2: Remove unused <sys/stat.h> Alejandro Colomar
2021-05-21 23:25 ` [PATCH 02/10] rt_sigqueueinfo.2: Use syscall(SYS_...); for system calls without a wrapper Alejandro Colomar
2021-05-21 23:25 ` [PATCH 04/10] seccomp.2: " Alejandro Colomar
2021-05-21 23:25 ` [PATCH 05/10] set_thread_area.2: " Alejandro Colomar
2021-05-21 23:25 ` [PATCH 06/10] set_tid_address.2: " Alejandro Colomar
2021-05-21 23:25 ` [PATCH 07/10] sgetmask.2: " Alejandro Colomar
2021-05-21 23:25 ` [PATCH 08/10] shmop.2: Remove unused include Alejandro Colomar
2021-05-21 23:25 ` [PATCH 09/10] sigprocmask.2: Use syscall(SYS_...); for raw system calls Alejandro Colomar
2021-05-21 23:25 ` [PATCH 10/10] socketcall.2: Use syscall(SYS_...); for system calls without a wrapper Alejandro Colomar
2021-05-24 18:19 ` [PATCH v2 01/10] open.2: Remove unused <sys/stat.h> Alejandro Colomar
2021-06-09 22:23 ` Michael Kerrisk (man-pages)
2021-05-24 18:19 ` [PATCH v2 02/10] rt_sigqueueinfo.2: Use syscall(SYS_...); for system calls without a wrapper Alejandro Colomar
2021-06-09 22:24 ` Michael Kerrisk (man-pages)
2021-05-24 18:19 ` [PATCH v2 03/10] seccomp.2: Document why each header is needed Alejandro Colomar
2021-05-24 19:34 ` Alejandro Colomar (man-pages)
2021-06-09 22:30 ` Michael Kerrisk (man-pages)
2021-05-24 18:19 ` [PATCH v2 04/10] seccomp.2: Use syscall(SYS_...); for system calls without a wrapper Alejandro Colomar
2021-06-09 22:31 ` Michael Kerrisk (man-pages)
2021-05-24 18:19 ` [PATCH v2 05/10] set_thread_area.2: " Alejandro Colomar
2021-06-09 22:24 ` Michael Kerrisk (man-pages)
2021-05-24 18:19 ` [PATCH v2 06/10] set_tid_address.2: " Alejandro Colomar
2021-06-09 22:25 ` Michael Kerrisk (man-pages)
2021-05-24 18:19 ` [PATCH v2 07/10] sgetmask.2: " Alejandro Colomar
2021-06-09 22:25 ` Michael Kerrisk (man-pages)
2021-05-24 18:19 ` [PATCH v2 08/10] shmop.2: Remove unused include Alejandro Colomar
2021-06-09 22:25 ` Michael Kerrisk (man-pages)
2021-05-24 18:19 ` [PATCH v2 09/10] sigprocmask.2: Use syscall(SYS_...); for raw system calls Alejandro Colomar
2021-06-09 22:26 ` Michael Kerrisk (man-pages)
2021-05-24 18:19 ` [PATCH v2 10/10] socketcall.2: Use syscall(SYS_...); for system calls without a wrapper Alejandro Colomar
2021-06-09 22:27 ` Michael Kerrisk (man-pages)
2021-05-24 19:09 ` [PATCH 00/10] man2: SYNOPSIS: Use syscall, and fix includes Alejandro Colomar (man-pages)
2021-06-09 22:28 ` Michael Kerrisk (man-pages)
2021-06-09 22:29 ` Michael Kerrisk (man-pages)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).