]> git.ipfire.org Git - thirdparty/man-pages.git/log
thirdparty/man-pages.git
4 years agoseccomp_unotify.2: Minor fixes
Michael Kerrisk [Sun, 4 Oct 2020 05:21:54 +0000 (07:21 +0200)] 
seccomp_unotify.2: Minor fixes

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoseccomp_unotify.2: Fixes after review comments by Jann Horn
Michael Kerrisk [Thu, 1 Oct 2020 09:33:16 +0000 (11:33 +0200)] 
seccomp_unotify.2: Fixes after review comments by Jann Horn

Reported-by: Jann Horn <jannh@google.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoseccomp_unotify.2: Add BUGS section describing SECCOMP_IOCTL_NOTIF_RECV bug
Michael Kerrisk [Wed, 30 Sep 2020 20:32:46 +0000 (22:32 +0200)] 
seccomp_unotify.2: Add BUGS section describing SECCOMP_IOCTL_NOTIF_RECV bug

Tycho Andersen confirmed that this issue is present.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoseccomp_unotify.2: srcfix: remove bogus FIXME
Michael Kerrisk [Wed, 30 Sep 2020 20:25:55 +0000 (22:25 +0200)] 
seccomp_unotify.2: srcfix: remove bogus FIXME

Pathname arguments are limited to PATH_MAX bytes.

Reported-by: Tycho Andersen <tycho@tycho.pizza>
Reported-by: Jann Horn <jannh@google.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoseccomp_unotify.2: Changes after feed back from Tycho Andersen
Michael Kerrisk [Wed, 30 Sep 2020 20:24:59 +0000 (22:24 +0200)] 
seccomp_unotify.2: Changes after feed back from Tycho Andersen

Reported-by: Tycho Andersen <tycho@tycho.pizza>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoseccomp_unotify.2: Document the seccomp user-space notification mechanism
Michael Kerrisk [Mon, 28 Sep 2020 20:13:12 +0000 (22:13 +0200)] 
seccomp_unotify.2: Document the seccomp user-space notification mechanism

The APIs used by this mechanism comprise not only seccomp(2), but
also a number of ioctl(2) operations. And any useful example
demonstrating these APIs is will necessarily be rather long.
Trying to cram all of this into the seccomp(2) page would make
that page unmanageably long. Therefore, let's document this
mechanism in a separate page.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoseccomp.2: Note that SECCOMP_RET_USER_NOTIF can be overridden
Michael Kerrisk [Thu, 15 Oct 2020 11:12:03 +0000 (13:12 +0200)] 
seccomp.2: Note that SECCOMP_RET_USER_NOTIF can be overridden

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoseccomp.2: wfix: mention term "supervisor" in description of SECCOMP_RET_USER_NOTIF
Michael Kerrisk [Thu, 15 Oct 2020 11:11:08 +0000 (13:11 +0200)] 
seccomp.2: wfix: mention term "supervisor" in description of SECCOMP_RET_USER_NOTIF

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoseccomp.2: SEE ALSO: add seccomp_unotify(2)
Michael Kerrisk [Mon, 28 Sep 2020 22:10:34 +0000 (00:10 +0200)] 
seccomp.2: SEE ALSO: add seccomp_unotify(2)

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoseccomp.2: Rework SECCOMP_GET_NOTIF_SIZES somewhat
Michael Kerrisk [Mon, 28 Sep 2020 07:42:38 +0000 (09:42 +0200)] 
seccomp.2: Rework SECCOMP_GET_NOTIF_SIZES somewhat

The existing text says the structures (plural!) contain a 'struct
seccomp_data'. But this is only true for the received notification
structure (seccomp_notif). So, reword the sentence to be more
general, noting simply that the structures may evolve over time.

Add some comments to the structure definition.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoseccomp.2: Add some details for SECCOMP_FILTER_FLAG_NEW_LISTENER
Michael Kerrisk [Sat, 26 Sep 2020 20:48:44 +0000 (22:48 +0200)] 
seccomp.2: Add some details for SECCOMP_FILTER_FLAG_NEW_LISTENER

Rework the description a little, and note that the close-on-exec
flag is set for the returned file descriptor.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoseccomp.2: Minor edits to Tycho's SECCOMP_FILTER_FLAG_NEW_LISTENER patch
Michael Kerrisk [Sat, 26 Sep 2020 13:45:45 +0000 (15:45 +0200)] 
seccomp.2: Minor edits to Tycho's SECCOMP_FILTER_FLAG_NEW_LISTENER patch

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoseccomp.2: Document SECCOMP_FILTER_FLAG_NEW_LISTENER
Tycho Andersen [Sat, 26 Sep 2020 13:42:36 +0000 (15:42 +0200)] 
seccomp.2: Document SECCOMP_FILTER_FLAG_NEW_LISTENER

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoseccomp.2: Reorder list of SECCOMP_SET_MODE_FILTER flags alphabetically
Michael Kerrisk [Sat, 26 Sep 2020 13:40:56 +0000 (15:40 +0200)] 
seccomp.2: Reorder list of SECCOMP_SET_MODE_FILTER flags alphabetically

(No content changes.)

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoseccomp.2: Some reworking of Tycho's SECCOMP_RET_USER_NOTIF patch
Michael Kerrisk [Sat, 26 Sep 2020 13:34:05 +0000 (15:34 +0200)] 
seccomp.2: Some reworking of Tycho's SECCOMP_RET_USER_NOTIF patch

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoseccomp.2: Document SECCOMP_RET_USER_NOTIF
Tycho Andersen [Sat, 26 Sep 2020 13:29:47 +0000 (15:29 +0200)] 
seccomp.2: Document SECCOMP_RET_USER_NOTIF

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoseccomp.2: Minor edits to Tycho Andersen's patch
Michael Kerrisk [Sat, 26 Sep 2020 13:18:38 +0000 (15:18 +0200)] 
seccomp.2: Minor edits to Tycho Andersen's patch

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoseccomp.2: Document SECCOMP_GET_NOTIF_SIZES
Tycho Andersen [Thu, 13 Dec 2018 00:11:05 +0000 (17:11 -0700)] 
seccomp.2: Document SECCOMP_GET_NOTIF_SIZES

Signed-off-by: Tycho Andersen <tycho@tycho.ws>
CC: Kees Cook <keescook@chromium.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agosocketcall.2: srcfix
Michael Kerrisk [Wed, 9 Jun 2021 22:26:48 +0000 (10:26 +1200)] 
socketcall.2: srcfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agosocketcall.2: Use syscall(SYS_...); for system calls without a wrapper
Alejandro Colomar [Mon, 24 May 2021 18:19:47 +0000 (20:19 +0200)] 
socketcall.2: Use syscall(SYS_...); for system calls without a wrapper

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agosigprocmask.2: Use syscall(SYS_...); for raw system calls
Alejandro Colomar [Mon, 24 May 2021 18:19:46 +0000 (20:19 +0200)] 
sigprocmask.2: Use syscall(SYS_...); for raw system calls

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoshmop.2: Remove unused include
Alejandro Colomar [Mon, 24 May 2021 18:19:45 +0000 (20:19 +0200)] 
shmop.2: Remove unused include

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agosgetmask.2: Use syscall(SYS_...); for system calls without a wrapper
Alejandro Colomar [Mon, 24 May 2021 18:19:44 +0000 (20:19 +0200)] 
sgetmask.2: Use syscall(SYS_...); for system calls without a wrapper

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoset_tid_address.2: Use syscall(SYS_...); for system calls without a wrapper
Alejandro Colomar [Mon, 24 May 2021 18:19:43 +0000 (20:19 +0200)] 
set_tid_address.2: Use syscall(SYS_...); for system calls without a wrapper

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoset_thread_area.2: Use syscall(SYS_...); for system calls without a wrapper
Alejandro Colomar [Mon, 24 May 2021 18:19:42 +0000 (20:19 +0200)] 
set_thread_area.2: Use syscall(SYS_...); for system calls without a wrapper

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agort_sigqueueinfo.2: Use syscall(SYS_...); for system calls without a wrapper
Alejandro Colomar [Mon, 24 May 2021 18:19:39 +0000 (20:19 +0200)] 
rt_sigqueueinfo.2: Use syscall(SYS_...); for system calls without a wrapper

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoopen.2: Remove unused <sys/stat.h>
Alejandro Colomar [Mon, 24 May 2021 18:19:38 +0000 (20:19 +0200)] 
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.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agosystem_data_types.7: Minor enhancement of description of mode_t
Michael Kerrisk [Wed, 9 Jun 2021 21:37:34 +0000 (09:37 +1200)] 
system_data_types.7: Minor enhancement of description of mode_t

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agomode_t.3: New link to system_data_types(7)
Alejandro Colomar [Sun, 23 May 2021 11:22:13 +0000 (13:22 +0200)] 
mode_t.3: New link to system_data_types(7)

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agosystem_data_types.7: Add 'mode_t'
Alejandro Colomar [Sun, 23 May 2021 11:22:12 +0000 (13:22 +0200)] 
system_data_types.7: Add 'mode_t'

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoblksize_t.3: New link to system_data_types(7)
Alejandro Colomar [Sun, 23 May 2021 11:22:11 +0000 (13:22 +0200)] 
blksize_t.3: New link to system_data_types(7)

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agosystem_data_types.7: Add 'blksize_t'
Alejandro Colomar [Sun, 23 May 2021 11:22:10 +0000 (13:22 +0200)] 
system_data_types.7: Add 'blksize_t'

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agocc_t.3: New link to system_data_types(7)
Alejandro Colomar [Sun, 23 May 2021 11:22:09 +0000 (13:22 +0200)] 
cc_t.3: New link to system_data_types(7)

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agosystem_data_types.7: Add 'cc_t'
Alejandro Colomar [Sun, 23 May 2021 11:22:08 +0000 (13:22 +0200)] 
system_data_types.7: Add 'cc_t'

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoblkcnt_t.3: New link to system_data_types(7)
Alejandro Colomar [Sun, 23 May 2021 11:22:07 +0000 (13:22 +0200)] 
blkcnt_t.3: New link to system_data_types(7)

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agosystem_data_types.7: Add 'blkcnt_t'
Alejandro Colomar [Sun, 23 May 2021 11:22:06 +0000 (13:22 +0200)] 
system_data_types.7: Add 'blkcnt_t'

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agokernel_lockdown.7: Remove additional text alluding to lifting via SysRq
dann frazier [Mon, 7 Jun 2021 22:19:43 +0000 (16:19 -0600)] 
kernel_lockdown.7: Remove additional text alluding to lifting via SysRq

My previous patch intended to drop the docs for the lockdown lift
SysRq, but it missed this other section that refers to lifting it
via a keyboard - an allusion to that same SysRq.

Signed-off-by: dann frazier <dann.frazier@canonical.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agokernel_lockdown.7: Remove description of lifting via SysRq (not upstream)
dann frazier [Thu, 27 May 2021 07:13:42 +0000 (09:13 +0200)] 
kernel_lockdown.7: Remove description of lifting via SysRq (not upstream)

The patch that implemented lockdown lifting via SysRq ended up
getting dropped[*] before the feature was merged upstream. Having
the feature documented but unsupported has caused some confusion
for our users.

[*] http://archive.lwn.net:8080/linux-kernel/CACdnJuuxAM06TcnczOA6NwxhnmQUeqqm3Ma8btukZpuCS+dOqg@mail.gmail.com/

Signed-off-by: dann frazier <dann.frazier@canonical.com>
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: David Howells <dhowells@redhat.com>
Cc: Pedro Principeza <pedro.principeza@canonical.com>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Kyle McMartin <kyle@redhat.com>
Cc: Matthew Garrett <mjg59@google.com>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoMakefile, README: Break installation into a target for each mandir
Alejandro Colomar [Wed, 9 Jun 2021 17:01:08 +0000 (19:01 +0200)] 
Makefile, README: Break installation into a target for each mandir

Instead of having a monolithic 'make install', break it into
multiple targets such as 'make install-man3'.  This simplifies
packaging, for example in Debian, where they break this project
into several packages: 'manpages' and 'manpages-dev', each
containing different mandirs.

The above allows for multithread installation: 'make -j'

Also, don't overwrite files that don't need to be overwritten, by
having a target for files, which makes use of make's timestamp
comparison.

This allows for much faster installation times.

For comparison, on my laptop (i7-8850H; 6C/12T):

Old Makefile:
~/src/linux/man-pages$ time sudo make >/dev/null

real 0m7.509s
user 0m5.269s
sys 0m2.614s

The times with the old makefile, varied a lot, between
5 and 10 seconds.  The times after applying this patch
are much more consistent.  BTW, I compared these times to
the very old Makefile of man-pages-5-09, and those were
around 3.5 s, so it was a bit of my fault to have such a
slow Makefile, when I changed the Makefile some weeks ago.

New Makefile (full clean install):
~/src/linux/man-pages$ time sudo make >/dev/null

real 0m5.160s
user 0m4.326s
sys 0m1.137s
~/src/linux/man-pages$ time sudo make -j2 >/dev/null

real 0m1.602s
user 0m2.529s
sys 0m0.289s
~/src/linux/man-pages$ time sudo make -j >/dev/null

real 0m1.398s
user 0m2.502s
sys 0m0.281s

Here we can see that 'make -j' drops times drastically,
compared to the old monolithic Makefile.  Not only that,
but since when we are working with the man pages there
aren't many pages involved, times will be even better.

Here are some times with a single page changed (touched):

New Makefile (one page touched):
~/src/linux/man-pages$ touch man2/membarrier.2
~/src/linux/man-pages$ time sudo make install
- INSTALL /usr/local/share/man/man2/membarrier.2

real 0m0.988s
user 0m0.966s
sys 0m0.025s
~/src/linux/man-pages$ touch man2/membarrier.2
~/src/linux/man-pages$ time sudo make install -j
- INSTALL /usr/local/share/man/man2/membarrier.2

real 0m0.989s
user 0m0.943s
sys 0m0.049s

Also, modify the output of the make install and uninstall commands
so that a line is output for each file or directory that is
installed, similarly to the kernel's Makefile.  This doesn't apply
to html targets, which haven't been changed in this commit.

Also, make sure that for each invocation of $(INSTALL_DIR), no
parents are created, (i.e., avoid `mkdir -p` behavior).  The GNU
make manual states that it can create race conditions.  Instead,
declare as a prerequisite for each directory its parent directory,
and let make resolve the order of creation.

Also, use ':=' instead of '=' to improve performance, by
evaluating each assignment only once.

Ensure than the shell is not called when not needed, by removing
all ";" and quotes in the commands.

See also: <https://stackoverflow.com/q/67862417/6872717>

Specify conventions and rationales used in the Makefile in a comment.

Add copyright.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agosetresuid.2: tfix (Oxford comma)
Michael Kerrisk [Fri, 21 May 2021 08:19:28 +0000 (20:19 +1200)] 
setresuid.2: tfix (Oxford comma)

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoselect.2: Strengthen the warning regarding the low value of FD_SETSIZE
Michael Kerrisk [Wed, 19 May 2021 21:51:18 +0000 (09:51 +1200)] 
select.2: Strengthen the warning regarding the low value of FD_SETSIZE

All modern code should avoid select(2) in favor of poll(2)
or epoll(7).

For a long history of this problem, see:

https://marc.info/?l=bugtraq&m=110660879328901
    List:       bugtraq
    Subject:    SECURITY.NNOV: Multiple applications fd_set structure bitmap array index overflow
    From:       3APA3A <3APA3A () security ! nnov ! ru>
    Date:       2005-01-24 20:30:08

https://sourceware.org/legacy-ml/libc-alpha/2003-05/msg00171.html
    User-settable FD_SETSIZE and select()
    From: mtk-lists at gmx dot net
    To: libc-alpha at sources dot redhat dot com
    Date: Mon, 19 May 2003 14:49:03 +0200 (MEST)
    Subject: User-settable FD_SETSIZE and select()

https://sourceware.org/bugzilla/show_bug.cgi?id=10352

http://0pointer.net/blog/file-descriptor-limits.html
https://twitter.com/pid_eins/status/1394962183033868292

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoselect.2: Relocate sentence about the fd_set value-result arguments to BUGS
Michael Kerrisk [Wed, 19 May 2021 21:49:09 +0000 (09:49 +1200)] 
select.2: Relocate sentence about the fd_set value-result arguments to BUGS

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agosched_setattr.2: Use syscall(SYS_...); for system calls without a wrapper
Alejandro Colomar [Sat, 15 May 2021 18:20:28 +0000 (20:20 +0200)] 
sched_setattr.2: Use syscall(SYS_...); for system calls without a wrapper

Document also why each header is required

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agos390_sthyi.2: Use syscall(SYS_...); for system calls without a wrapper
Alejandro Colomar [Sat, 15 May 2021 18:20:27 +0000 (20:20 +0200)] 
s390_sthyi.2: Use syscall(SYS_...); for system calls without a wrapper

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agos390_sthyi.2: Replace numeric constant by its name (macro)
Alejandro Colomar [Sat, 15 May 2021 18:20:26 +0000 (20:20 +0200)] 
s390_sthyi.2: Replace numeric constant by its name (macro)

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Eugene Syromyatnikov <evgsyr@gmail.com>
Cc: QingFeng Hao <haoqf@linux.vnet.ibm.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agos390_runtime_instr.2: Use syscall(SYS_...); for system calls without a wrapper
Alejandro Colomar [Sat, 15 May 2021 18:20:25 +0000 (20:20 +0200)] 
s390_runtime_instr.2: Use syscall(SYS_...); for system calls without a wrapper

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agos390_pci_mmio_write.2: Use syscall(SYS_...); for system calls without a wrapper;...
Alejandro Colomar [Sat, 15 May 2021 18:20:24 +0000 (20:20 +0200)] 
s390_pci_mmio_write.2: Use syscall(SYS_...); for system calls without a wrapper; fix includes too

This function doesn't use any flags or special types, so there's
no reason to include <asm/unistd.h>; remove it.  Add the includes
needed for syscall(2) only.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agos390_guarded_storage.2: Use syscall(SYS_...); for system calls without a wrapper
Alejandro Colomar [Sat, 15 May 2021 18:20:23 +0000 (20:20 +0200)] 
s390_guarded_storage.2: Use syscall(SYS_...); for system calls without a wrapper

Also document why each header is needed.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agorename.2: ffix
Alejandro Colomar [Sat, 15 May 2021 18:20:21 +0000 (20:20 +0200)] 
rename.2: ffix

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agomemfd_create.2, mmap.2, shmget.2: Document the EPERM for huge page allocations
Michael Kerrisk [Mon, 17 May 2021 03:31:08 +0000 (15:31 +1200)] 
memfd_create.2, mmap.2, shmget.2: Document the EPERM for huge page allocations

This error can occur if the caller is does not have CAP_IPC_LOCK
and is not a member of the sysctl_hugetlb_shm_group.

Reported-by: Yang Xu <xuyang2018.jy@fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoproc.5: Document /proc/sys/vm/sysctl_hugetlb_shm_group
Michael Kerrisk [Mon, 17 May 2021 03:18:10 +0000 (15:18 +1200)] 
proc.5: Document /proc/sys/vm/sysctl_hugetlb_shm_group

As a deprecated feature, it appears that the RLIMIT_MEMLOCK
can also be used to permit huge page allocation, but let's
not document that for now.

In the Linux 5.12, see fs/hugetlbfs/inode.c.

static int can_do_hugetlb_shm(void)
{
        kgid_t shm_group;
        shm_group = make_kgid(&init_user_ns, sysctl_hugetlb_shm_group);
        return capable(CAP_IPC_LOCK) || in_group_p(shm_group);
}

...

struct file *hugetlb_file_setup(const char *name, size_t size,
                                vm_flags_t acctflag, struct user_struct **user,
                                int creat_flags, int page_size_log)
{
        ...
        if (creat_flags == HUGETLB_SHMFS_INODE && !can_do_hugetlb_shm()) {
                *user = current_user();
                if (user_shm_lock(size, *user)) {
                        task_lock(current);
                        pr_warn_once("%s (%d): Using mlock ulimits for SHM_HUGETLB is deprecated\n",
                                current->comm, current->pid);
                        task_unlock(current);
                } else {
                        *user = NULL;
                        return ERR_PTR(-EPERM);
                }
        }
        ...
}

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agocapabilities.7: CAP_IPC_LOCK also governs memory allocation using huge pages
Michael Kerrisk [Mon, 17 May 2021 02:08:37 +0000 (14:08 +1200)] 
capabilities.7: CAP_IPC_LOCK also governs memory allocation using huge pages

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoconsole_codes.4: tfix
Alejandro Colomar [Thu, 13 May 2021 15:21:55 +0000 (17:21 +0200)] 
console_codes.4: tfix

The correct meaning of SGR is "Select Graphic Rendition".

See:
<https://www.ecma-international.org/wp-content/uploads/ECMA-48_5th_edition_june_1991.pdf>
<https://nvlpubs.nist.gov/nistpubs/Legacy/FIPS/fipspub86.pdf>
<https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters>

Reported-by: Christoph Anton Mitterer <calestyo@scientia.net>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoctime.3: Restore documentation of 'tm_gmtoff' field
Michael Kerrisk [Mon, 17 May 2021 00:56:46 +0000 (12:56 +1200)] 
ctime.3: Restore documentation of 'tm_gmtoff' field

Accidentally deleted in commit ba39b288ab0714941786.

Reported-by: Katsuhiro Numata <byakkomon@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoREADME: Update installation path
Alejandro Colomar [Tue, 11 May 2021 06:53:00 +0000 (08:53 +0200)] 
README: Update installation path

The installation path was changed recently (See 'prefix' in the
Makefile).  I forgot to update the README with those changes.
Fix it.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoexpm1.3: tfix
Akihiro Motoki [Tue, 11 May 2021 10:11:47 +0000 (12:11 +0200)] 
expm1.3: tfix

Signed-off-by: Akihiro Motoki <amotoki@gmail.com>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agosigvec.3: tfix
Akihiro Motoki [Tue, 11 May 2021 10:11:46 +0000 (12:11 +0200)] 
sigvec.3: tfix

Signed-off-by: Akihiro Motoki <amotoki@gmail.com>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agocapabilities.7: ffix
Akihiro Motoki [Tue, 11 May 2021 10:11:45 +0000 (12:11 +0200)] 
capabilities.7: ffix

Signed-off-by: Akihiro Motoki <amotoki@gmail.com>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agottyslot.3: tfix
Akihiro Motoki [Tue, 11 May 2021 10:11:44 +0000 (12:11 +0200)] 
ttyslot.3: tfix

Signed-off-by: Akihiro Motoki <amotoki@gmail.com>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agotgamma.3: tfix
Akihiro Motoki [Tue, 11 May 2021 10:11:43 +0000 (12:11 +0200)] 
tgamma.3: tfix

Signed-off-by: Akihiro Motoki <amotoki@gmail.com>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agogetdents.2: ffix
Michael Kerrisk [Tue, 11 May 2021 05:21:35 +0000 (17:21 +1200)] 
getdents.2: ffix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoreboot.2: Use syscall(SYS_...); for system calls without a wrapper
Alejandro Colomar [Mon, 10 May 2021 17:55:48 +0000 (19:55 +0200)] 
reboot.2: Use syscall(SYS_...); for system calls without a wrapper

Explain also why headers are needed.
And some ffix.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoreadlink.2: ffix
Alejandro Colomar [Mon, 10 May 2021 17:55:47 +0000 (19:55 +0200)] 
readlink.2: ffix

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoreaddir.2: Use syscall(SYS_...); for system calls without a wrapper
Alejandro Colomar [Mon, 10 May 2021 17:55:46 +0000 (19:55 +0200)] 
readdir.2: Use syscall(SYS_...); for system calls without a wrapper

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoquotactl.2: Better detail why <xfs/xqm.h> is included
Alejandro Colomar [Mon, 10 May 2021 17:55:45 +0000 (19:55 +0200)] 
quotactl.2: Better detail why <xfs/xqm.h> is included

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoprocess_madvise.2: Use syscall(SYS_...); for system calls without a wrapper. Fix...
Alejandro Colomar [Mon, 10 May 2021 17:55:44 +0000 (19:55 +0200)] 
process_madvise.2: Use syscall(SYS_...); for system calls without a wrapper. Fix includes too.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agopoll.2: Remove <signal.h>
Alejandro Colomar [Mon, 10 May 2021 17:55:43 +0000 (19:55 +0200)] 
poll.2: Remove <signal.h>

It is only used for providing 'sigset_t'.  We're only documenting
(with some exceptions) the includes needed for constants and the
prototype itself.  And 'sigset_t' is better documented in
system_data_types(7).  Remove that include.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agopivot_root.2: Use syscall(SYS_...); for system calls without a wrapper
Alejandro Colomar [Mon, 10 May 2021 17:55:42 +0000 (19:55 +0200)] 
pivot_root.2: Use syscall(SYS_...); for system calls without a wrapper

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agopipe.2: wfix
Alejandro Colomar [Mon, 10 May 2021 17:55:41 +0000 (19:55 +0200)] 
pipe.2: wfix

For consistency with other pages.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agopidfd_send_signal.2: Use syscall(SYS_...); for system calls without a wrapper. Fix...
Alejandro Colomar [Mon, 10 May 2021 17:55:40 +0000 (19:55 +0200)] 
pidfd_send_signal.2: Use syscall(SYS_...); for system calls without a wrapper. Fix includes too

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agopidfd_open.2: Use syscall(SYS_...); for system calls without a wrapper
Alejandro Colomar [Mon, 10 May 2021 17:55:39 +0000 (19:55 +0200)] 
pidfd_open.2: Use syscall(SYS_...); for system calls without a wrapper

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agopidfd_getfd.2: Use syscall(SYS_...); for system calls without a wrapper
Alejandro Colomar [Mon, 10 May 2021 17:55:38 +0000 (19:55 +0200)] 
pidfd_getfd.2: Use syscall(SYS_...); for system calls without a wrapper

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoperf_event_open.2: Use syscall(SYS_...); for system calls without a wrapper
Alejandro Colomar [Mon, 10 May 2021 17:55:37 +0000 (19:55 +0200)] 
perf_event_open.2: Use syscall(SYS_...); for system calls without a wrapper

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoopenat2.2: Use syscall(SYS_...); for system calls without a wrapper; fix includes too
Alejandro Colomar [Mon, 10 May 2021 17:55:36 +0000 (19:55 +0200)] 
openat2.2: Use syscall(SYS_...); for system calls without a wrapper; fix includes too

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoalloc_hugepages.2, arch_prctl.2, capget.2, clone.2, delete_module.2, exit_group.2...
Alejandro Colomar [Mon, 10 May 2021 17:55:34 +0000 (19:55 +0200)] 
alloc_hugepages.2, arch_prctl.2, capget.2, clone.2, delete_module.2, exit_group.2, get_robust_list.2, getunwind.2, init_module.2: Add note about the use of syscall(2)

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agomq_getsetattr.2: Use syscall(SYS_...); for system calls without a wrapper
Alejandro Colomar [Mon, 10 May 2021 17:55:33 +0000 (19:55 +0200)] 
mq_getsetattr.2: Use syscall(SYS_...); for system calls without a wrapper

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agomodify_ldt.2: Use syscall(SYS_...); for system calls without a wrapper
Alejandro Colomar [Mon, 10 May 2021 17:55:32 +0000 (19:55 +0200)] 
modify_ldt.2: Use syscall(SYS_...); for system calls without a wrapper

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agommap2.2: Use syscall(SYS_...); for system calls without a wrapper
Alejandro Colomar [Mon, 10 May 2021 17:55:31 +0000 (19:55 +0200)] 
mmap2.2: Use syscall(SYS_...); for system calls without a wrapper

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agomknod.2: Remove unused includes
Alejandro Colomar [Mon, 10 May 2021 17:55:30 +0000 (19:55 +0200)] 
mknod.2: Remove unused includes

All of the constants used by mknod() are defined in <sys/stat.h>.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agomincore.2: Remove unused include
Alejandro Colomar [Mon, 10 May 2021 17:55:29 +0000 (19:55 +0200)] 
mincore.2: Remove unused include

AFAICS, there's no use for <unistd.h> here.  The prototype is
declared in <sys/mman.h>, and there are no constants needed.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agomembarrier.2: Use syscall(SYS_...); for system calls without a wrapper
Alejandro Colomar [Mon, 10 May 2021 17:55:28 +0000 (19:55 +0200)] 
membarrier.2: Use syscall(SYS_...); for system calls without a wrapper

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agolookup_dcookie.2: Use syscall(SYS_...); for system calls without a wrapper
Alejandro Colomar [Mon, 10 May 2021 17:55:27 +0000 (19:55 +0200)] 
lookup_dcookie.2: Use syscall(SYS_...); for system calls without a wrapper

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agollseek.2: Use syscall(SYS_...); for system calls without a wrapper
Alejandro Colomar [Mon, 10 May 2021 17:55:26 +0000 (19:55 +0200)] 
llseek.2: Use syscall(SYS_...); for system calls without a wrapper

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agolink.2: ffix
Alejandro Colomar [Mon, 10 May 2021 17:55:25 +0000 (19:55 +0200)] 
link.2: ffix

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agokeyctl.2: Use syscall(SYS_...); for system calls without a glibc wrapper
Alejandro Colomar [Mon, 10 May 2021 17:55:24 +0000 (19:55 +0200)] 
keyctl.2: Use syscall(SYS_...); for system calls without a glibc wrapper

Remove the libkeyutils prototype from the synopsis, which isn't
documented in the rest of the page, and as NOTES says, it's
probably better to use the various library functions.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoscripts/bash_aliases: man_lsfunc(): Extract syscall name from syscall(SYS_...)
Alejandro Colomar [Mon, 10 May 2021 17:55:23 +0000 (19:55 +0200)] 
scripts/bash_aliases: man_lsfunc(): Extract syscall name from syscall(SYS_...)

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agokexec_load.2: Use syscall(SYS_...); for system calls without a wrapper
Alejandro Colomar [Mon, 10 May 2021 17:55:22 +0000 (19:55 +0200)] 
kexec_load.2: Use syscall(SYS_...); for system calls without a wrapper

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agokcmp.2: tfix
Alejandro Colomar [Mon, 10 May 2021 17:55:21 +0000 (19:55 +0200)] 
kcmp.2: tfix

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agokcmp.2: Use syscall(SYS_...); for system calls without a wrapper
Alejandro Colomar [Mon, 10 May 2021 17:55:20 +0000 (19:55 +0200)] 
kcmp.2: Use syscall(SYS_...); for system calls without a wrapper

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoipc.2: Add needed include
Alejandro Colomar [Mon, 10 May 2021 17:55:19 +0000 (19:55 +0200)] 
ipc.2: Add needed include

The constants needed for using this function are defined in
<linux/ipc.h>.  Add the include, even when those constants are not
mentioned in this manual page.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoipc.2: Use syscall(SYS_...); for system calls without a wrapper
Alejandro Colomar [Mon, 10 May 2021 17:55:18 +0000 (19:55 +0200)] 
ipc.2: Use syscall(SYS_...); for system calls without a wrapper

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoioprio_set.2: Use syscall(SYS_...); for system calls without a wrapper
Alejandro Colomar [Mon, 10 May 2021 17:55:17 +0000 (19:55 +0200)] 
ioprio_set.2: Use syscall(SYS_...); for system calls without a wrapper

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoioperm.2: Remove obvious comment
Alejandro Colomar [Mon, 10 May 2021 17:55:16 +0000 (19:55 +0200)] 
ioperm.2: Remove obvious comment

Of course that is for the glibc wrapper.  As all of the other
pages that don't explicitly say otherwise.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoio_getevents.2: Use syscall(SYS_...); for system calls without a wrapper
Alejandro Colomar [Mon, 10 May 2021 17:55:15 +0000 (19:55 +0200)] 
io_getevents.2: Use syscall(SYS_...); for system calls without a wrapper

In this case there's a wrapper provided by libaio,
but this page documents the raw syscall.

Also remove <linux/time.h> from the includes: 'struct timespec'
is already documented in system_data_types(7), where the
information is more up to date.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoio_destroy.2: Use syscall(SYS_...); for system calls without a wrapper
Alejandro Colomar [Mon, 10 May 2021 17:55:14 +0000 (19:55 +0200)] 
io_destroy.2: Use syscall(SYS_...); for system calls without a wrapper

In this case there's a wrapper provided by libaio,
but this page documents the raw syscall.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoioctl_userfaultfd.2: SYNOPSIS: Add <linux/userfaultfd.h>
Alejandro Colomar [Mon, 10 May 2021 17:55:13 +0000 (19:55 +0200)] 
ioctl_userfaultfd.2: SYNOPSIS: Add <linux/userfaultfd.h>

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoioctl_tty.2: Fix includes
Alejandro Colomar [Mon, 10 May 2021 17:55:12 +0000 (19:55 +0200)] 
ioctl_tty.2: Fix includes

<sys/ioctl.h> is needed for the prototype of ioctl().  That header
also provides most of the constants used by the function.  Only a
few of those constants are not provided by that header, and need
<termios.h>; clarify which constants do need that include.

......

$ <man2/ioctl_tty.2 \
  sed -n '/^.SH DESCRIPTION/,/^.SH/p' \
  |grep -e '^\.B' -e TIOCM \
  |sed 's/^\.B[^ ]* //' \
  |awk '{print $1}' \
  |grep '^[[:upper:]]' \
  |grep -v -e '^CAP' -e '^E' -e '^SIG' -e '^O_' -e '^[TR]XD$' -e '^POLL' \
  |sort \
  |uniq \
  |while read f; do \
find /usr/include/ -type f \
|xargs grep -l "define\s$f" \
|grep -q ioctl.*.h \
||echo $f \
|while read ff; do \
echo "============ $ff"; \
find /usr/include/ -type f \
|xargs grep -n "define\s$ff"; \
done; \
  done;
============ CLOCAL
/usr/include/asm-generic/termbits.h:142:#define CLOCAL 0004000
/usr/include/gphoto2/gphoto2-port-portability.h:127:#   define CLOCAL  0x00000800
/usr/include/x86_64-linux-gnu/bits/termios-c_cflag.h:34:#define CLOCAL 0004000
============ TCIFLUSH
/usr/include/asm-generic/termbits.h:191:#define TCIFLUSH 0
/usr/include/x86_64-linux-gnu/bits/termios.h:70:#define TCIFLUSH 0
============ TCIOFF
/usr/include/asm-generic/termbits.h:187:#define TCIOFF 2
/usr/include/x86_64-linux-gnu/bits/termios.h:66:#define TCIOFF 2
============ TCIOFLUSH
/usr/include/asm-generic/termbits.h:193:#define TCIOFLUSH 2
/usr/include/x86_64-linux-gnu/bits/termios.h:72:#define TCIOFLUSH 2
============ TCION
/usr/include/asm-generic/termbits.h:188:#define TCION 3
/usr/include/x86_64-linux-gnu/bits/termios.h:67:#define TCION 3
============ TCOFLUSH
/usr/include/asm-generic/termbits.h:192:#define TCOFLUSH 1
/usr/include/x86_64-linux-gnu/bits/termios.h:71:#define TCOFLUSH 1
============ TCOOFF
/usr/include/asm-generic/termbits.h:185:#define TCOOFF 0
/usr/include/x86_64-linux-gnu/bits/termios.h:64:#define TCOOFF 0
============ TCOON
/usr/include/asm-generic/termbits.h:186:#define TCOON 1
/usr/include/x86_64-linux-gnu/bits/termios.h:65:#define TCOON 1
============ TIOCREMOTE
============ TIOCSTART
============ TIOCSTOP
============ TIOCTTYGSTRUCT
============ TIOCUCNTL

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agogetdents.2: Use syscall(SYS_...); for system calls without a wrapper
Alejandro Colomar [Mon, 10 May 2021 17:55:11 +0000 (19:55 +0200)] 
getdents.2: Use syscall(SYS_...); for system calls without a wrapper

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agofutex.2: Use syscall(SYS_...); for system calls without a wrapper
Alejandro Colomar [Mon, 10 May 2021 17:55:10 +0000 (19:55 +0200)] 
futex.2: Use syscall(SYS_...); for system calls without a wrapper

At the same time, document only headers that are required
for calling the function, or those that are specific to the
function:

<unistd.h> is required for the syscall() prototype.
<sys/syscall.h> is required for the syscall name SYS_xxx.
<linux/futex.h> is specific to this syscall.

However, uint32_t is generic enough that it shouldn't be
documented here.  The system_data_types(7) page already documents
it, and is more precise about it.  The same goes for timespec.

As a general rule a man[23] page should document the header that
includes the prototype, and all of the headers that define macros
that should be used with the call.  However, the information about
types should be restricted to system_data_types(7) (and that page
should probably be improved by adding types), except for types
that are very specific to the call.  Otherwise, we're duplicating
info and it's then harder to maintain, and probably outdated in
the future.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoexecveat.2: Remove unused include
Alejandro Colomar [Mon, 10 May 2021 13:02:10 +0000 (15:02 +0200)] 
execveat.2: Remove unused include

This complements commit e3eba861bd966911b38b7ebc572f0c092ca7bdee.

Since we don't need syscall(2) anymore, we don't need SYS_* definitions.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>