]> git.ipfire.org Git - thirdparty/man-pages.git/log
thirdparty/man-pages.git
5 years agofutex.2: Make the example use C11 atomics rather than GCC builtins
Benjamin Peterson [Wed, 14 Nov 2018 06:53:41 +0000 (22:53 -0800)] 
futex.2: Make the example use C11 atomics rather than GCC builtins

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agogetaddrinfo.3: Fix off-by-one error in example client program
Michael Kerrisk [Sat, 17 Nov 2018 07:11:07 +0000 (08:11 +0100)] 
getaddrinfo.3: Fix off-by-one error in example client program

Reported-by: Eric Sanchis <eric.sanchis@iut-rodez.fr>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agopthread_rwlockattr_setkind_np.3: tfix
Michael Kerrisk [Sat, 17 Nov 2018 06:41:18 +0000 (07:41 +0100)] 
pthread_rwlockattr_setkind_np.3: tfix

Reported-by: G. Branden Robinson <g.branden.robinson@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agopthread_rwlockattr_setkind_np.3: Remove bug notes
Carlos O'Donell [Thu, 15 Nov 2018 15:03:41 +0000 (10:03 -0500)] 
pthread_rwlockattr_setkind_np.3: Remove bug notes

The notes in pthread_rwlockattr_setkind_np.3 imply there is a bug
in glibc's implementation of PTHREAD_RWLOCK_PREFER_WRITER_NP (a
non-portable constant anyway), but this is not true. The
implementation of PTHREAD_RWLOCK_PREFER_WRITER_NP is made almost
impossible by the POSIX standard requirement that reader locks be
allowed to be recursive, and that requirement makes writer
preference deadlock without an impossibly complex requirement that
we track all reader locks. Therefore the only sensible solution
was to add PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP and
disallow recursive reader locks if you want writer preference.

This patch removes the bug description and documents the current
state and recommendations for glibc. I have also updated bug 7057
with this information, answering Steven Munroe's almost 10 year
old question :-) I hope Steven is enjoying his much earned
retirement.

Should we move the glibc discussion to some footnote? Some libc
may be able to implement the requirement to avoid deadlocks in the
future, but I doubt it (fundamental CS stuff).

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agoioctl_userfaultfd.2, madvise.2, memfd_create.2, migrate_pages.2, mmap.2, shmget.2...
Mike Rapoport [Fri, 16 Nov 2018 21:14:56 +0000 (13:14 -0800)] 
ioctl_userfaultfd.2, madvise.2, memfd_create.2, migrate_pages.2, mmap.2, shmget.2, subpage_prot.2, userfaultfd.2, malloc.3, proc.5, sysfs.5, tmpfs.5: Update paths for in-kernel memory management documentation files

Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agocapabilities.7: Update URL for libcap tarballs
Michael Kerrisk [Sat, 17 Nov 2018 06:03:07 +0000 (07:03 +0100)] 
capabilities.7: Update URL for libcap tarballs

The previous location does not seem to be getting updated.
(For example, at the time of this commit, libcap-2.26
had been out for two months, but was not present at
http://www.kernel.org/pub/linux/libs/security/linux-privs.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agoprctl.2: Note libcap(3) APIs for operating on ambient capability set
Michael Kerrisk [Fri, 16 Nov 2018 20:45:10 +0000 (21:45 +0100)] 
prctl.2: Note libcap(3) APIs for operating on ambient capability set

(However, the libcap APIs do not yet seem to have
manual pages...)

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agoprctl.2: Mention libcap APIs for operating on capability bounding set
Michael Kerrisk [Fri, 16 Nov 2018 20:32:45 +0000 (21:32 +0100)] 
prctl.2: Mention libcap APIs for operating on capability bounding set

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agosyscalls.2: Update syscall list for Linux 4.18
Michael Kerrisk [Sun, 11 Nov 2018 07:02:31 +0000 (08:02 +0100)] 
syscalls.2: Update syscall list for Linux 4.18

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agosystem.3: Use '(char *) NULL' rather than '(char *) 0'
Michael Kerrisk [Sat, 10 Nov 2018 06:15:40 +0000 (07:15 +0100)] 
system.3: Use '(char *) NULL' rather than '(char *) 0'

Reported-by: Jonny Grant <jg@jguk.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agoioctl_userfaultfd.2, userfaultfd.2: wfix
Anthony Iliopoulos [Fri, 9 Nov 2018 16:23:59 +0000 (16:23 +0000)] 
ioctl_userfaultfd.2, userfaultfd.2: wfix

Use "UFFDIO_ZEROPAGE" consistently rather than "UFFDIO_ZERO".

Signed-off-by: Anthony Iliopoulos <ailiopoulos@suse.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agosystem.3: ffix
Michael Kerrisk [Fri, 9 Nov 2018 22:17:15 +0000 (23:17 +0100)] 
system.3: ffix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agosystem.3: wfix
Michael Kerrisk [Fri, 9 Nov 2018 22:14:27 +0000 (23:14 +0100)] 
system.3: wfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agouser_namespaces.7: tfix
Jakub Wilk [Fri, 9 Nov 2018 08:25:15 +0000 (09:25 +0100)] 
user_namespaces.7: tfix

Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agopivot_root.2: Minor fixes to Elvira Khabirova's patch
Michael Kerrisk [Fri, 9 Nov 2018 07:54:20 +0000 (08:54 +0100)] 
pivot_root.2: Minor fixes to Elvira Khabirova's patch

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agopivot_root.2: Explain the initramfs case and point to switch_root(8).
Elvira Khabirova [Sun, 30 Sep 2018 15:24:23 +0000 (17:24 +0200)] 
pivot_root.2: Explain the initramfs case and point to switch_root(8).

Based on text from Documentation/filesystems/ramfs-rootfs-initramfs.txt.

Signed-off-by: Elvira Khabirova <lineprinter@altlinux.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agoresolver.3: Add documentation of res_nclose()
Michael Becker [Fri, 9 Nov 2018 07:47:33 +0000 (08:47 +0100)] 
resolver.3: Add documentation of res_nclose()

I found the neccessary information in the glibc sources.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agostrfry.3: Remove incorrect reference to rand(3)
Keith Thompson [Fri, 9 Nov 2018 03:55:55 +0000 (04:55 +0100)] 
strfry.3: Remove incorrect reference to rand(3)

The strfry(3) function does not use rand(). The original version
from 1995 did, but it was changed to use a different PRNG in glibc
commit 4770745624b7f7f25623f1f10d46a4c4d6aec25c, 1996-12-04.

This C program demonstrates the behavior. By not calling srand(),
it gets the same values for successive calls to rand(), but
strfry() returns a different value each time the program is run.
If strfry() called srand(), it would alter the sequence of numbers
return by rand().

int main(void) {
    printf("%d\n", rand());
    char alphabet[] = "abcdefghijklmnopqrstuvwxyz";
    puts(strfry(alphabet));
    printf("%d\n", rand());
}

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agosignal.7: tfix
Michael Kerrisk [Fri, 9 Nov 2018 03:48:59 +0000 (04:48 +0100)] 
signal.7: tfix

Reported-by: Helge Deller <deller@gmx.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agosignal.7: Reorder the architectures in the signal number lists
Michael Kerrisk [Wed, 7 Nov 2018 20:41:34 +0000 (21:41 +0100)] 
signal.7: Reorder the architectures in the signal number lists

x86 and ARM are the most common architectures, but currently
are in the second subfield in the signal number lists.
Instead, swap that info with subfield 1, so the most
common architectures are first in the list.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agosignal.7: Add signal numbers for parisc
Helge Deller [Wed, 7 Nov 2018 06:58:55 +0000 (07:58 +0100)] 
signal.7: Add signal numbers for parisc

This patch adds the signal numbers for parisc to the signal(7) man page.

Those parisc-specific values for the various signals are valid since the
Linux kernel upstream commit ("parisc: Reduce SIGRTMIN from 37 to 32 to
behave like other Linux architectures") during development of kernel 3.18:
http://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1f25df2eff5b25f52c139d3ff31bc883eee9a0ab

Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agosyscalls.2: parisc Linux does not any longer emulate HP-UX
Helge Deller [Tue, 6 Nov 2018 21:27:23 +0000 (22:27 +0100)] 
syscalls.2: parisc Linux does not any longer emulate HP-UX

Initially it was planned that the parisc linux port would natively
support 32-bit HP-UX binaries, but this compatibility was never
reached and finally dropped with Linux kernel 3.14.

With that background, drop parisc from the list of of platforms
which supports it's proprietary operating-system.

Additional notes from mtk:

The most relevant commit from the Linux 3.14 change log was:

[[
commit f5a408d53edef3af07ac7697b8bc54a755628450
Author: Guy Martin <gmsoft@tuxicoman.be>
Date:   Thu Jan 16 17:17:53 2014 +0100

    parisc: Make EWOULDBLOCK be equal to EAGAIN on parisc

    On Linux, only parisc uses a different value for EWOULDBLOCK which
    causes a lot of troubles for applications not checking for both values.
    Since the hpux compat is long dead, make EWOULDBLOCK behave the same as
    all other architectures.
]]

Additional notes from Helge:

The patch above is the initial and most important one with which
we stopped the HP-UX compatibility.

Then, with this commit in kernel 3.18 there is no way back:
"parisc: Reduce SIGRTMIN from 37 to 32 to behave like
other Linux architectures"
commit 1f25df2eff5b25f52c139d3ff31bc883eee9a0ab

And in kernel 4.0 we finally dropped the HP-UX compat layer
from Linux kernel source code with the commit series
"parisc: hpux - Drop support for HP-UX binaries":
commit 04c1614977168fb8f002e2d81f704eeabe0c5ebd

Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agosyscall.2: parisc needs care with syscall parameters
Helge Deller [Tue, 6 Nov 2018 21:39:59 +0000 (22:39 +0100)] 
syscall.2: parisc needs care with syscall parameters

On parisc one needs to take care of the 32-bit calling conventions
with 64-bit syscall parameters on a 32-bit kernel. So on parisc we
suffer from the same issues like ARM, PowerPC and Xtensa.

Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agocgroups.7: Minor fix: bump kernel version to 4.19 in a couple of points
Michael Kerrisk [Wed, 7 Nov 2018 20:14:57 +0000 (21:14 +0100)] 
cgroups.7: Minor fix: bump kernel version to 4.19 in a couple of points

The stated points still hold true as at Linux 4.1.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agoio_submit.2: tfix
Josh Gao [Tue, 6 Nov 2018 22:51:38 +0000 (23:51 +0100)] 
io_submit.2: tfix

Signed-off-by: Josh Gao <jmgao@google.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agoiconv.1: SEE ALSO: add uconv(1)
Marko Myllynen [Mon, 5 Nov 2018 20:15:23 +0000 (22:15 +0200)] 
iconv.1: SEE ALSO: add uconv(1)

Refer to uconv(1) in iconv(1) manual page, it is helpful
transliterating e.g. Cyrillic to Latin:

echo <some-cyrillic-text> | uconv -f UTF-8 -t UTF-8 -x cyrillic-latin

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agoproc.5: ffix: break /proc/[pid]/task text into smaller paragraphs
Michael Kerrisk [Mon, 5 Nov 2018 20:57:20 +0000 (21:57 +0100)] 
proc.5: ffix: break /proc/[pid]/task text into smaller paragraphs

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agoproc.5: srcfix
Michael Kerrisk [Mon, 5 Nov 2018 20:22:19 +0000 (21:22 +0100)] 
proc.5: srcfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agoproc.5: tfix
Michael Kerrisk [Mon, 5 Nov 2018 20:21:50 +0000 (21:21 +0100)] 
proc.5: tfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agoproc.5: Minor reworking of description of /proc/[tid] directories
Michael Kerrisk [Mon, 5 Nov 2018 20:14:25 +0000 (21:14 +0100)] 
proc.5: Minor reworking of description of /proc/[tid] directories

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agoproc.5: wfix
Michael Kerrisk [Mon, 5 Nov 2018 20:02:18 +0000 (21:02 +0100)] 
proc.5: wfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agorename.2: tfix
Michael Kerrisk [Mon, 5 Nov 2018 19:37:20 +0000 (20:37 +0100)] 
rename.2: tfix

Reported-by: G. Branden Robinson <g.branden.robinson@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agorename.2: wfix: s/shmem/tmpfs/ in discussion of RENAME_NOREPLACE
Michael Kerrisk [Mon, 5 Nov 2018 16:37:39 +0000 (17:37 +0100)] 
rename.2: wfix: s/shmem/tmpfs/ in discussion of RENAME_NOREPLACE

Reported-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agorename.2: XFS support for RENAME_NOREPLACE was added in Linux 4.0
Michael Kerrisk [Mon, 5 Nov 2018 16:33:10 +0000 (17:33 +0100)] 
rename.2: XFS support for RENAME_NOREPLACE was added in Linux 4.0

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agorename.2: Rework list of supported filesystems for RENAME_NOREPLACE
Michael Kerrisk [Mon, 5 Nov 2018 16:24:19 +0000 (17:24 +0100)] 
rename.2: Rework list of supported filesystems for RENAME_NOREPLACE

There was probably a little too much detail in
Lukas Werkmeister's patch. Simplify, by removing a few
file systems, and arrange the information as a bulleted
list for easier readability.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agorename.2: Add kernel versions for RENAME_NOREPLACE support
Lucas Werkmeister [Thu, 13 Sep 2018 22:37:59 +0000 (00:37 +0200)] 
rename.2: Add kernel versions for RENAME_NOREPLACE support

The RENAME_NOREPLACE flag was added with the initial release of the
renameat2 syscall in Linux 3.15, but support for most filesystems was
only added in later versions, and some may still not support it.

Signed-off-by: Lucas Werkmeister <mail@lucaswerkmeister.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agovdso.7: tfix
Jakub Wilk [Sat, 22 Sep 2018 10:24:43 +0000 (12:24 +0200)] 
vdso.7: tfix

Escape hyphens; use \(aq for ASCII apostrophes.

Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agogetmntent.3: Clarify that endmntent() should be used rather than fclose()
Elliot Hughes [Wed, 3 Oct 2018 20:00:28 +0000 (13:00 -0700)] 
getmntent.3: Clarify that endmntent() should be used rather than fclose()

This doesn't actually matter on any C library I know of --- they
all just do a NULL check and forward to fclose(3). (The actual
mistake I saw was someone not realizing that they had to call
*anything*.)

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agoferror.3: Warn about closing the result of fileno()
Elliot Hughes [Mon, 1 Oct 2018 17:33:21 +0000 (10:33 -0700)] 
ferror.3: Warn about closing the result of fileno()

Since adding checking to Android's bionic for file descriptor
double-closes, we've found that the most common cause of these
bugs is incorrect use of fileno(3). There appears to be a common
misconception that it transfers ownership of the file descriptor
to the caller.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agogetrlimit.2: Resource limits are process-wide attributes shared by all threads
Michael Kerrisk [Mon, 30 Apr 2018 10:31:41 +0000 (12:31 +0200)] 
getrlimit.2: Resource limits are process-wide attributes shared by all threads

This was already noted in pthreads(7), but bears repeating here.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agoproc.5: Document /proc/PID/status CoreDumping field
Michael Kerrisk [Mon, 5 Nov 2018 11:37:44 +0000 (12:37 +0100)] 
proc.5: Document /proc/PID/status CoreDumping field

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agoproc.5: tfix
Michael Kerrisk [Mon, 5 Nov 2018 11:35:30 +0000 (12:35 +0100)] 
proc.5: tfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agoproc.5: /proc/[pid]/status VmPMD field was removed in Linux 4.15
Michael Kerrisk [Mon, 5 Nov 2018 11:30:25 +0000 (12:30 +0100)] 
proc.5: /proc/[pid]/status VmPMD field was removed in Linux 4.15

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agoproc.5: Document /proc/Meminfo LazyFree field
Michael Kerrisk [Mon, 5 Nov 2018 11:25:57 +0000 (12:25 +0100)] 
proc.5: Document /proc/Meminfo LazyFree field

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agoproc.5: Fix kernel source pathname for soft-dirty documentation
Michael Kerrisk [Mon, 5 Nov 2018 11:21:46 +0000 (12:21 +0100)] 
proc.5: Fix kernel source pathname for soft-dirty documentation

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agoproc.5: Document /proc/meminfo KReclaimable field
Michael Kerrisk [Mon, 5 Nov 2018 11:05:08 +0000 (12:05 +0100)] 
proc.5: Document /proc/meminfo KReclaimable field

Added in Linux 4.20.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agomount.2: Document EROFS for read-only filesystems
Michael Kerrisk [Mon, 5 Nov 2018 09:15:23 +0000 (10:15 +0100)] 
mount.2: Document EROFS for read-only filesystems

See https://bugzilla.kernel.org/show_bug.cgi?id=200649

Reported-by: Harry Mallon <hjmallon@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agomount.2: EACCES: note some reasons why a filesystem may be read-only
Michael Kerrisk [Mon, 5 Nov 2018 09:10:43 +0000 (10:10 +0100)] 
mount.2: EACCES: note some reasons why a filesystem may be read-only

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agoprctl.2: Add some further historical details on PR_SET_MM_EXE_FILE
Michael Kerrisk [Mon, 5 Nov 2018 07:21:54 +0000 (08:21 +0100)] 
prctl.2: Add some further historical details on PR_SET_MM_EXE_FILE

Also some minor tweaks to Benjamin Peterson's patch.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agoprctl.2: PR_SET_MM_EXE_FILE may now be used as many times as desired
Benjamin Peterson [Mon, 5 Nov 2018 02:21:47 +0000 (18:21 -0800)] 
prctl.2: PR_SET_MM_EXE_FILE may now be used as many times as desired

The original implementation of PR_SET_MM_EXE_FILE only allowed it
to be used once in a process's lifetime. This restriction was
lifted in Linux commit 3fb4afd9a504c2386b8435028d43283216bf588e
("prctl: remove one-shot limitation for changing exe link").

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agoprctl.2: wfix: Remove a redundant sentence
Michael Kerrisk [Mon, 5 Nov 2018 07:14:44 +0000 (08:14 +0100)] 
prctl.2: wfix: Remove a redundant sentence

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agoproc.5: Document /proc/[pid]
Michael Kerrisk [Sun, 4 Nov 2018 22:56:10 +0000 (23:56 +0100)] 
proc.5: Document /proc/[pid]

See also https://bugzilla.kernel.org/show_bug.cgi?id=201441

Reported-by: Philip Dumont <phil@solidstatescientific.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agoproc.5: Add an overview section describing the groups of files under /proc
Michael Kerrisk [Sun, 4 Nov 2018 22:04:52 +0000 (23:04 +0100)] 
proc.5: Add an overview section describing the groups of files under /proc

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agolirc.4: Clarify the description LIRC_SET_REC_TIMEOUT
Michael Kerrisk [Sun, 4 Nov 2018 19:23:27 +0000 (20:23 +0100)] 
lirc.4: Clarify the description LIRC_SET_REC_TIMEOUT

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agomsgctl.2, semctl.2, shmctl.2: Some small wording improvements for Davidlohr Bueso...
Michael Kerrisk [Sun, 4 Nov 2018 16:28:24 +0000 (17:28 +0100)] 
msgctl.2, semctl.2, shmctl.2: Some small wording improvements for Davidlohr Bueso's patch

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agomsgctl.2: tfix
Michael Kerrisk [Sun, 4 Nov 2018 16:19:36 +0000 (17:19 +0100)] 
msgctl.2: tfix

Reported-by: Joe Lawrence <joe.lawrence@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agomsgctl.2, semctl.2, shmctl.2: ffix
Michael Kerrisk [Sun, 4 Nov 2018 16:17:07 +0000 (17:17 +0100)] 
msgctl.2, semctl.2, shmctl.2: ffix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agomsgctl.2, semctl.2, shmctl.2: Document STAT_ANY commands
Davidlohr Bueso [Tue, 20 Mar 2018 18:55:03 +0000 (11:55 -0700)] 
msgctl.2, semctl.2, shmctl.2: Document STAT_ANY commands

Reported-by: Joe Lawrence <joe.lawrence@redhat.com>
Signed-off-by: Davidlohr Bueso <dbueso@suse.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agolirc.4: Minor language fix-ups
Michael Kerrisk [Sun, 4 Nov 2018 11:13:32 +0000 (12:13 +0100)] 
lirc.4: Minor language fix-ups

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agolirc.4: Remove crufty text
Michael Kerrisk [Sun, 4 Nov 2018 11:00:30 +0000 (12:00 +0100)] 
lirc.4: Remove crufty text

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agolirc.4: Minor wording and formatting fixes
Michael Kerrisk [Sun, 4 Nov 2018 10:59:58 +0000 (11:59 +0100)] 
lirc.4: Minor wording and formatting fixes

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agolirc.4: tfix
Sean Young [Sat, 3 Nov 2018 11:18:18 +0000 (11:18 +0000)] 
lirc.4: tfix

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agolirc.4: Document remaining ioctl (LIRC_GET_REC_TIMEOUT)
Sean Young [Sat, 3 Nov 2018 11:18:17 +0000 (11:18 +0000)] 
lirc.4: Document remaining ioctl (LIRC_GET_REC_TIMEOUT)

Now all ioctls are documented.

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agocgroups.7: tfix
Michael Kerrisk [Sun, 4 Nov 2018 10:29:06 +0000 (11:29 +0100)] 
cgroups.7: tfix

Reported-by: Alan Jenkins <alan.christopher.jenkins@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agouser_namespaces.7: ffix
Michael Kerrisk [Fri, 2 Nov 2018 12:52:24 +0000 (13:52 +0100)] 
user_namespaces.7: ffix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agolp.4: ffix
Michael Kerrisk [Fri, 2 Nov 2018 12:37:43 +0000 (13:37 +0100)] 
lp.4: ffix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agonamespaces.7: tfix
Michael Kerrisk [Fri, 2 Nov 2018 12:32:25 +0000 (13:32 +0100)] 
namespaces.7: tfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agolirc.4: wfix
Michael Kerrisk [Fri, 2 Nov 2018 12:02:30 +0000 (13:02 +0100)] 
lirc.4: wfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agolirc.4: wfix
Michael Kerrisk [Fri, 2 Nov 2018 11:38:10 +0000 (12:38 +0100)] 
lirc.4: wfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agolirc.4: Document error returns more explicitly
Sean Young [Fri, 2 Nov 2018 11:04:35 +0000 (11:04 +0000)] 
lirc.4: Document error returns more explicitly

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agolirc.4: Minor fix-ups for Sean Young's previous patch
Michael Kerrisk [Fri, 2 Nov 2018 11:36:09 +0000 (12:36 +0100)] 
lirc.4: Minor fix-ups for Sean Young's previous patch

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agolirc.4: Both ioctls are supported if LIRC_CAN_SET_REC_CARRIER_RANGE is set
Sean Young [Fri, 2 Nov 2018 11:04:34 +0000 (11:04 +0000)] 
lirc.4: Both ioctls are supported if LIRC_CAN_SET_REC_CARRIER_RANGE is set

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agolirc.4: LIRC_CAN_SET_REC_DUTY_CYCLE_RANGE was never supported
Sean Young [Fri, 2 Nov 2018 11:04:33 +0000 (11:04 +0000)] 
lirc.4: LIRC_CAN_SET_REC_DUTY_CYCLE_RANGE was never supported

No driver ever supported such a thing.

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agolirc.4: Minor reworking of Sean Young's LIRC_SET_REC_TIMEOUT patch
Michael Kerrisk [Fri, 2 Nov 2018 11:31:44 +0000 (12:31 +0100)] 
lirc.4: Minor reworking of Sean Young's LIRC_SET_REC_TIMEOUT patch

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agolirc.4: Timeout reports are enabled by default
Sean Young [Fri, 2 Nov 2018 11:04:32 +0000 (11:04 +0000)] 
lirc.4: Timeout reports are enabled by default

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agolockf.3: ERRORS: add EINTR
Ian Turner [Thu, 1 Nov 2018 18:44:35 +0000 (14:44 -0400)] 
lockf.3: ERRORS: add EINTR

Ian Turner: The exact return calls are at the discretion of the
underlying VFS, but I'm pretty sure that EINTR is a possibility.
Or, if it's not, then the flock() manpage should be amended
accordingly, since the two share the same underlying
implementation.

mtk: lockf(3) is implemented on top of fcntl() locking, so
EINTR is of course a possibility.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agobpf.2: SEE ALSO: add bpf-helpers(7)
Quentin Monnet [Thu, 1 Nov 2018 20:23:56 +0000 (21:23 +0100)] 
bpf.2: SEE ALSO: add bpf-helpers(7)

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agocapabilities.7: Minor fixes to Marcus Gelderie's patch
Michael Kerrisk [Wed, 31 Oct 2018 20:07:49 +0000 (21:07 +0100)] 
capabilities.7: Minor fixes to Marcus Gelderie's patch

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agocapabilities.7: Mention header for SECBIT constants
Marcus Gelderie [Wed, 31 Oct 2018 09:57:49 +0000 (10:57 +0100)] 
capabilities.7: Mention header for SECBIT constants

Mention that the named constants (SECBIT_KEEP_CAPS and others)
are available only if the linux/securebits.h user-space header
is included.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agommap.2: tfix
Michael Kerrisk [Thu, 1 Nov 2018 17:23:33 +0000 (18:23 +0100)] 
mmap.2: tfix

Reported-by: Thomas Posch <kernel.org@online.posch.name>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agozic.8: Sync from tzdb upstream
Paul Eggert [Wed, 27 Jun 2018 19:52:37 +0000 (12:52 -0700)] 
zic.8: Sync from tzdb upstream

Make zic.8 a copy of the upstream tzdb version, except that
the tzdb version's first line is replaced by man-pages
boilerplate, and omit features introduced after 2017b
(the most recent merge to glibc).

This has the following effect:

Document --version, --help.

Document new -v warnings.

Remove -y.

Document that input should be text files, and similar restrictions
on names.

Document negative DST.

Document what is meant by "white space".

Do some minor reformatting.

Use .B for as-is keywords, like commands.

New section "EXTENDED EXAMPLE".

Omit some changes that were made on the man-pages side, notably by
changing some "timezone"s back to the preferred-upstream "time
zone" when talking about traditional time zones as opposed to
POSIX timezone settings.  Also, fix some formatting glitches.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agozdump.8: Sync from tzdb upstream
Paul Eggert [Wed, 27 Jun 2018 19:52:36 +0000 (12:52 -0700)] 
zdump.8: Sync from tzdb upstream

Make zdump.8 a copy of the upstream tzdb version, except that
the tzdb version's first line is replaced by man-pages
boilerplate.

This has the following effect:

Document new options -i, -t, -V.

New section LIMITATIONS.

Do some minor reformatting.

Omit some changes that were made on the man-pages side, notably by
changing some "timezone"s back to the preferred-upstream "time
zone" when talking about traditional time zones as opposed to
POSIX timezone settings.  Also, fix some formatting glitches.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agotzfile.5: Sync from tzdb upstream
Paul Eggert [Wed, 27 Jun 2018 19:52:35 +0000 (12:52 -0700)] 
tzfile.5: Sync from tzdb upstream

Make tzfile.5 a copy of the upstream tzdb version, except that
the tzdb version's first line is replaced by man-pages
boilerplate.

This has the following effect:

Do some minor spec fixes, notably about time type 0
and empty TZ strings.  Omit some changes that were made on the
man-pages side, notably by changing some "timezone"s back to the
preferred-upstream "time zone" when talking about traditional
time zones as opposed to POSIX timezone settings.
Also, fix some formatting glitches.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agobpf-helpers.7: Add new man page for eBPF helper functions
Michael Kerrisk [Thu, 1 Nov 2018 13:56:24 +0000 (14:56 +0100)] 
bpf-helpers.7: Add new man page for eBPF helper functions

eBPF sub-system on Linux can use "helper functions", functions
implemented in the kernel that can be called from within a eBPF program
injected by a user on Linux. The kernel already supports a long list of
such helpers (sixty-seven at this time, new ones are under review).
Therefore, it is proposed to create a new manual page, separate from
bpf(2), to document those helpers for people willing to develop new eBPF
programs.

Additionally, in an effort to keep this documentation in synchronisation
with what is implemented in the kernel, it is further proposed to keep
the documentation itself in the kernel sources, as comments in file
"include/uapi/linux/bpf.h", and to generate the man page from there.

This patch adds the new man page, generated from kernel sources, to the
man-pages repository. For each eBPF helper function, a description of
the helper, of its arguments and of the return value is provided. The
idea is that all future changes for this page should be redirected to
the kernel file "include/uapi/linux/bpf.h", and the modified page
generated from there.

Generating the page itself is a two-step process. First, the
documentation is extracted from include/uapi/linux/bpf.h, and converted
to a RST (reStructuredText-formatted) page, with the relevant script
from Linux sources:

      $ ./scripts/bpf_helpers_doc.py > /tmp/bpf-helpers.rst

The second step consists in turning the RST document into the final man
page, with rst2man:

      $ rst2man /tmp/bpf-helpers.rst > bpf-helpers.7

The bpf.h file was taken as at kernel 4.19

Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Quentin Monnet <quentin.monnet@netronome.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agocapabilities.7: Correct the description of SECBIT_KEEP_CAPS
Michael Kerrisk [Thu, 1 Nov 2018 13:32:55 +0000 (14:32 +0100)] 
capabilities.7: Correct the description of SECBIT_KEEP_CAPS

This just adds to the point made by Marcus Gelderie's patch.  Note
also that SECBIT_KEEP_CAPS provides the same functionality as the
prctl() PR_SET_KEEPCAPS flag, and the prctl(2) manual page has the
correct description of the semantics (i.e., that the flag affects
the treatment of onlt the permitted capability set).

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agocapabilities.7: Minor tweaks to the text added by Marcus Gelderie's patch
Michael Kerrisk [Thu, 1 Nov 2018 13:38:06 +0000 (14:38 +0100)] 
capabilities.7: Minor tweaks to the text added by Marcus Gelderie's patch

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agocapabilities.7: Add details about SECBIT_KEEP_CAPS
Marcus Gelderie [Wed, 31 Oct 2018 09:35:47 +0000 (10:35 +0100)] 
capabilities.7: Add details about SECBIT_KEEP_CAPS

The description of SECBIT_KEEP_CAPS is misleading about the
effects on the effective capabilities of a process during a
switch to nonzero UIDs.  The effective set is cleared based on
the effective UID switching to a nonzero value, even if
SECBIT_KEEP_CAPS is set. However, with this bit set, the
effective and permitted sets are not cleared if the real and
saved set-user-ID are set to nonzero values.

This was tested using the following C code and reading the kernel
source at security/commoncap.c: cap_emulate_setxuid.

void print_caps(void) {
    cap_t current = cap_get_proc();
    if (!current) {
        perror("Current caps");
        return;
    }
    char *text = cap_to_text(current, NULL);
    if (!text) {
        perror("Converting caps to text");
        goto free_caps;
    }
    printf("Capabilities: %s\n", text);
    cap_free(text);
free_caps:
    cap_free(current);
}

void print_creds(void) {
    uid_t ruid, suid, euid;
    if (getresuid(&ruid, &euid, &suid)) {
        perror("Error getting UIDs");
        return;
    }
    printf("real = %d, effective = %d, saved set-user-ID = %d\n", ruid, euid, suid);
}

void set_caps(int size, const cap_value_t *caps) {
    cap_t current = cap_init();
    if (!current) {
        perror("Error getting current caps");
        return;
    }
    if (cap_clear(current)) {
        perror("Error clearing caps");
    }
    if (cap_set_flag(current, CAP_INHERITABLE, size, caps, CAP_SET)) {
        perror("setting caps");
        goto free_caps;
    }
    if (cap_set_flag(current, CAP_EFFECTIVE, size, caps, CAP_SET)) {
        perror("setting caps");
        goto free_caps;
    }
    if (cap_set_flag(current, CAP_PERMITTED, size, caps, CAP_SET)) {
        perror("setting caps");
        goto free_caps;
    }
    if (cap_set_proc(current)) {
        perror("Comitting caps");
        goto free_caps;
    }
free_caps:
    cap_free(current);
}

const cap_value_t caps[] = {CAP_SETUID, CAP_SETPCAP};
const size_t num_caps = sizeof(caps) / sizeof(cap_value_t);

int main(int argc, char **argv) {
    puts("[+] Dropping most capabilities to reduce amount of console output...");
    set_caps(num_caps, caps);
    puts("[+] Dropped capabilities. Starting with these credentials and capabilities:");

    print_caps();
    print_creds();

    if (argc >= 2 && 0 == strncmp(argv[1], "keep", 4)) {
        puts("[+] Setting SECBIT_KEEP_CAPS bit");
        if (prctl(PR_SET_SECUREBITS, SECBIT_KEEP_CAPS, 0, 0, 0)) {
            perror("Setting secure bits");
            return 1;
        }
    }

    puts("[+] Setting effective UID to 1000");
    if (seteuid(1000)) {
        perror("Error setting effective UID");
        return 2;
    }
    print_caps();
    print_creds();

    puts("[+] Raising caps again");
    set_caps(num_caps, caps);
    print_caps();
    print_creds();

    puts("[+] Setting all remaining UIDs to nonzero values");
    if (setreuid(1000, 1000)) {
        perror("Error setting all UIDs to 1000");
        return 3;
    }
    print_caps();
    print_creds();

    return 0;
}

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agolirc.4: Minor fixes after Sean Young's patches
Michael Kerrisk [Thu, 1 Nov 2018 11:57:11 +0000 (12:57 +0100)] 
lirc.4: Minor fixes after Sean Young's patches

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agolirc.4: Update SEE ALSO
Sean Young [Wed, 31 Oct 2018 23:18:06 +0000 (23:18 +0000)] 
lirc.4: Update SEE ALSO

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agolirc.4: lirc.h include file is in /usr/include/linux/lirc.h
Sean Young [Wed, 31 Oct 2018 23:18:04 +0000 (23:18 +0000)] 
lirc.4: lirc.h include file is in /usr/include/linux/lirc.h

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agolirc.4: Some devices are send only
Sean Young [Wed, 31 Oct 2018 23:18:03 +0000 (23:18 +0000)] 
lirc.4: Some devices are send only

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agolirc.4: Unsupported ioctl() operationsalways return ENOTTY
Sean Young [Wed, 31 Oct 2018 23:18:01 +0000 (23:18 +0000)] 
lirc.4: Unsupported ioctl() operationsalways return ENOTTY

Note that LIRC_GET_FEATURES is the only ioctl() which is always
supported now that there are send-only devices.

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agolirc.4: LIRC_MODE_LIRCCODE has been replaced by LIRC_MODE_SCANCODE
Sean Young [Wed, 31 Oct 2018 23:18:00 +0000 (23:18 +0000)] 
lirc.4: LIRC_MODE_LIRCCODE has been replaced by LIRC_MODE_SCANCODE

There are no drivers that support LIRC_MODE_LIRCCODE any more;
those drivers were in the kernel staging area, so they were
never part of the mainline kernel.

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agofull.4: wfix
Michael Kerrisk [Thu, 1 Nov 2018 11:55:05 +0000 (12:55 +0100)] 
full.4: wfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agouser_namespaces.7: wfix
Michael Kerrisk [Wed, 31 Oct 2018 07:47:02 +0000 (08:47 +0100)] 
user_namespaces.7: wfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agonamespaces.7: f
Michael Kerrisk [Wed, 31 Oct 2018 07:40:21 +0000 (08:40 +0100)] 
namespaces.7: f

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agonamespaces.7: Briefly explain why CAP_SYS_ADMIN is needed to create nonuser namespaces
Michael Kerrisk [Wed, 31 Oct 2018 07:39:02 +0000 (08:39 +0100)] 
namespaces.7: Briefly explain why CAP_SYS_ADMIN is needed to create nonuser namespaces

Reported-by: Tycho Kirchner <tychokirchner@mail.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agouser_namespaces.7: Rework terminology describing ownership of nonuser namespaces
Michael Kerrisk [Wed, 31 Oct 2018 07:27:56 +0000 (08:27 +0100)] 
user_namespaces.7: Rework terminology describing ownership of nonuser namespaces

Prefer the word "owns" rather than "associated with" when
describing the relationship between user namespaces and non-user
namespaces. The existing text used a mix of the two terms, with
"associated with" being predominant, but to my ear, describing the
relationship as "ownership" is more comprehensible.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agomemfd_create.2: Update hugetlb file-sealing support
Marc-André Lureau [Thu, 30 Aug 2018 10:54:52 +0000 (12:54 +0200)] 
memfd_create.2: Update hugetlb file-sealing support

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agovcs.4: Broken example code
Mattias Engdegård [Tue, 30 Oct 2018 15:12:48 +0000 (16:12 +0100)] 
vcs.4: Broken example code

Fix broken example code in the vcs.4 man page
- use of wrong variable (attrib, which is uninitialised, instead of s)
- variable ch too narrow
- printing a font char index with %c, as if it were ASCII (it's not)
- removing the high font bit while changing the background colour
- unwarranted assumption of little-endian byte order

Also be friendly and use SEEK_* instead of numbers.

Reported-by: Michael Witten <mfwitten@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>