Skip to contentSkip to conversation

man2: SYNOPSIS: Use syscall, and fix includes.

PATCH Superseded Alejandro Colomar 2 participants 34 messages May 21, 2021 – Jun 9, 2021 Man-pages: manual pages for Linux -- Sections 2, 3, 4, 5, and 7

lore
Share & tools
lore
#0 lore raw

cover man2: SYNOPSIS: Use syscall, and fix includes.

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/[email protected]/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(-)
Signature · 1 line
2.31.1
#1 lore raw

PATCH 1/10 open.2: Remove unused <sys/stat.h>

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.

---
 man2/open.2 | 1 -
 1 file changed, 1 deletion(-)
man2/open.2 +0 -1
index bac1ee806..1bcd995f4 100644
@@ -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 );
Signature · 1 line
2.31.1
#2 lore raw

PATCH 2/10 rt_sigqueueinfo.2: Use syscall(SYS_...); for system calls without a wrapper

In reply to Alejandro Colomar
---
 man2/rt_sigqueueinfo.2 | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
man2/rt_sigqueueinfo.2 +8 -3
index 2dd1a5877..d48ecbdcd 100644
@@ -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 :
Signature · 1 line
2.31.1
#3 lore raw

PATCH 4/10 seccomp.2: Use syscall(SYS_...); for system calls without a wrapper

In reply to Alejandro Colomar
---
 man2/seccomp.2 | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)
man2/seccomp.2 +8 -6
index 1be7d6766..476e5c2f0 100644
@@ -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
Signature · 1 line
2.31.1
#4 lore raw

PATCH 5/10 set_thread_area.2: Use syscall(SYS_...); for system calls without a wrapper

In reply to Alejandro Colomar
---
 man2/set_thread_area.2 | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)
man2/set_thread_area.2 +12 -12
index 284dea390..43f3009f7 100644
@@ -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
Signature · 1 line
2.31.1
#5 lore raw

PATCH 6/10 set_tid_address.2: Use syscall(SYS_...); for system calls without a wrapper

In reply to Alejandro Colomar
---
 man2/set_tid_address.2 | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
man2/set_tid_address.2 +7 -6
index 258c9b9ef..4b81865dc 100644
@@ -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),
Signature · 1 line
2.31.1
#6 lore raw

PATCH 7/10 sgetmask.2: Use syscall(SYS_...); for system calls without a wrapper

In reply to Alejandro Colomar
---
 man2/sgetmask.2 | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)
man2/sgetmask.2 +8 -7
index 7563b57ff..59b58ceaf 100644
@@ -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
Signature · 1 line
2.31.1
#7 lore raw

PATCH 8/10 shmop.2: Remove unused include

In reply to Alejandro Colomar
---
 man2/shmop.2 | 1 -
 1 file changed, 1 deletion(-)
man2/shmop.2 +0 -1
index c7e66af0e..52baed96c 100644
@@ -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 );
Signature · 1 line
2.31.1
#8 lore raw

PATCH 9/10 sigprocmask.2: Use syscall(SYS_...); for raw system calls

In reply to Alejandro Colomar
---
 man2/sigprocmask.2 | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
man2/sigprocmask.2 +6 -2
index a622e4c18..b82386f14 100644
@@ -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
Signature · 1 line
2.31.1
#9 lore raw

PATCH 10/10 socketcall.2: Use syscall(SYS_...); for system calls without a wrapper

In reply to Alejandro Colomar
---
 man2/socketcall.2 | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)
man2/socketcall.2 +8 -7
index 8ef3d65d3..f632ba011 100644
@@ -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
Signature · 1 line
2.31.1
#10 lore raw

PATCH v2 1/10 open.2: Remove unused <sys/stat.h>

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.

---
 man2/open.2 | 1 -
 1 file changed, 1 deletion(-)
man2/open.2 +0 -1
index bac1ee806..1bcd995f4 100644
@@ -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 );
Signature · 1 line
2.31.1
#11 lore raw

Re: [PATCH v2 01/10] open.2: Remove unused <sys/stat.h>

Hi Alex,

Quoted 7 lines · Alejandro Colomar

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

Quoted 18 lines
---
 man2/open.2 | 1 -
 1 file changed, 1 deletion(-)
man2/open.2 +0 -1
index bac1ee806..1bcd995f4 100644
@@ -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 );
Signature · 3 lines
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
#12 lore raw

PATCH v2 2/10 rt_sigqueueinfo.2: Use syscall(SYS_...); for system calls without a wrapper

In reply to Alejandro Colomar
---
 man2/rt_sigqueueinfo.2 | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
man2/rt_sigqueueinfo.2 +8 -3
index 2dd1a5877..d48ecbdcd 100644
@@ -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 :
Signature · 1 line
2.31.1
#13 lore raw

Re: [PATCH v2 02/10] rt_sigqueueinfo.2: Use syscall(SYS_...); for system calls without a wrapper

Hi Alex,

Quoted 1 line · Alejandro Colomar

Applied.

Thanks,

Michael

Quoted 27 lines
---
 man2/rt_sigqueueinfo.2 | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
man2/rt_sigqueueinfo.2 +8 -3
index 2dd1a5877..d48ecbdcd 100644
@@ -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 :
Signature · 3 lines
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
#14 lore raw

PATCH v2 3/10 seccomp.2: Document why each header is needed

In reply to Alejandro Colomar
Cc Kees Cook <[email protected]>
Cc Tyler Hicks <[email protected]>
Cc Will Drewry <[email protected]>
Cc Michael Kerrisk <[email protected]>
---
 man2/seccomp.2 | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
man2/seccomp.2 +5 -5
index 584a16f22..1be7d6766 100644
@@ -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
Signature · 1 line
2.31.1
#15 lore raw

Re: [PATCH v2 03/10] seccomp.2: Document why each header is needed

Hi Michael,

Quoted 6 lines · Alejandro Colomar
Cc Kees Cook <[email protected]>
Cc Tyler Hicks <[email protected]>
Cc Will Drewry <[email protected]>
Cc Michael Kerrisk <[email protected]>

---

Please discards this one, for the same reasons as in v1: repeated.
See <https://lore.kernel.org/linux-man/[email protected]/T/#u> instead.

That one has a better mail.

Thanks,

Alex

Quoted 25 lines
  man2/seccomp.2 | 10 +++++-----
  1 file changed, 5 insertions(+), 5 deletions(-)
man2/seccomp.2 +5 -5
index 584a16f22..1be7d6766 100644
@@ -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
Signature · 3 lines
Alejandro Colomar
Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/
#16 lore raw

Re: [PATCH v2 03/10] seccomp.2: Document why each header is needed

Quoted 10 lines · Alejandro Colomar (man-pages)

Hi Michael,

Quoted 6 lines · Alejandro Colomar
Cc Kees Cook <[email protected]>
Cc Tyler Hicks <[email protected]>
Cc Will Drewry <[email protected]>
Cc Michael Kerrisk <[email protected]>

---

Quoted 6 lines

Please discards this one, for the same reasons as in v1: repeated. See
<https://lore.kernel.org/linux-man/[email protected]/T/#u>
instead.

That one has a better mail.

Dropped.

Thanks,

Michael

Quoted 27 lines
Quoted 25 lines
  man2/seccomp.2 | 10 +++++-----
  1 file changed, 5 insertions(+), 5 deletions(-)
man2/seccomp.2 +5 -5
index 584a16f22..1be7d6766 100644
@@ -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
Signature · 3 lines
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
#17 lore raw

PATCH v2 4/10 seccomp.2: Use syscall(SYS_...); for system calls without a wrapper

In reply to Alejandro Colomar
---
 man2/seccomp.2 | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)
man2/seccomp.2 +8 -6
index 1be7d6766..0f3f30767 100644
@@ -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
Signature · 1 line
2.31.1
#18 lore raw

Re: [PATCH v2 04/10] seccomp.2: Use syscall(SYS_...); for system calls without a wrapper

Quoted 1 line · Alejandro Colomar

This patch doesn't apply. Probably because I dropped 3/10?

Thanks,

Michael

Quoted 41 lines
---
 man2/seccomp.2 | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)
man2/seccomp.2 +8 -6
index 1be7d6766..0f3f30767 100644
@@ -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
Signature · 3 lines
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
#19 lore raw

PATCH v2 5/10 set_thread_area.2: Use syscall(SYS_...); for system calls without a wrapper

In reply to Alejandro Colomar
---
 man2/set_thread_area.2 | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)
man2/set_thread_area.2 +12 -12
index 284dea390..43f3009f7 100644
@@ -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
Signature · 1 line
2.31.1
#20 lore raw

Re: [PATCH v2 05/10] set_thread_area.2: Use syscall(SYS_...); for system calls without a wrapper

Hi Alex,

Quoted 4 lines · Alejandro Colomar
---
 man2/set_thread_area.2 | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

Applied.

Thanks,

Michael

Quoted 57 lines
man2/set_thread_area.2 +12 -12
index 284dea390..43f3009f7 100644
@@ -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
Signature · 3 lines
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
#21 lore raw

PATCH v2 6/10 set_tid_address.2: Use syscall(SYS_...); for system calls without a wrapper

In reply to Alejandro Colomar
---
 man2/set_tid_address.2 | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
man2/set_tid_address.2 +7 -6
index 258c9b9ef..65b4931eb 100644
@@ -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),
Signature · 1 line
2.31.1
#22 lore raw

Re: [PATCH v2 06/10] set_tid_address.2: Use syscall(SYS_...); for system calls without a wrapper

Hi Alex,

Quoted 1 line · Alejandro Colomar

Applied.

Thanks,

Michael

Quoted 40 lines
---
 man2/set_tid_address.2 | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
man2/set_tid_address.2 +7 -6
index 258c9b9ef..65b4931eb 100644
@@ -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),
Signature · 3 lines
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
#23 lore raw

PATCH v2 7/10 sgetmask.2: Use syscall(SYS_...); for system calls without a wrapper

In reply to Alejandro Colomar
---
 man2/sgetmask.2 | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)
man2/sgetmask.2 +8 -7
index 7563b57ff..59b58ceaf 100644
@@ -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
Signature · 1 line
2.31.1
#24 lore raw

Re: [PATCH v2 07/10] sgetmask.2: Use syscall(SYS_...); for system calls without a wrapper

Hi Alex,

Quoted 1 line · Alejandro Colomar

Applied.

Thanks,

Michael

Quoted 41 lines
---
 man2/sgetmask.2 | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)
man2/sgetmask.2 +8 -7
index 7563b57ff..59b58ceaf 100644
@@ -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
Signature · 3 lines
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
#25 lore raw

PATCH v2 8/10 shmop.2: Remove unused include

In reply to Alejandro Colomar
---
 man2/shmop.2 | 1 -
 1 file changed, 1 deletion(-)
man2/shmop.2 +0 -1
index c7e66af0e..52baed96c 100644
@@ -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 );
Signature · 1 line
2.31.1
#26 lore raw

Re: [PATCH v2 08/10] shmop.2: Remove unused include

Hi Alex,

Quoted 1 line · Alejandro Colomar

Applied.

Thanks,

Michael

Quoted 17 lines
---
 man2/shmop.2 | 1 -
 1 file changed, 1 deletion(-)
man2/shmop.2 +0 -1
index c7e66af0e..52baed96c 100644
@@ -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 );
Signature · 3 lines
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
#27 lore raw

PATCH v2 9/10 sigprocmask.2: Use syscall(SYS_...); for raw system calls

In reply to Alejandro Colomar
---
 man2/sigprocmask.2 | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
man2/sigprocmask.2 +6 -2
index a622e4c18..b82386f14 100644
@@ -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
Signature · 1 line
2.31.1
#28 lore raw

Re: [PATCH v2 09/10] sigprocmask.2: Use syscall(SYS_...); for raw system calls

Hi Alex,

Quoted 1 line · Alejandro Colomar

Applied.

Thanks,

Michael

Quoted 28 lines
---
 man2/sigprocmask.2 | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
man2/sigprocmask.2 +6 -2
index a622e4c18..b82386f14 100644
@@ -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
Signature · 3 lines
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
#29 lore raw

PATCH v2 10/10 socketcall.2: Use syscall(SYS_...); for system calls without a wrapper

In reply to Alejandro Colomar
---
 man2/socketcall.2 | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)
man2/socketcall.2 +9 -7
index 8ef3d65d3..883c2aafe 100644
@@ -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)
+
Signature · 1 line
2.31.1
#30 lore raw

Re: [PATCH v2 10/10] socketcall.2: Use syscall(SYS_...); for system calls without a wrapper

Hi Alex,

Quoted 1 line · Alejandro Colomar

Applied.

Thanks,

Michael

Quoted 47 lines
---
 man2/socketcall.2 | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)
man2/socketcall.2 +9 -7
index 8ef3d65d3..883c2aafe 100644
@@ -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)
+
Signature · 3 lines
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
#31 lore raw
In reply to Alejandro Colomar

Hi Michael,

Quoted 8 lines · Alejandro Colomar

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

Signature · 3 lines
Alejandro Colomar
Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/
#32 lore raw

Hi Alex,

Quoted 11 lines · Alejandro Colomar (man-pages)

Hi Michael,

Quoted 8 lines · Alejandro Colomar

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

Quoted 24 lines

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

Signature · 3 lines
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
#33 lore raw
In reply to Alejandro Colomar (man-pages)

[I hit send too soon....]

Quoted 12 lines · Alejandro Colomar (man-pages)

Hi Michael,

Quoted 8 lines · Alejandro Colomar

Hi Michael,

Almost finished these:

$ man_lsfunc man2 | sed -n '/socketcall/,$p' | wc -l
67
$ man_lsfunc man2 | wc -l
401
$
Quoted 2 lines

Right now I have around 20-30 more patches about this pending, and that's all; I've finished.

Good!

Quoted 5 lines

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 :).

Quoted 8 lines

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

Signature · 3 lines
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/