==================== Changes in man-pages-4.09 ==================== Released: ????-??-??, Munich Contributors ------------ The following people contributed patches/fixes or (noted in brackets in the changelog below) reports, notes, and ideas that have been incorporated in changes in this release: Afzal Mohammed Andrew Clayton Carlos O'Donell Christoph Lameter Daniel Baluta Daniel Berrange Daniel Wagner Darrick J. Wong Dave Hansen Dmitry V. Levin Dr. Tobias Quathamer Elliott Hughes Eric W. Biederman Eugene Syromyatnikov Florian Weimer Heinrich Schuchardt Igor Liferenko Jakub Wilk Jann Horn Jeremy Harris Kees Cook Keno Fischer Laurent Georget Laurent Georget Marcos Mello Michael Hausenblas Michael Kerrisk Mike Frysinger Mike Galbraith Miroslav Koskar Nikos Mavrogiannopoulos Omar Sandoval Pavel Emelyanov Piotr Kwapulinski Siddhesh Poyarekar Theodore Ts'o Vegard Nossum Vincent Lefevre Vince Weaver Wainer dos Santos Moschetta Wang Long Willy Tarreau Zack Weinberg Apologies if I missed anyone! New and rewritten pages ----------------------- pkey_alloc.2 Dave Hansen [Michael Kerrisk] New page documenting pkey_alloc(2) and pkey_free(2) pthread_getattr_default_np.3 Michael Kerrisk New page documenting pthread_getattr_default_np(3) and pthread_setattr_default_np(3) strfromd.3 Wainer dos Santos Moschetta New page documenting strfromd(3), strfromf(3), and strfroml(3) The ISO/IEC TS 18661-1 specifies the strfrom() class of functions that convert a float-point value to string. fuse.4 Keno Fischer [Michael Kerrisk] New page describing /dev/fuse This is my writeup of a basic description of /dev/fuse after playing with it for a few hours today. It is of course woefully incomplete, and since I neither have a use case nor am working on this code, I will not be in a position to expand it in the near future. However, I'm hoping this could still serve as a handy reference for others looking at this interface. [mtk: Notwithstanding the incompleteness of this page, it's a good base for future extension.] tmpfs.5 Michael Kerrisk New page documenting the tmpfs filesystem pkeys.7 Dave Hansen [Michael Kerrisk] New page with overview of Memory Protection Keys random.7 Michael Kerrisk [Theodore Ts'o, Nikos Mavrogiannopoulos, Laurent Georget] New page providing an overview of interfaces for obtaining randomness Contains material extracted from getrandom(2) and random(4), as well as new material. sock_diag.7 Pavel Emelyanov, Dmitry V. Levin New page documenting NETLINK_SOCK_DIAG interface close.2 getpriority.2 nice.2 timer_create.2 timerfd_create.2 random.4 elf.5 proc.5 sched.7 Various authors These pages also saw substantial updates, as described under "Changes to individual pages". Newly documented interfaces in existing pages --------------------------------------------- mmap.2 Michael Kerrisk Add (much) more detail on MAP_GROWSDOWN mprotect.2 Dave Hansen Document the new pkey_mprotect() system call Eugene Syromyatnikov Document PROT_SEM, PROT_SAO, PROT_GROWSUP, and PROT_GROWSDOWN prctl.2 Eugene Syromyatnikov Document PR_SET_FP_MODE and PR_GET_FP_MODE perf_event_open.2 Vince Weaver PERF_RECORD_SWITCH support Linux 4.3 introduced two new record types for recording context switches: PERF_RECORD_SWITCH and PERF_RECORD_SWITCH_CPU_WIDE. Vince Weaver Add PERF_SAMPLE_BRANCH_CALL branch sample type Vince Weaver PERF_SAMPLE_BRANCH_IND_JUMP branch_sample_type Linux 4.2 added a new branch_sample_type: PERF_SAMPLE_BRANCH_IND_JUMP Vince Weaver Document PERF_RECORD_MISC_PROC_MAP_PARSE_TIMEOUT Vince Weaver Document sample_max_stack and /proc/sys/kernel/perf_event_max_stack Linux 4.8 added a new sample_max_stack parameter, as well as /proc/sys/kernel/perf_event_max_stack which limits it and a new EOVERFLOW error return. Dave Hansen PERF_RECORD_LOST_SAMPLES record type Linux 4.2 added a new record type: PERF_RECORD_LOST_SAMPLES It is generated when hardware samples (currently only Intel PEBS) are lost. ptrace.2 Michael Kerrisk Document PTRACE_SECCOMP_GET_FILTER Michael Kerrisk Document PTRACE_GET_THREAD_AREA and PTRACE_SET_THREAD_AREA namespaces.7 Michael Kerrisk [Eric W. Biederman] Document the NS_GET_USERNS and NS_GET_PARENT ioctl() operations sched.7 Michael Kerrisk [Mike Galbraith] Document the autogroup feature Includes documenting autogroup nice value Michael Kerrisk Autogrouping breaks traditional semantics of nice in many cases When autogrouping is enabled (the default in many distros) there are many traditional use cases where the nice value ceases to have any effect. Michael Kerrisk Add a subsection on nice value and group scheduling New and changed links --------------------- killpg.2 Michael Kerrisk New link to relocated killpg(3) page pkey_free.2 Michael Kerrisk New link to new pkey_alloc(2) page pkey_mprotect.2 Michael Kerrisk New link to mprotect(2) pthread_setattr_default_np.3 Michael Kerrisk New link to new pthread_getattr_default_np.3 strfromf.3 Wainer dos Santos Moschetta New link to strfromd(3) strfroml.3 Wainer dos Santos Moschetta New link to strfromd(3) Global changes -------------- Various pages Michael kerrisk Remove ancient libc4 and libc5 details It's nearly 20 years now since Linux libc went away. Remove some ancient details from the pages. Various pages Michael Kerrisk Add cross references to new tmpfs(5) page Various pages Michael Kerrisk Change section number from 2 to 3 in killpg() references Changes to individual pages --------------------------- accept.2 Michael Kerrisk Remove editorializing comments about 'socklen_t' Michael Kerrisk Simplify the discussion of 'socklen_t' We don't really need to list the old OSes in this discussion. adjtimex.2 clock_getres.2 gettimeofday.2 Michael Kerrisk SEE ALSO: add hwclock(8) bind.2 connect.2 getpeername.2 getsockname.2 getsockopt.2 Michael Kerrisk Replace discussion of 'socklen_t' with reference to accept(2) The discussion of 'socklen_t' editorializes and is repeated across several pages. Replace it with a reference to accept(2), where some details about this type are provided. chmod.2 Michael Kerrisk SEE ALSO: add chmod(1) chown.2 Michael Kerrisk SEE ALSO: add chgrp(1) and chown(1) chroot.2 Michael Kerrisk SEE ALSO: add chroot(1) clone.2 Michael Kerrisk The CLONE_*_SETTID operations store TID before return to user space CLONE_PARENT_SETTID and CLONE_CHILD_SETTID store the new TID before clone() returns to user space close.2 Michael Kerrisk [Daniel Wagner] Rework and greatly extend discussion of error handling Further clarify that an error return should be used only for diagnostic or remedial purposes. Michael Kerrisk Other UNIX implementations also close the FD, even if reporting an error Looking at some historical source code suggests that the "close() always closes regardless of error return" behavior has a long history, predating even POSIX.1-1990. Michael Kerrisk Note that future POSIX plans to require that the FD is closed on error See http://austingroupbugs.net/view.php?id=529#c1200. Michael Kerrisk Clarify the variation in EINTR behavior per POSIX and other systems fallocate.2 Darrick J. Wong Document behavior with shared blocks Note that FALLOC_FL_UNSHARE may use CoW to unshare blocks to guarantee that a disk write won't fail with ENOSPC. fanotify_mark.2 Heinrich Schuchardt Mention FAN_Q_OVERFLOW To receive overflow events it is necessary to set this bit in fanotify_mark(). fcntl.2 Michael Kerrisk F_GETPIPE_SZ allocates next power-of-2 multiple of requested size Add some detail about current implementation, since this helps the user understand the effect of the user pipe limits added in Linux 4.5 (described in pipe(7)). Michael Kerrisk Add EPERM that occurs for F_SETPIPE_SZ when user pipe limit is reached fideduperange.2 Darrick J. Wong [Omar Sandoval] Fix the discussion of maximum sizes Fix the discussion of the limitations on the dest_count and src_length parameters to the fideduperange ioctl() to reflect what's actually in the kernel. fsync.2 Michael Kerrisk SEE ALSO: add fileno(3) fileno(3) is useful if one is combining fflush(3)/fclose(3) and fsync(2). Michael Kerrisk SEE ALSO: add fflush(3) getgroups.2 Andrew Clayton FTM requirements fix for setgroups(2) gethostname.2 Michael Kerrisk SEE ALSO: add hostname(1) get_mempolicy.2 Michael Kerrisk Note that 'addr' must be NULL when 'flags' is 0 getpriority.2 Michael Kerrisk Warn that autogrouping voids the effect of 'nice' in many cases Refer the reader to sched(7) for the details. Michael Kerrisk Expand discussion of getpriority() return value Michael Kerrisk The nice value supplied to setpriority() is clamped Note that the nice value supplied to setpriority() is clamped to the permitted range. Michael Kerrisk Improve description of setpriority() return value getpriority.2 sched.7 Michael Kerrisk Move nice value details from getpriority(2) to sched(7) Centralizing these details in sched(7) is more logical. getrandom.2 random.4 Michael Kerrisk Consolidate and improve discussion on usage of randomness Currently, recommendations on how to consume randomness are spread across both getrandom(2) and random(4) and the general opinion seems to be that the text in getrandom(2) does a somewhat better job. Consolidate the discussion to a single page (getrandom(2)) and address some of the concerns expressed about the existing text in random(4). [Some of this text ultimately made its way into the new random(7) page.] getrandom.2 Michael Kerrisk Remove material incorporated into random(7) Michael Kerrisk Note advantages of fact that getrandom() doesn't use file descriptors Michael Kerrisk Clarify that getrandom() is not "reading" from /dev/{random,urandom} getrlimit.2 Michael Kerrisk Refer to sched(7) in discussion of RLIMIT_RTPRIO and RLIMIT_RTTIME Michael Kerrisk Describe the range of the RLIMIT_NICE limit Michael Kerrisk Refer to sched(7) in the discussion of RLIMIT_NICE Michael Kerrisk SEE ALSO: add credentials(7) ioctl_ficlonerange.2 ioctl_fideduperange.2 Darrick J. Wong Clarify the behavior of the FIDEDUPERANGE ioctl kill.2 Michael Kerrisk SEE ALSO: add kill(1) mbind.2 Michael Kerrisk [Christoph Lameter] Memory policy is a per-thread attribute, not a per-process attribute mbind.2 set_mempolicy.2 Piotr Kwapulinski [Christoph Lameter, Michael Kerrisk] Add MPOL_LOCAL NUMA memory policy documentation mount.2 Michael Kerrisk SEE ALSO: add mountpoint(1) mprotect.2 Michael Kerrisk CONFORMING TO: note that pkey_mprotect() is Linux-specific nice.2 Michael Kerrisk Warn that autogrouping voids the effect of 'nice' in many cases Michael Kerrisk CONFORMING TO: Remove an ancient SVr4 detail on errno values Michael Kerrisk Rework discussion of nice() return value and standards conformance Make the text a little clearer. In particular, clarify that the raw system call (still) returns 0 on success. Michael Kerrisk Clarify the range of the nice value, and note that it is clamped Michael Kerrisk Add mention of RLIMIT_NICE Michael Kerrisk Move discussion of handling the -1 success return to RETURN VALUE This detail was rather hidden in NOTES. Also, rework the text a little. Michael Kerrisk Clarify that nice() changes the nice value of the calling *thread* Michael Kerrisk Add "C library/kernel differences" subsection heading Michael Kerrisk Add reference to sched(7) for further details on the nice value open.2 Michael Kerrisk ubifs supports O_TMPFILE starting with Linux 4.9 Michael Kerrisk Document ENOMEM that occurs when opening FIFO because of pipe hard limit perf_event_open.2 Vince Weaver Add cycles field in LBR records Linux 4.3 added a cycles field to the PERF_SAMPLE_BRANCH_STACK last branch records. Vince Weaver Update time_shift sample code Linux 4.3 improved the accuracy of the clock/ns conversion routines. Michael Kerrisk Clarify the use of signals for capturing overflow events pipe.2 Michael Kerrisk Add ENFILE error for user pipe hard limit reached prctl.2 Eugene Syromyatnikov Some additional details regarding the PR_GET_UNALIGNED operation Eugene Syromyatnikov Note the output buffer size for PR_GET_TID_ADDRESS operation on x32/n32 Michael Kerrisk Remove numeric definitions of PR_FP_MODE_FR and PR_FP_MODE_FRE bits ptrace.2 Keno Fischer Document the behavior of PTRACE_SYSEMU stops Keno Fischer Expand documentation PTRACE_EVENT_SECCOMP traps In Linux 4.8, the order of PTRACE_EVENT_SECCOMP and syscall-entry-stops was reversed. Document both behaviors and their interaction with the various forms of restart. quotactl.2 Eugene Syromyatnikov Describe Q_XQUOTASYNC, which is present but no-op in recent kernels reboot.2 Wang Long Note errors for invalid commands inside a PID namespace sched_setattr.2 Michael Kerrisk Fix cross reference for further info on the nice value The information moved from getpriority(2) to sched(7). sched_setscheduler.2 Michael Kerrisk [Daniel Berrange] Mention SCHED_DEADLINE Give the reader a clue that there is another policy available that can't be set via sched_setscheduler(2). seccomp.2 Jann Horn Document changed interaction with ptrace Before kernel 4.8, the seccomp check will not be run again after the tracer is notified. Fixed in kernel 4.9. Michael Kerrisk NOTES: mention ptrace(PTRACE_SECCOMP_GET_FILTER) to dump seccomp filters set_mempolicy.2 Michael Kerrisk Reformat list of modes setsid.2 Michael Kerrisk Improve wording of text on calling setsid() after fork()+_exit() Michael Kerrisk SEE ALSO: add sched(7) List sched(7), because setsid(2) is part of the machinery of autogrouping. sigaction.2 Dave Hansen Further documentation of SEGV_PKUERR signalfd.2 Michael Kerrisk Document ssi_addr_lsb field of signalfd_siginfo symlink.2 Michael Kerrisk SEE ALSO: add namei(1) sync_file_range.2 Michael Kerrisk Fix description for ESPIPE error A file descriptor can't refer to a symbolic link. syscalls.2 Michael Kerrisk Add pkey_alloc(), pkey_free(), and pkey_mprotect() New system calls in Linux 4.9. Michael Kerrisk Add ppc_swapcontext(2) timer_create.2 Michael Kerrisk Document CLOCK_BOOTTIME Michael Kerrisk Document CLOCK_REALTIME_ALARM and CLOCK_BOOTTIME_ALARM timerfd_create.2 Michael Kerrisk Document CLOCK_BOOTTIME, CLOCK_REALTIME_ALARM, and CLOCK_BOOTTIME_ALARM Michael Kerrisk Document TFD_TIMER_CANCEL_ON_SET Michael Kerrisk Rework discussion on relative and absolute timers unlink.2 Michael Kerrisk SEE ALSO: add unlink(2) utime.2 utimensat.2 Michael Kerrisk SEE ALSO: add touch(1) wait.2 Michael Kerrisk On some architectures, waitpid() is a wrapper that calls wait4(). atof.3 Wainer dos Santos Moschetta SEE ALSO: add strfromd(3) ctime.3 Michael Kerrisk Add ERRORS section Michael Kerrisk RETURN VALUE: describe return values more explicitly errno.3 Michael Kerrisk [Igor Liferenko] Add glibc error text for EILSEQ fclose.3 fflush.3 Michael Kerrisk SEE ALSO: add fileno(2) getlogin.3 Michael Kerrisk Remove deprecated _REENTRANT from FTM requirements for getlogin_r() Michael Kerrisk SEE ALSO: add logname(1) isalpha.3 Michael Kerrisk Note circumstances where 'c' must be cast to 'unsigned char' killpg.3 Michael Kerrisk Move killpg.2 from section to to section 3 mallopt.3 Michael Kerrisk [Siddhesh Poyarekar] Document 0 as default value of M_ARENA_MAX and explain its meaning Michael Kerrisk Improve description of M_ARENA_TEST Michael Kerrisk Document default value for M_ARENA_TEST Michael Kerrisk Note default value of M_PERTURB mbsnrtowcs.3 Michael Kerrisk [Igor Liferenko] Note behavior of mbsnrtowcs() for an incomplete character Note the behavior of mbsnrtowcs() when an incomplete character is found at end of the input buffer. mbstowcs.3 wcstombs.3 Michael Kerrisk [Igor Liferenko] Improve language relating to "initial state" See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=839705 mbstowcs.3 Michael Kerrisk [Igor Liferenko] Add missing include to example program See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=845172 mq_close.3 Michael Kerrisk DESCRIPTION: add reference to mq_notify(3) mq_open.3 Eugene Syromyatnikov Clarification regarding usage of mq_flags attribute in mq_open() mq_receive.3 mq_send.3 Eugene Syromyatnikov Clarification regarding reasons behind EBADF printf.3 Wainer dos Santos Moschetta SEE ALSO: add strfromd(3) pthread_attr_init.3 Michael Kerrisk SEE ALSO: add pthread_setattr_default_np(3) pthread_create.3 Michael Kerrisk SEE ALSO: add pthread_setattr_default_np(3) ptsname.3 Michael Kerrisk Note that ptsname_r() is proposed for future inclusion in POSIX.1 Michael Kerrisk CONFORMING TO:: clarify that only ptsname() is standardized (so far) remainder.3 Michael Kerrisk Note fix to remainder(nan(""), 0) handling The bug https://www.sourceware.org/bugzilla/show_bug.cgi?id=6779 has been fixed in glibc 2.15. Michael Kerrisk Document fixes for EDOM handling for range errors The bug http://sources.redhat.com/bugzilla/show_bug.cgi?id=6783 was fixed in glibc 2.15. setjmp.3 Michael Kerrisk _BSD_SOURCE must be *explicitly* defined to get BSD setjmp() semantics strtod.3 Wainer dos Santos Moschetta SEE ALSO: add strfromd(3) tgamma.3 Michael Kerrisk Document fixes to give ERANGE for underflow range error The bug https://www.sourceware.org/bugzilla/show_bug.cgi?id=6810 was fixed in glibc 2.19. timegm.3 Michael Kerrisk Add ERRORS section Michael Kerrisk [Vincent Lefevre] Add RETURN VALUE section tmpnam.3 Michael Kerrisk Properly document tmpnam_r(3) toupper.3 Michael Kerrisk Note circumstances where 'c' must be cast to 'unsigned char' ttyname.3 Michael Kerrisk SEE ALSO: add tty(1) console_ioctl.4 Michael Kerrisk Add brief descriptive text for KDGKBMODE modes Miroslav Koskar Add K_OFF keyboard mode random.4 Michael Kerrisk Add reference to new random(7) page Michael Kerrisk Rework formatting of /proc interfaces Make the information easier to parse by formatting the file descriptions as hanging lists. No significant content changes. Nikos Mavrogiannopoulos [Laurent Georget] Provide a more accurate description of /dev/urandom This documents the "property" of /dev/urandom of being able to serve numbers prior to pool being initialized, and removes any suggested usages of /dev/random which are disputable (i.e., one-time pad). Document the fact /dev/random is only suitable for applications which can afford indeterminate delays since very few applications can do so. Smooth the alarming language about a theoretical attack, and mention that its security depends on the cryptographic primitives used by the kernel, as well as the total entropy gathered. Michael Kerrisk [Laurent Georget, Theodore Ts'o] Improve discussion of /dev/urandom, blocking reads, and signals The text currently states that O_NONBLOCK has no effect for /dev/urandom, which is true. It also says that reads from /dev/urandom are nonblocking. This is at the least confusing. If one attempts large reads (say 10MB) from /dev/urandom there is an appreciable delay, and interruption by a signal handler will result in a short read. Amend the text to reflect this. elf.5 Mike Frysinger Add subsection headers at major points The current pages dumps all the content into one big DESCRIPTION with no real visual break up between logically independent sections. Add some subsection headers to make it easier to read and scan. Mike Frysinger Document notes Document the Elf{32,64}_Nhdr structure, the sections/segments that contain notes, and how to interpret them. I've been lazy and only included the GNU extensions here, especially as others are not defined in the elf.h header file as shipped by glibc. filesystems.5 Michael Kerrisk SEE ALSO: add fuse(4) proc.5 Dave Hansen Describe new ProtectionKey 'smaps' field Michael Kerrisk Add example ProtectionKey output for 'smaps' file Michael Kerrisk Add pointers to sched(7) for autogroup files sched(7) describes /proc/sys/kernel/sched_autogroup_enabled and /proc/PID/autogroup. Michael Kerrisk Add /proc/sys/fs/pipe-user-pages-{hard,soft} entries Michael Kerrisk Improve description of the KernelPageSize and MMUPageSize 'smaps' fields Michael Kerrisk Rework 'smaps' ProtectionKey text and add some details Michael Kerrisk Mention lslocks(8) in discussion of /proc/locks Michael Kerrisk Describe Shmem field of /proc/meinfo Michael Kerrisk Rework 'smaps' VmFlags text, and add kernel version and example output proc.5 pipe.7 Michael Kerrisk Move /proc/sys/fs/pipe-max-size content from proc(5) to pipe(7) resolv.conf.5 Carlos O'Donell [Florian Weimer] Timeout does not map to resolver API calls utmp.5 Michael Kerrisk SEE ALSO: add users(1) capabilities.7 Michael Kerrisk CAP_SYS_ADMIN governs ptrace(2) PTRACE_SECCOMP_GET_FILTER Michael Kerrisk CAP_SYS_ADMIN allows privileged ioctl() operations on /dev/random cgroups.7 Michael Kerrisk Add details on 'cpu' CFS bandwidth control credentials.7 Michael Kerrisk SEE ALSO: add setpriv(1) Michael Kerrisk SEE ALSO: add shadow(5) feature_test_macros.7 Michael Kerrisk [Zack Weinberg] Note that _REENTRANT and _THREAD_SAFE are now deprecated Michael Kerrisk Note that "cc -pthread" defines _REENTRANT inotify.7 Michael Kerrisk Note a subtlety of event generation when monitoring a directory libc.7 Michael Kerrisk Add a note on why glibc 2.x uses the soname libc.so.6 Michael Kerrisk Add a few historical details on Linux libc4 and libc5 Just for historical interest. Details taken from http://www.linux-m68k.org/faq/glibcinfo.html. mdoc.7 Michael Kerrisk Add a cross-reference to groff_mdoc(7) mount_namespaces.7 Michael Kerrisk SEE ALSO: add user_namespaces(7) mount_namespaces.7 user_namespaces.7 Michael Kerrisk Migrate subsection on mount restrictions to mount_namespaces(7) This section material in the user_namespaces(7) page was written before the creation of the mount_namespaces(7) manual page. Nowadays, this material properly belongs in the newer page. netlink.7 Dmitry V. Levin Document NETLINK_INET_DIAG rename to NETLINK_SOCK_DIAG Dmitry V. Levin Add references to sock_diag(7) pid_namespaces.7 Michael Kerrisk Refer to namespaces(7) for information about NS_GET_PARENT pipe.7 Michael Kerrisk, Vegard Nossum [Vegard Nossum] Document /proc files controlling memory usage by pipes Document /proc/sys/fs/pipe-max-size and /proc/sys/fs/pipe-user-pages-{soft,hard}. Michael Kerrisk Document pre-Linux 4.9 bugs in pipe limit checking sched.7 Michael Kerrisk Add a new introductory paragraph describing the nice value Michael Kerrisk Add more precise details on CFS's treatment of the nice value Michael Kerrisk Mention RLIMIT_NICE in the discussion of the nice value Michael Kerrisk NOTES: mention cgroups CPU controller Michael Kerrisk Add introductory sentence mentioning CFS scheduler Michael Kerrisk Add nice(2), getpriority(2), and setpriority(2) to API list Michael Kerrisk Make it clearer that SCHED_OTHER is always scheduled below real-time Michael Kerrisk Give the page a more generic NAME The page isn't just about APIs. standards.7 Michael Kerrisk POSIX.1-2016 (POSIX.1-2008 TC2) has now been released symlink.7 Michael Kerrisk SEE ALSO: add namei(1) uri.7 Jakub Wilk Use "example.com" as example domain user_namespaces.7 Michael Kerrisk Add reference to namespaces(7) for NS_GET_USERNS operation Michael Kerrisk Add reference to namespaces(7) for NS_GET_PARENT operation