From 5a015bf361317d4a3629c89b1603bb428641f9be Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Oct 30 2019 14:36:53 +0000 Subject: import man-pages-overrides-7.8.1-1.el7 --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f219bc7 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/man-pages-overrides-7.8.1.tar.xz diff --git a/.man-pages-overrides.metadata b/.man-pages-overrides.metadata new file mode 100644 index 0000000..d27c8af --- /dev/null +++ b/.man-pages-overrides.metadata @@ -0,0 +1 @@ +7a88d072955d480846847f1ec30d26255bbf1f56 SOURCES/man-pages-overrides-7.8.1.tar.xz diff --git a/SOURCES/1073718-mpo-7.1.0-open.2.patch b/SOURCES/1073718-mpo-7.1.0-open.2.patch new file mode 100644 index 0000000..20a0479 --- /dev/null +++ b/SOURCES/1073718-mpo-7.1.0-open.2.patch @@ -0,0 +1,47 @@ +From 4c8988667193cbd405eae05518425905db517626 Mon Sep 17 00:00:00 2001 +From: Jan Chaloupka +Date: Wed, 30 Jul 2014 17:35:04 +0200 +Subject: [PATCH] open.2 + +--- + man-pages/man2/open.2 | 17 ++++++++++++----- + 1 file changed, 12 insertions(+), 5 deletions(-) + +diff --git a/man-pages/man2/open.2 b/man-pages/man2/open.2 +index 84331c6..6b25e7b 100644 +--- a/man-pages/man2/open.2 ++++ b/man-pages/man2/open.2 +@@ -875,10 +875,16 @@ for doing so, for example the + operation in + .BR xfsctl (3). + .LP +-Under Linux 2.4, transfer sizes, and the alignment of the user buffer +-and the file offset must all be multiples of the logical block size +-of the file system. +-Under Linux 2.6, alignment to 512-byte boundaries suffices. ++Under Linux 2.4, transfer sizes, and the alignment of the user buffer ++and the file offset must all be multiples of the logical block size of ++the filesystem. Since Linux 2.6.0, alignment to the logical block size ++of the underlying storage (typically 512 bytes) suffices. The logical ++block size can be determined using the ioctl(2) BLKSSZGET operation or ++from the shell using the command: ++ ++.RS ++.BR blockdev " " --getss ++.RE + .LP + .B O_DIRECT + I/Os should never be run concurrently with the +@@ -1010,7 +1016,8 @@ to enable this flag. + .BR fopen (3), + .BR fifo (7), + .BR path_resolution (7), +-.BR symlink (7) ++.BR symlink (7), ++.BR blockdev (8) + .SH COLOPHON + This page is part of release 3.53 of the Linux + .I man-pages +-- +1.9.3 + diff --git a/SOURCES/1085531-mpo-7.4.0-ipvsadm.8.patch b/SOURCES/1085531-mpo-7.4.0-ipvsadm.8.patch new file mode 100644 index 0000000..3fac1b0 --- /dev/null +++ b/SOURCES/1085531-mpo-7.4.0-ipvsadm.8.patch @@ -0,0 +1,37 @@ +From 6eb0f94188ac99b122693c79302c60c9ec9aef08 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Nikola=20Forr=C3=B3?= +Date: Tue, 28 Mar 2017 14:49:57 +0200 +Subject: [PATCH 1/6] ipvsadm.8: add missing option + +--- + ipvsadm/man8/ipvsadm.8 | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/ipvsadm/man8/ipvsadm.8 b/ipvsadm/man8/ipvsadm.8 +index 9a9e9b3..263e873 100644 +--- a/ipvsadm/man8/ipvsadm.8 ++++ b/ipvsadm/man8/ipvsadm.8 +@@ -37,7 +37,9 @@ ipvsadm \- Linux Virtual Server administration + .SH SYNOPSIS + .B ipvsadm -A|E -t|u|f \fIservice-address\fP [-s \fIscheduler\fP] + .ti 15 +-.B [-p [\fItimeout\fP]] [-M \fInetmask\fP] [-b \fIsched-flags\fP] ++.B [-p [\fItimeout\fP]] [-M \fInetmask\fP] [--pe \fIpersistence_engine\fP] ++.ti 15 ++.B [-b \fIsched-flags\fP] + .br + .B ipvsadm -D -t|u|f \fIservice-address\fP + .br +@@ -262,6 +264,9 @@ fixed service rate (weight) of the ith server. + there is, instead of waiting for a fast one; if all the servers are + busy, it adopts the Shortest Expected Delay policy to assign the job. + .TP ++.B --pe \fIpersistence_engine\fR ++Alternate persistence engine may be sip, not set by default. ++.TP + .B -p, --persistent [\fItimeout\fP] + Specify that a virtual service is persistent. If this option is + specified, multiple requests from a client are redirected to the same +-- +2.7.4 + diff --git a/SOURCES/1086994-mpo-7.1.0-proc.5.patch b/SOURCES/1086994-mpo-7.1.0-proc.5.patch new file mode 100644 index 0000000..b67397d --- /dev/null +++ b/SOURCES/1086994-mpo-7.1.0-proc.5.patch @@ -0,0 +1,47 @@ +From e2f304ae4d80cca575c13d9fd2cdb48b664442db Mon Sep 17 00:00:00 2001 +From: Jan Chaloupka +Date: Tue, 30 Sep 2014 14:38:14 +0200 +Subject: [PATCH] proc.5 adding missing fields + +--- + man-pages/man5/proc.5 | 24 ++++++++++++++++++++++++ + 1 file changed, 24 insertions(+) + +diff --git a/man-pages/man5/proc.5 b/man-pages/man5/proc.5 +index c6156f9..ae3bbf0 100644 +--- a/man-pages/man5/proc.5 ++++ b/man-pages/man5/proc.5 +@@ -1242,6 +1242,30 @@ for a guest operating system), measured in clock ticks (divide by + \fIcguest_time\fP %ld (since Linux 2.6.24) + (44) Guest time of the process's children, measured in clock ticks (divide by + .IR sysconf(_SC_CLK_TCK) ). ++.TP ++\fIstart_data\fP %lu (since Linux 3.3) ++(45) Address above which program data+bss is placed. ++.TP ++\fIend_data\fP %lu (since Linux 3.3) ++(46) Address below which program data+bss is placed. ++.TP ++\fIstart_brk\fP %lu (since Linux 3.3) ++(47) Address above which program heap can be expanded with brk(). ++.TP ++\fIarg_start\fP %lu (since Linux 3.5) ++(48) Address above which program command line is placed. ++.TP ++\fIarg_end\fP %lu (since Linux 3.5) ++(49) Address below which program command line is placed. ++.TP ++\fIenv_start\fP %lu (since Linux 3.5) ++(50) Address above which program environment is placed. ++.TP ++\fIenv_end\fP %lu (since Linux 3.5) ++(51) Address below which program environment is placed. ++.TP ++\fIexit_code\fP %d (since Linux 3.5) ++(52) The thread's exit_code in the form reported by the waitpid system. + .RE + .TP + .I /proc/[pid]/statm +-- +1.9.3 + diff --git a/SOURCES/1095371-clone-and-open-for-aarch64.patch b/SOURCES/1095371-clone-and-open-for-aarch64.patch new file mode 100644 index 0000000..72c8ecd --- /dev/null +++ b/SOURCES/1095371-clone-and-open-for-aarch64.patch @@ -0,0 +1,60 @@ +From f08174d07173579bd1597779c344b6b8e8445621 Mon Sep 17 00:00:00 2001 +From: Jan Chaloupka +Date: Thu, 16 Oct 2014 14:27:29 +0200 +Subject: [PATCH] clone and open for aarch64 + +--- + man-pages/man2/____clone.2 | 17 +++++++++++++++++ + man-pages/man2/____open.2 | 8 ++++++++ + 2 files changed, 25 insertions(+) + +diff --git a/man-pages/man2/____clone.2 b/man-pages/man2/____clone.2 +index 1baad11..96e5006 100644 +--- a/man-pages/man2/____clone.2 ++++ b/man-pages/man2/____clone.2 +@@ -1024,6 +1024,23 @@ On i386, + .BR clone () + should not be called through vsyscall, but directly through + .IR "int $0x80" . ++ ++.BR clone() ++replaces ++.BR fork(2) ++and ++.BR vfork(2) ++system calls. ++A call to ++.BR fork() ++is equivalent to a call to ++.BR clone() ++specifying flags as just SIGCHLD. ++A call to ++.BR vfork() ++is equivalent to calling ++.BR clone() ++with flags specified as: CLONE_VM | CLONE_VFORK | SIGCHLD + .SH BUGS + Versions of the GNU C library that include the NPTL threading library + contain a wrapper function for +diff --git a/man-pages/man2/____open.2 b/man-pages/man2/____open.2 +index 84331c6..f298e34 100644 +--- a/man-pages/man2/____open.2 ++++ b/man-pages/man2/____open.2 +@@ -63,6 +63,14 @@ open, creat \- open and possibly create a file or device + .BI "int creat(const char *" pathname ", mode_t " mode ); + .fi + .SH DESCRIPTION ++.BR open(2) ++and ++.BR creat(2) ++system calls are DEPRECATED, use ++.BR openat(2) ++instead!!! This man page is only a reference for ++.BR openat(2). ++.LP + Given a + .I pathname + for a file, +-- +1.9.3 + diff --git a/SOURCES/1112307-mpo-7.3.0-cciss.4.patch b/SOURCES/1112307-mpo-7.3.0-cciss.4.patch new file mode 100644 index 0000000..34fed1b --- /dev/null +++ b/SOURCES/1112307-mpo-7.3.0-cciss.4.patch @@ -0,0 +1,378 @@ +From 25067420ac8b316f3cd3710bb57e85c5e3bd7c62 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Nikola=20Forr=C3=B3?= +Date: Tue, 28 Jun 2016 10:57:31 +0200 +Subject: [PATCH 01/17] cciss.4: replace man page content with notice about + driver removal + +--- + man-pages/man4/cciss.4 | 347 +------------------------------------------------ + 1 file changed, 6 insertions(+), 341 deletions(-) + +diff --git a/man-pages/man4/cciss.4 b/man-pages/man4/cciss.4 +index e9d64ee..a2320de 100644 +--- a/man-pages/man4/cciss.4 ++++ b/man-pages/man4/cciss.4 +@@ -10,354 +10,19 @@ + .TH CCISS 4 2012-08-05 "Linux" "Linux Programmer's Manual" + .SH NAME + cciss \- HP Smart Array block driver +-.SH SYNOPSIS +-.nf +-modprobe cciss [ cciss_allow_hpsa=1 ] +-.fi + .SH DESCRIPTION +-.B cciss +-is a block driver for older HP Smart Array RAID controllers. +-.SS Options +-.IR "cciss_allow_hpsa=1" : +-This option prevents the +-.B cciss +-driver from attempting to drive any controllers that the +-.BR hpsa (4) +-driver is capable of controlling, which is to say, the +-.B cciss +-driver is restricted by this option to the following controllers: +-.nf +- +- Smart Array 5300 +- Smart Array 5i +- Smart Array 532 +- Smart Array 5312 +- Smart Array 641 +- Smart Array 642 +- Smart Array 6400 +- Smart Array 6400 EM +- Smart Array 6i +- Smart Array P600 +- Smart Array P400i +- Smart Array E200i +- Smart Array E200 +- Smart Array E200i +- Smart Array E200i +- Smart Array E200i +- Smart Array E500 +-.fi +-.SS Supported hardware + The + .B cciss +-driver supports the following Smart Array boards: +-.nf +- +- Smart Array 5300 +- Smart Array 5i +- Smart Array 532 +- Smart Array 5312 +- Smart Array 641 +- Smart Array 642 +- Smart Array 6400 +- Smart Array 6400 U320 Expansion Module +- Smart Array 6i +- Smart Array P600 +- Smart Array P800 +- Smart Array E400 +- Smart Array P400i +- Smart Array E200 +- Smart Array E200i +- Smart Array E500 +- Smart Array P700m +- Smart Array P212 +- Smart Array P410 +- Smart Array P410i +- Smart Array P411 +- Smart Array P812 +- Smart Array P712m +- Smart Array P711m +-.fi +-.SS Configuration details +-To configure HP Smart Array controllers, +-use the HP Array Configuration Utility +-(either +-.BR hpacuxe (8) +-or +-.BR hpacucli (8)) +-or the Offline ROM-based Configuration Utility (ORCA) +-run from the Smart Array's option ROM at boot time. +-.SH FILES +-.SS Device nodes +-The device naming scheme is as follows: +-.nf +- +-Major numbers: +- +- 104 cciss0 +- 105 cciss1 +- 106 cciss2 +- 105 cciss3 +- 108 cciss4 +- 109 cciss5 +- 110 cciss6 +- 111 cciss7 +- +-Minor numbers: +- +- b7 b6 b5 b4 b3 b2 b1 b0 +- |----+----| |----+----| +- | | +- | +-------- Partition ID (0=wholedev, 1-15 partition) +- | +- +-------------------- Logical Volume number +- +-The device naming scheme is: +- +- /dev/cciss/c0d0 Controller 0, disk 0, whole device +- /dev/cciss/c0d0p1 Controller 0, disk 0, partition 1 +- /dev/cciss/c0d0p2 Controller 0, disk 0, partition 2 +- /dev/cciss/c0d0p3 Controller 0, disk 0, partition 3 +- +- /dev/cciss/c1d1 Controller 1, disk 1, whole device +- /dev/cciss/c1d1p1 Controller 1, disk 1, partition 1 +- /dev/cciss/c1d1p2 Controller 1, disk 1, partition 2 +- /dev/cciss/c1d1p3 Controller 1, disk 1, partition 3 +-.fi +-.SS Files in /proc +-The files +-.I /proc/driver/cciss/cciss[0-9]+ +-contain information about +-the configuration of each controller. +-For example: +-.nf +- +- $ \fBcd /proc/driver/cciss\fP +- $ \fBls -l\fP +- total 0 +- -rw-r--r-- 1 root root 0 2010-09-10 10:38 cciss0 +- -rw-r--r-- 1 root root 0 2010-09-10 10:38 cciss1 +- -rw-r--r-- 1 root root 0 2010-09-10 10:38 cciss2 +- $ \fBcat cciss2\fP +- cciss2: HP Smart Array P800 Controller +- Board ID: 0x3223103c +- Firmware Version: 7.14 +- IRQ: 16 +- Logical drives: 1 +- Current Q depth: 0 +- Current # commands on controller: 0 +- Max Q depth since init: 1 +- Max # commands on controller since init: 2 +- Max SG entries since init: 32 +- Sequential access devices: 0 +- +- cciss/c2d0: 36.38GB RAID 0 +-.fi +-.SS Files in /sys +-.TP +-.I /sys/bus/pci/devices//ccissX/cXdY/model +-Displays the SCSI INQUIRY page 0 model for logical drive +-.I Y +-of controller +-.IR X . +-.TP +-.I /sys/bus/pci/devices//ccissX/cXdY/rev +-Displays the SCSI INQUIRY page 0 revision for logical drive +-.I Y +-of controller +-.IR X . +-.TP +-.I /sys/bus/pci/devices//ccissX/cXdY/unique_id +-Displays the SCSI INQUIRY page 83 serial number for logical drive +-.I Y +-of controller +-.IR X . +-.TP +-.I /sys/bus/pci/devices//ccissX/cXdY/vendor +-Displays the SCSI INQUIRY page 0 vendor for logical drive +-.I Y +-of controller +-.IR X . +-.TP +-.I /sys/bus/pci/devices//ccissX/cXdY/block:cciss!cXdY +-A symbolic link to +-.IR /sys/block/cciss!cXdY . +-.TP +-.I /sys/bus/pci/devices//ccissX/rescan +-When this file is written to, the driver rescans the controller +-to discover any new, removed, or modified logical drives. +-.TP +-.I /sys/bus/pci/devices//ccissX/resettable +-A value of 1 displayed in this file indicates that +-the "reset_devices=1" kernel parameter (used by +-.BR kdump ) +-is honored by this controller. +-A value of 0 indicates that the +-"reset_devices=1" kernel parameter will not be honored. +-Some models of Smart Array are not able to honor this parameter. +-.TP +-.I /sys/bus/pci/devices//ccissX/cXdY/lunid +-Displays the 8-byte LUN ID used to address logical drive +-.I Y +-of controller +-.IR X . +-.TP +-.I /sys/bus/pci/devices//ccissX/cXdY/raid_level +-Displays the RAID level of logical drive +-.I Y +-of controller +-.IR X . +-.TP +-.I /sys/bus/pci/devices//ccissX/cXdY/usage_count +-Displays the usage count (number of opens) of logical drive +-.I Y +-of controller +-.IR X . +-.SS SCSI tape drive and medium changer support +-SCSI sequential access devices and medium changer devices are supported and +-appropriate device nodes are automatically created (e.g., +-.IR /dev/st0 , +-.IR /dev/st1 , +-etc.; see +-.BR st (4) +-for more details.) +-You must enable "SCSI tape drive support for Smart Array 5xxx" and +-"SCSI support" in your kernel configuration to be able to use SCSI +-tape drives with your Smart Array 5xxx controller. +- +-Additionally, note that the driver will not engage the SCSI core at +-init time. +-The driver must be directed to dynamically engage the SCSI core via +-the /proc file-system entry, +-which the "block" side of the driver creates as +-.I /proc/driver/cciss/cciss* +-at run time. +-This is because at driver init time, +-the SCSI core may not yet be initialized (because the driver is a block +-driver) and attempting to register it with the SCSI core in such a case +-would cause a hang. +-This is best done via an initialization script +-(typically in +-.IR /etc/init.d , +-but could vary depending on distribution). +-For example: +-.nf +- +- for x in /proc/driver/cciss/cciss[0-9]* +- do +- echo "engage scsi" > $x +- done +- +-.fi +-Once the SCSI core is engaged by the driver, it cannot be disengaged +-(except by unloading the driver, if it happens to be linked as a module.) +- +-Note also that if no sequential access devices or medium changers are +-detected, the SCSI core will not be engaged by the action of the above +-script. +-.SS Hot plug support for SCSI tape drives +-Hot plugging of SCSI tape drives is supported, with some caveats. +-The +-.B cciss +-driver must be informed that changes to the SCSI bus +-have been made. +-This may be done via the /proc file system. +-For example: +- +- echo "rescan" > /proc/scsi/cciss0/1 +- +-This causes the driver to: +-.RS +-.IP 1. 3 +-query the adapter about changes to the +-physical SCSI buses and/or fibre channel arbitrated loop, and +-.IP 2. +-make note of any new or removed sequential access devices +-or medium changers. +-.RE +-.LP +-The driver will output messages indicating which +-devices have been added or removed and the controller, bus, target and +-lun used to address each device. +-The driver then notifies the SCSI midlayer +-of these changes. +- +-Note that the naming convention of the /proc file-system entries +-contains a number in addition to the driver name +-(e.g., "cciss0" +-instead of just "cciss", which you might expect). +- +-Note: +-.I Only +-sequential access devices and medium changers are presented +-as SCSI devices to the SCSI midlayer by the +-.B cciss +-driver. +-Specifically, physical SCSI disk drives are +-.I not +-presented to the SCSI midlayer. +-The only disk devices that are presented to the kernel are logical +-drives that the array controller constructs from regions on +-the physical drives. +-The logical drives are presented to the block layer +-(not to the SCSI midlayer). +-It is important for the driver to prevent the kernel from accessing the +-physical drives directly, since these drives are used by the array +-controller to construct the logical drives. +-.SS SCSI error handling for tape drives and medium changers +-The Linux SCSI midlayer provides an error-handling protocol that +-is initiated whenever a SCSI command fails to complete within a +-certain amount of time (which can vary depending on the command). +-The +-.B cciss +-driver participates in this protocol to some extent. +-The normal protocol is a four-step process: +-.IP * 3 +-First, the device is told to abort the command. +-.IP * +-If that doesn't work, the device is reset. +-.IP * +-If that doesn't work, the SCSI bus is reset. +-.IP * +-If that doesn't work the host bus adapter is reset. +-.LP +-The +-.B cciss +-driver is a block +-driver as well as a SCSI driver and only the tape drives and medium +-changers are presented to the SCSI midlayer +-Furthermore, unlike more +-straightforward SCSI drivers, disk I/O continues through the block +-side during the SCSI error-recovery process +-Therefore, the +-.B cciss +-driver implements only the first two of these actions, +-aborting the command, and resetting the device. +-Note also that most tape drives will not oblige +-in aborting commands, and sometimes it appears they will not even +-obey a reset command, though in most circumstances they will. +-If the command cannot be aborted and the device cannot be +-reset, the device will be set offline. +- +-In the event that the error-handling code is triggered and a tape drive is +-successfully reset or the tardy command is successfully aborted, the +-tape drive may still not allow I/O to continue until some command +-is issued that positions the tape to a known position. +-Typically you must rewind the tape (by issuing +-.I "mt -f /dev/st0 rewind" +-for example) before I/O can proceed again to a tape drive that was reset. ++driver has been removed from RHEL-7. ++Details can be found in RHEL-7.0 Release Notes. ++Please use ++.BR hpsa (4) ++instead. + .SH SEE ALSO + .BR cciss_vol_status (8), + .BR hpsa (4), + .BR hpacucli (8), +-.BR hpacuxe (8), +- +-.UR http://cciss.sf.net +-.UE , +-and +-.I Documentation/blockdev/cciss.txt +-and +-.I Documentation/ABI/testing/sysfs-bus-pci-devices-cciss +-in the Linux kernel source tree ++.BR hpacuxe (8) + .\" .SH AUTHORS + .\" Don Brace, Steve Cameron, Chase Maupin, Mike Miller, Michael Ni, + .\" Charles White, Francis Wiran +-- +2.7.4 + diff --git a/SOURCES/1120294-madvise.2-MADV_REMOVE-supports-more-filesystems.patch b/SOURCES/1120294-madvise.2-MADV_REMOVE-supports-more-filesystems.patch new file mode 100644 index 0000000..ec78e5b --- /dev/null +++ b/SOURCES/1120294-madvise.2-MADV_REMOVE-supports-more-filesystems.patch @@ -0,0 +1,112 @@ +From 82a40d2b088b5207ecb8f8861ebd4babfd10385a Mon Sep 17 00:00:00 2001 +From: Jan Chaloupka +Date: Mon, 27 Oct 2014 13:02:32 +0100 +Subject: [PATCH] madvise.2 MADV_REMOVE supports more filesystems + +--- + man-pages/en/man2/madvise.2 | 20 ++++++++++++++------ + man-pages/man2/fallocate.2 | 11 +++++++++++ + man-pages/man2/madvise.2 | 20 ++++++++++++++------ + 3 files changed, 39 insertions(+), 12 deletions(-) + +diff --git a/man-pages/en/man2/madvise.2 b/man-pages/en/man2/madvise.2 +index 4e693da..460726a 100644 +--- a/man-pages/en/man2/madvise.2 ++++ b/man-pages/en/man2/madvise.2 +@@ -101,11 +101,18 @@ without an underlying file. + .BR MADV_REMOVE " (Since Linux 2.6.16)" + Free up a given range of pages + and its associated backing store. +-Currently, +-.\" 2.6.18-rc5 +-only shmfs/tmpfs supports this; other file systems return with the +-error +-.BR ENOSYS . ++Originally, only shmfs/tmpfs supported this; but since Linux 3.5, ++any filesystem which supports the ++.BR fallocate(2) ++mode ++.BR FALLOC_FL_PUNCH_HOLE ++also supports the ++.BR madvise(2) ++advice ++.BR MADV_REMOVE . ++Other filesystems return with the ++.BR EOPNOTSUPP ++error. + .\" Databases want to use this feature to drop a section of their + .\" bufferpool (shared memory segments) - without writing back to + .\" disk/swap space. This feature is also useful for supporting +@@ -375,7 +382,8 @@ from the system call, as it should). + .BR mprotect (2), + .BR msync (2), + .BR munmap (2), +-.BR core (5) ++.BR core (5), ++.BR fallocate (2) + .SH COLOPHON + This page is part of release 3.53 of the Linux + .I man-pages +diff --git a/man-pages/man2/fallocate.2 b/man-pages/man2/fallocate.2 +index be9dbcd..4e68a3f 100644 +--- a/man-pages/man2/fallocate.2 ++++ b/man-pages/man2/fallocate.2 +@@ -109,6 +109,17 @@ does not change. + Not all file systems support + .BR FALLOC_FL_PUNCH_HOLE ; + if a file system doesn't support the operation, an error is returned. ++The operation is supported on at least the following filesystems: ++.IP * 3 ++XFS (since Linux 2.6.38) ++.IP * ++ext4 (since Linux 3.0) ++.\" commit a4bb6b64e39abc0e41ca077725f2a72c868e7622 ++.IP * ++Btrfs (since Linux 3.7) ++.IP * ++tmpfs (since Linux 3.5) ++.\" commit 83e4fa9c16e4af7122e31be3eca5d57881d236fe + .SH RETURN VALUE + On success, + .BR fallocate () +diff --git a/man-pages/man2/madvise.2 b/man-pages/man2/madvise.2 +index 4e693da..460726a 100644 +--- a/man-pages/man2/madvise.2 ++++ b/man-pages/man2/madvise.2 +@@ -101,11 +101,18 @@ without an underlying file. + .BR MADV_REMOVE " (Since Linux 2.6.16)" + Free up a given range of pages + and its associated backing store. +-Currently, +-.\" 2.6.18-rc5 +-only shmfs/tmpfs supports this; other file systems return with the +-error +-.BR ENOSYS . ++Originally, only shmfs/tmpfs supported this; but since Linux 3.5, ++any filesystem which supports the ++.BR fallocate(2) ++mode ++.BR FALLOC_FL_PUNCH_HOLE ++also supports the ++.BR madvise(2) ++advice ++.BR MADV_REMOVE . ++Other filesystems return with the ++.BR EOPNOTSUPP ++error. + .\" Databases want to use this feature to drop a section of their + .\" bufferpool (shared memory segments) - without writing back to + .\" disk/swap space. This feature is also useful for supporting +@@ -375,7 +382,8 @@ from the system call, as it should). + .BR mprotect (2), + .BR msync (2), + .BR munmap (2), +-.BR core (5) ++.BR core (5), ++.BR fallocate (2) + .SH COLOPHON + This page is part of release 3.53 of the Linux + .I man-pages +-- +1.9.3 + diff --git a/SOURCES/1129235-mpo-7.1.0-flock.2.patch b/SOURCES/1129235-mpo-7.1.0-flock.2.patch new file mode 100644 index 0000000..3151813 --- /dev/null +++ b/SOURCES/1129235-mpo-7.1.0-flock.2.patch @@ -0,0 +1,83 @@ +From f1121d1e7ff76ace6e89fbe275abc3abedd5940b Mon Sep 17 00:00:00 2001 +From: Jan Chaloupka +Date: Mon, 29 Sep 2014 21:43:53 +0200 +Subject: [PATCH] flock.2 NFS flock + +--- + man-pages/man2/flock.2 | 48 ++++++++++++++++++++++++++++++++++++++++-------- + 1 file changed, 40 insertions(+), 8 deletions(-) + +diff --git a/man-pages/man2/flock.2 b/man-pages/man2/flock.2 +index 60537fe..b8c55d1 100644 +--- a/man-pages/man2/flock.2 ++++ b/man-pages/man2/flock.2 +@@ -145,19 +145,12 @@ possibly implemented in terms of + .BR fcntl (2), + appears on most UNIX systems. + .SH NOTES +-.BR flock () +-does not lock files over NFS. +-Use +-.BR fcntl (2) +-instead: that does work over NFS, given a sufficiently recent version of +-Linux and a server which supports locking. +-.PP + Since kernel 2.0, + .BR flock () + is implemented as a system call in its own right rather + than being emulated in the GNU C library as a call to + .BR fcntl (2). +-This yields true BSD semantics: ++This yields classical BSD semantics: + there is no interaction between the types of lock + placed by + .BR flock () +@@ -166,6 +159,45 @@ and + and + .BR flock () + does not detect deadlock. ++(Note, however, that on some modern BSDs, ++.\" E.g., according to the flock(2) man page, FreeBSD since at least 5.3 ++.BR flock () ++and ++.BR fcntl (2) ++locks ++.I do ++interact with one another.) ++.PP ++In Linux kernels up to 2.6.11, ++.BR flock () ++does not lock files over NFS ++(i.e., the scope of locks was limited to the local system). ++Instead, one could use ++.BR fcntl (2) ++byte-range locking, which does work over NFS, ++given a sufficiently recent version of ++Linux and a server which supports locking. ++Since Linux 2.6.12, NFS clients support ++.BR flock () ++locks by emulating them as byte-range locks on the entire file. ++This means that ++.BR fcntl (2) ++and ++.BR flock () ++locks ++.I do ++interact with one another over NFS. ++Since Linux 2.6.37, ++.\" commit 5eebde23223aeb0ad2d9e3be6590ff8bbfab0fc2 ++the kernel supports a compatibility mode that allows ++.BR flock () ++locks (and also ++.BR fcntl (2) ++byte region locks) to be treated as local; ++see the discussion of the ++.I "local_lock" ++option in ++.BR nfs (5). + .PP + .BR flock () + places advisory locks only; given suitable permissions on a file, +-- +1.9.3 + diff --git a/SOURCES/1131853-mpo-7.1.0-proc.5-proc-fs-not-empty.patch b/SOURCES/1131853-mpo-7.1.0-proc.5-proc-fs-not-empty.patch new file mode 100644 index 0000000..564ec21 --- /dev/null +++ b/SOURCES/1131853-mpo-7.1.0-proc.5-proc-fs-not-empty.patch @@ -0,0 +1,26 @@ +From 1add9b12265ac72b655fce77cc832bab271071ca Mon Sep 17 00:00:00 2001 +From: Jan Chaloupka +Date: Tue, 30 Sep 2014 14:41:23 +0200 +Subject: [PATCH] proc.5 proc/fs not empty + +--- + man-pages/man5/proc.5 | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/man-pages/man5/proc.5 b/man-pages/man5/proc.5 +index ae3bbf0..e4d2fd7 100644 +--- a/man-pages/man5/proc.5 ++++ b/man-pages/man5/proc.5 +@@ -1618,7 +1618,8 @@ Then file systems contained in this file are tried + (excepted those that are marked with "nodev"). + .TP + .I /proc/fs +-Empty subdirectory. ++Contains subdirectories that in turn contain files ++with information about (certain) mounted filesystems. + .TP + .I /proc/ide + This directory +-- +1.9.3 + diff --git a/SOURCES/1131859-mpo-7.1.0-host.conf.5.patch b/SOURCES/1131859-mpo-7.1.0-host.conf.5.patch new file mode 100644 index 0000000..b2832ed --- /dev/null +++ b/SOURCES/1131859-mpo-7.1.0-host.conf.5.patch @@ -0,0 +1,29 @@ +From 9778d846f435c1903531896806c530d6950739d1 Mon Sep 17 00:00:00 2001 +From: Jan Chaloupka +Date: Mon, 29 Sep 2014 23:05:16 +0200 +Subject: [PATCH] host.conf.5 multi on by default + +--- + man-pages/man5/host.conf.5 | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/man-pages/man5/host.conf.5 b/man-pages/man5/host.conf.5 +index c85fefe..b27de9d 100644 +--- a/man-pages/man5/host.conf.5 ++++ b/man-pages/man5/host.conf.5 +@@ -64,9 +64,9 @@ appears in the + file, + instead of only the first. + This is +-.I off +-by default, as it may cause a substantial performance loss at sites +-with large hosts files. ++.I on ++by default. ++On systems with DNS, hosts files are much smaller and the performance loss of multiple search is negligible. On sites with large hosts files, turning it on may cause a substantial performance loss. + .TP + .I nospoof + Valid values are +-- +1.9.3 + diff --git a/SOURCES/1131939-mpo-7.1.0-charsets.7-nl_langinfo.3.patch b/SOURCES/1131939-mpo-7.1.0-charsets.7-nl_langinfo.3.patch new file mode 100644 index 0000000..b43b091 --- /dev/null +++ b/SOURCES/1131939-mpo-7.1.0-charsets.7-nl_langinfo.3.patch @@ -0,0 +1,44 @@ +From 8b74fb5abd8e08f3b1e5cc2847b9650e94abe616 Mon Sep 17 00:00:00 2001 +From: Jan Chaloupka +Date: Mon, 29 Sep 2014 22:52:57 +0200 +Subject: [PATCH] Latin1 default UTF-8 recommended encoding + +--- + man-pages/man3/nl_langinfo.3 | 7 +++++++ + man-pages/man7/charsets.7 | 2 ++ + 2 files changed, 9 insertions(+) + +diff --git a/man-pages/man3/nl_langinfo.3 b/man-pages/man3/nl_langinfo.3 +index e38614d..3962a6a 100644 +--- a/man-pages/man3/nl_langinfo.3 ++++ b/man-pages/man3/nl_langinfo.3 +@@ -113,6 +113,13 @@ next call to + .BR nl_langinfo () + or + .BR setlocale (3). ++.PP ++Codeset for en_US defaults to ISO-8859-1 (Latin-1). ++The Latin-1 default has historical reasons, ++since all Unix systems originally used only 8-bit character encoding. ++For more information about ISO-8859-1 see ++.BR charsets (7). ++ + .SH CONFORMING TO + SUSv2, POSIX.1-2001. + .SH EXAMPLE +diff --git a/man-pages/man7/charsets.7 b/man-pages/man7/charsets.7 +index 05ff56c..45fd5ad 100644 +--- a/man-pages/man7/charsets.7 ++++ b/man-pages/man7/charsets.7 +@@ -29,6 +29,8 @@ ASCII, GB 2312, ISO 8859, JIS, KOI8-R, KS, and Unicode. + The primary emphasis is on character sets that were actually used by + locale character sets, not the myriad others that could be found in data + from other systems. ++.LP ++The recommended encoding in all settings and locales is UTF-8. + .SS ASCII + ASCII (American Standard Code For Information Interchange) is the original + 7-bit character set, originally designed for American English. +-- +1.9.3 + diff --git a/SOURCES/1141874-mpo-7.2.0-mgetty-fix-typos-in-mgetty-s-man-pages.patch b/SOURCES/1141874-mpo-7.2.0-mgetty-fix-typos-in-mgetty-s-man-pages.patch new file mode 100644 index 0000000..2bece1a --- /dev/null +++ b/SOURCES/1141874-mpo-7.2.0-mgetty-fix-typos-in-mgetty-s-man-pages.patch @@ -0,0 +1,74 @@ +From d85ba8664ac0c3039feb3661cbb1964c3da235bc Mon Sep 17 00:00:00 2001 +From: Jan Chaloupka +Date: Tue, 26 May 2015 15:14:31 +0200 +Subject: [PATCH] Fix typos in mgetty's man pages + +--- + mgetty/man1/g32pbm.1 | 6 +++--- + mgetty/man1/g3cat.1 | 2 +- + mgetty/man4/mgettydefs.4 | 2 +- + mgetty/man8/callback.8 | 2 +- + 4 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/mgetty/man1/g32pbm.1 b/mgetty/man1/g32pbm.1 +index fd31397..a4f1e19 100644 +--- a/mgetty/man1/g32pbm.1 ++++ b/mgetty/man1/g32pbm.1 +@@ -36,12 +36,12 @@ is activated automatically if the file is specified on the command + line and its name starts with "fn..." (fax/normal). + .TP + .B -l(aserjet) +-Instead of a portable bitmap (PBM), output HP laserjet files, suitable for +-direct printing on a HP laserjet or desjket. ++Instead of a portable bitmap (PBM), output HP LaserJet files, suitable for ++direct printing on a HP LaserJet or Deskjet. + .TP + .B -d + Scale output to dots per inch before printing. Normal FAX resolution +-is 204x196 dpi (fine mode), or 204x98 dpi (normal mode). In LaerJet mode, ++is 204x196 dpi (fine mode), or 204x98 dpi (normal mode). In LaserJet mode, + only the values 75, 150 and 300 are allowed for . + .TP + .B -t +diff --git a/mgetty/man1/g3cat.1 b/mgetty/man1/g3cat.1 +index b42212a..a347282 100644 +--- a/mgetty/man1/g3cat.1 ++++ b/mgetty/man1/g3cat.1 +@@ -35,7 +35,7 @@ specifies the number of blank lines + should prepend to each page. Default is 0. + .TP + .B "\-L " +-limit lenght of output page to maximum lines. ++limit length of output page to maximum lines. + .SH SPECIAL-CASE OPTIONS + .TP + .B "\-w " +diff --git a/mgetty/man4/mgettydefs.4 b/mgetty/man4/mgettydefs.4 +index c3fe5bf..3646ccb 100644 +--- a/mgetty/man4/mgettydefs.4 ++++ b/mgetty/man4/mgettydefs.4 +@@ -262,7 +262,7 @@ Ignore case - treat all as lowercase. + Is set if mgetty believes login is entirely uppercase. + .TP + .B -LCASE +-Repect case ++Respect case + (turns off IUCLC, OLCUC and XCASE) + .TP + .B TABS +diff --git a/mgetty/man8/callback.8 b/mgetty/man8/callback.8 +index 536064b..1932fd9 100644 +--- a/mgetty/man8/callback.8 ++++ b/mgetty/man8/callback.8 +@@ -94,7 +94,7 @@ start a "login shell", it won't work (this is for the same reason + has to be started from /etc/inittab). + + So, mgetty has to do the "asking for login name". But I do not want to +-have all that dialout code in mgetty, bloating it even more. ++have all that dial-out code in mgetty, bloating it even more. + + The way it works is this: + .I callback +-- +1.9.3 + diff --git a/SOURCES/1147718-resolv.conf.5-add-missing-no-tld-query.patch b/SOURCES/1147718-resolv.conf.5-add-missing-no-tld-query.patch new file mode 100644 index 0000000..606399f --- /dev/null +++ b/SOURCES/1147718-resolv.conf.5-add-missing-no-tld-query.patch @@ -0,0 +1,34 @@ +From 70cda4be1493b7e44ab87cd115a1b1d19162c9f4 Mon Sep 17 00:00:00 2001 +From: Jan Chaloupka +Date: Thu, 16 Oct 2014 11:36:17 +0200 +Subject: [PATCH] resolv.conf.5 add missing no-tld-query + +--- + man-pages/man5/resolv.conf.5 | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +diff --git a/man-pages/man5/resolv.conf.5 b/man-pages/man5/resolv.conf.5 +index 321a7e5..2495dde 100644 +--- a/man-pages/man5/resolv.conf.5 ++++ b/man-pages/man5/resolv.conf.5 +@@ -258,6 +258,17 @@ When that happens the client system will sit and wait for the second reply. + Turning this option on changes this behavior + so that if two requests from the same port are not handled correctly it will + close the socket and open a new one before sending the second request. ++.TP ++.BR no-tld-query " (since glibc 2.14)" ++sets RES_NOTLDQUERY in ++.IR _res.options . ++This option causes ++.BR res_nsearch() ++to not attempt to resolve an unqualified name ++as if it were a top level domain (TLD). ++This option can cause problems if the site has ``localhost'' as a TLD ++rather than having localhost on one or more elements of the search list. ++This option has no effect if neither RES_DEFNAMES or RES_DNSRCH is set. + .RE + .LP + The \fIdomain\fP and \fIsearch\fP keywords are mutually exclusive. +-- +1.9.3 + diff --git a/SOURCES/1197850-mpo-7.2.0-backport-thread-safety-information.patch b/SOURCES/1197850-mpo-7.2.0-backport-thread-safety-information.patch new file mode 100644 index 0000000..c1f8934 --- /dev/null +++ b/SOURCES/1197850-mpo-7.2.0-backport-thread-safety-information.patch @@ -0,0 +1,10133 @@ +From d44624018bd0af4f5452fb29168e4ca061e7295c Mon Sep 17 00:00:00 2001 +From: Jan Chaloupka +Date: Fri, 11 Sep 2015 18:55:28 +0200 +Subject: [PATCH] Backport thread-safety information + +--- + man-pages/en/man3/encrypt.3 | 26 ++++++----- + man-pages/en/man3/fclose.3 | 14 +++++- + man-pages/en/man3/fflush.3 | 15 +++++-- + man-pages/en/man3/lockf.3 | 14 +++++- + man-pages/en/man3/rand.3 | 18 +++++++- + man-pages/en/man3/strtok.3 | 20 ++++++--- + man-pages/en/man3/toupper.3 | 18 +++++++- + man-pages/man3/a64l.3 | 19 +++++--- + man-pages/man3/abort.3 | 12 +++++ + man-pages/man3/abs.3 | 16 +++++-- + man-pages/man3/acos.3 | 14 ++++++ + man-pages/man3/acosh.3 | 14 ++++++ + man-pages/man3/addseverity.3 | 12 +++++ + man-pages/man3/adjtime.3 | 12 +++++ + man-pages/man3/aio_cancel.3 | 12 +++++ + man-pages/man3/aio_error.3 | 13 ++++-- + man-pages/man3/aio_fsync.3 | 12 +++++ + man-pages/man3/aio_read.3 | 12 +++++ + man-pages/man3/aio_return.3 | 13 ++++-- + man-pages/man3/aio_suspend.3 | 12 +++++ + man-pages/man3/aio_write.3 | 12 +++++ + man-pages/man3/alloca.3 | 12 +++++ + man-pages/man3/argz_add.3 | 29 ++++++++++++ + man-pages/man3/asin.3 | 14 ++++++ + man-pages/man3/asinh.3 | 14 ++++++ + man-pages/man3/assert.3 | 13 ++++++ + man-pages/man3/assert_perror.3 | 13 ++++++ + man-pages/man3/atan.3 | 14 ++++++ + man-pages/man3/atan2.3 | 14 ++++++ + man-pages/man3/atanh.3 | 14 ++++++ + man-pages/man3/atof.3 | 12 +++++ + man-pages/man3/atoi.3 | 14 ++++++ + man-pages/man3/backtrace.3 | 16 +++++++ + man-pages/man3/basename.3 | 13 ++++++ + man-pages/man3/bcmp.3 | 12 +++++ + man-pages/man3/bcopy.3 | 12 +++++ + man-pages/man3/bindresvport.3 | 26 +++++++---- + man-pages/man3/bsd_signal.3 | 12 +++++ + man-pages/man3/btowc.3 | 12 +++++ + man-pages/man3/byteorder.3 | 15 +++++++ + man-pages/man3/bzero.3 | 12 +++++ + man-pages/man3/cabs.3 | 14 ++++++ + man-pages/man3/cacos.3 | 14 ++++++ + man-pages/man3/cacosh.3 | 14 ++++++ + man-pages/man3/canonicalize_file_name.3 | 12 +++++ + man-pages/man3/carg.3 | 14 ++++++ + man-pages/man3/casin.3 | 14 ++++++ + man-pages/man3/casinh.3 | 14 ++++++ + man-pages/man3/catan.3 | 14 ++++++ + man-pages/man3/catanh.3 | 14 ++++++ + man-pages/man3/catgets.3 | 12 +++++ + man-pages/man3/catopen.3 | 15 +++++++ + man-pages/man3/cbrt.3 | 14 ++++++ + man-pages/man3/ceil.3 | 14 ++++-- + man-pages/man3/cfree.3 | 12 +++++ + man-pages/man3/cimag.3 | 14 ++++-- + man-pages/man3/clock_getcpuclockid.3 | 13 ++++-- + man-pages/man3/clog.3 | 14 ++++++ + man-pages/man3/clog10.3 | 14 ++++++ + man-pages/man3/closedir.3 | 12 +++++ + man-pages/man3/confstr.3 | 12 +++++ + man-pages/man3/conj.3 | 14 ++++-- + man-pages/man3/copysign.3 | 14 ++++++ + man-pages/man3/cos.3 | 14 ++++++ + man-pages/man3/cosh.3 | 14 ++++++ + man-pages/man3/cpow.3 | 14 ++++++ + man-pages/man3/cproj.3 | 14 ++++++ + man-pages/man3/creal.3 | 14 ++++++ + man-pages/man3/crypt.3 | 18 +++++--- + man-pages/man3/ctermid.3 | 14 ++++-- + man-pages/man3/daemon.3 | 13 ++++++ + man-pages/man3/des_crypt.3 | 14 ++++++ + man-pages/man3/difftime.3 | 12 +++++ + man-pages/man3/dirfd.3 | 13 ++++-- + man-pages/man3/div.3 | 14 ++++-- + man-pages/man3/drand48.3 | 19 ++++++-- + man-pages/man3/drand48_r.3 | 22 +++++++++ + man-pages/man3/dysize.3 | 12 +++++ + man-pages/man3/ecvt.3 | 16 +++++-- + man-pages/man3/ecvt_r.3 | 16 +++++++ + man-pages/man3/encrypt.3 | 24 +++++----- + man-pages/man3/envz_add.3 | 20 +++++++++ + man-pages/man3/erf.3 | 14 ++++++ + man-pages/man3/erfc.3 | 14 ++++++ + man-pages/man3/euidaccess.3 | 13 ++++++ + man-pages/man3/exec.3 | 19 ++++++++ + man-pages/man3/exit.3 | 17 +++++++ + man-pages/man3/exp.3 | 14 ++++++ + man-pages/man3/exp10.3 | 14 ++++++ + man-pages/man3/exp2.3 | 14 ++++++ + man-pages/man3/expm1.3 | 15 +++++++ + man-pages/man3/fabs.3 | 14 ++++-- + man-pages/man3/fclose.3 | 12 +++++ + man-pages/man3/fcloseall.3 | 13 +++++- + man-pages/man3/fdim.3 | 14 ++++-- + man-pages/man3/fenv.3 | 62 ++++++++++++++++++++++++++ + man-pages/man3/ferror.3 | 15 +++++-- + man-pages/man3/fflush.3 | 13 ++++-- + man-pages/man3/ffs.3 | 14 ++++++ + man-pages/man3/fgetwc.3 | 13 ++++++ + man-pages/man3/fgetws.3 | 12 +++++ + man-pages/man3/finite.3 | 16 +++++-- + man-pages/man3/flockfile.3 | 14 ++++-- + man-pages/man3/floor.3 | 14 ++++-- + man-pages/man3/fma.3 | 14 ++++++ + man-pages/man3/fmax.3 | 14 ++++++ + man-pages/man3/fmin.3 | 14 ++++++ + man-pages/man3/fmod.3 | 14 ++++++ + man-pages/man3/fmtmsg.3 | 17 ++++++- + man-pages/man3/fnmatch.3 | 12 +++++ + man-pages/man3/fopen.3 | 14 ++++++ + man-pages/man3/fopencookie.3 | 12 +++++ + man-pages/man3/fpclassify.3 | 18 ++++++++ + man-pages/man3/fread.3 | 13 ++++++ + man-pages/man3/frexp.3 | 14 ++++++ + man-pages/man3/ftime.3 | 13 ++++++ + man-pages/man3/ftok.3 | 12 +++++ + man-pages/man3/futimes.3 | 13 ++++++ + man-pages/man3/gamma.3 | 14 ++++++ + man-pages/man3/getauxval.3 | 12 +++++ + man-pages/man3/getcontext.3 | 13 ++++++ + man-pages/man3/getcwd.3 | 16 +++++++ + man-pages/man3/getdate.3 | 18 +++++--- + man-pages/man3/getdirentries.3 | 12 +++++ + man-pages/man3/getdtablesize.3 | 12 +++++ + man-pages/man3/getenv.3 | 13 ++++++ + man-pages/man3/getfsent.3 | 21 +++++++++ + man-pages/man3/getgrent.3 | 33 ++++++++++++++ + man-pages/man3/getgrnam.3 | 25 +++++++---- + man-pages/man3/getgrouplist.3 | 12 +++++ + man-pages/man3/getloadavg.3 | 12 +++++ + man-pages/man3/getlogin.3 | 49 +++++++++++++++----- + man-pages/man3/getopt.3 | 14 ++++++ + man-pages/man3/getpass.3 | 13 ++++-- + man-pages/man3/getpt.3 | 12 +++++ + man-pages/man3/getpwent.3 | 34 ++++++++++++++ + man-pages/man3/getpwnam.3 | 42 +++++++++++++---- + man-pages/man3/gets.3 | 13 ++++++ + man-pages/man3/getsubopt.3 | 12 +++++ + man-pages/man3/getttyent.3 | 28 ++++++------ + man-pages/man3/getusershell.3 | 17 ++++--- + man-pages/man3/getutmp.3 | 13 ++++++ + man-pages/man3/getw.3 | 13 ++++++ + man-pages/man3/gnu_get_libc_version.3 | 13 ++++++ + man-pages/man3/grantpt.3 | 13 ++++++ + man-pages/man3/hsearch.3 | 22 +++++---- + man-pages/man3/iconv.3 | 13 ++++++ + man-pages/man3/if_nametoindex.3 | 13 ++++++ + man-pages/man3/ilogb.3 | 14 ++++++ + man-pages/man3/index.3 | 13 ++++++ + man-pages/man3/inet.3 | 22 +++++++++ + man-pages/man3/inet_pton.3 | 12 +++++ + man-pages/man3/isalpha.3 | 43 ++++++++++++++++++ + man-pages/man3/isatty.3 | 12 +++++ + man-pages/man3/isgreater.3 | 19 ++++++++ + man-pages/man3/iswalnum.3 | 12 +++++ + man-pages/man3/iswalpha.3 | 12 +++++ + man-pages/man3/iswblank.3 | 12 +++++ + man-pages/man3/iswcntrl.3 | 12 +++++ + man-pages/man3/iswctype.3 | 12 +++++ + man-pages/man3/iswlower.3 | 12 +++++ + man-pages/man3/iswprint.3 | 12 +++++ + man-pages/man3/iswpunct.3 | 12 +++++ + man-pages/man3/iswspace.3 | 12 +++++ + man-pages/man3/iswupper.3 | 12 +++++ + man-pages/man3/iswxdigit.3 | 12 +++++ + man-pages/man3/j0.3 | 24 ++++++++++ + man-pages/man3/ldexp.3 | 14 ++++++ + man-pages/man3/lio_listio.3 | 13 ++++++ + man-pages/man3/localeconv.3 | 14 ++++-- + man-pages/man3/lockf.3 | 12 +++++ + man-pages/man3/log10.3 | 14 ++++++ + man-pages/man3/log1p.3 | 14 ++++++ + man-pages/man3/logb.3 | 14 ++++++ + man-pages/man3/lrint.3 | 18 ++++++++ + man-pages/man3/lround.3 | 18 ++++++++ + man-pages/man3/makecontext.3 | 15 +++++++ + man-pages/man3/makedev.3 | 14 ++++++ + man-pages/man3/malloc.3 | 15 +++++++ + man-pages/man3/malloc_usable_size.3 | 12 +++++ + man-pages/man3/mblen.3 | 13 ++++-- + man-pages/man3/mbrlen.3 | 14 ++++-- + man-pages/man3/mbrtowc.3 | 14 ++++-- + man-pages/man3/mbsinit.3 | 12 +++++ + man-pages/man3/mbstowcs.3 | 12 +++++ + man-pages/man3/mbtowc.3 | 12 +++++ + man-pages/man3/memccpy.3 | 12 +++++ + man-pages/man3/memchr.3 | 14 ++++++ + man-pages/man3/memcmp.3 | 12 +++++ + man-pages/man3/memcpy.3 | 12 +++++ + man-pages/man3/memfrob.3 | 12 +++++ + man-pages/man3/memmem.3 | 12 +++++ + man-pages/man3/memmove.3 | 12 +++++ + man-pages/man3/mempcpy.3 | 13 ++++++ + man-pages/man3/memset.3 | 12 +++++ + man-pages/man3/mkdtemp.3 | 12 +++++ + man-pages/man3/mkfifo.3 | 13 ++++++ + man-pages/man3/mkstemp.3 | 16 +++++++ + man-pages/man3/mktemp.3 | 12 +++++ + man-pages/man3/modf.3 | 14 ++++-- + man-pages/man3/mq_close.3 | 12 +++++ + man-pages/man3/mq_getattr.3 | 13 ++++++ + man-pages/man3/mq_open.3 | 12 +++++ + man-pages/man3/mq_receive.3 | 13 ++++++ + man-pages/man3/mq_send.3 | 13 ++++++ + man-pages/man3/mq_unlink.3 | 12 +++++ + man-pages/man3/mtrace.3 | 13 ++++++ + man-pages/man3/nan.3 | 14 ++++++ + man-pages/man3/nextafter.3 | 19 ++++++++ + man-pages/man3/nl_langinfo.3 | 13 +++++- + man-pages/man3/opendir.3 | 13 ++++++ + man-pages/man3/posix_fallocate.3 | 12 +++++ + man-pages/man3/posix_openpt.3 | 12 +++++ + man-pages/man3/pow.3 | 14 ++++++ + man-pages/man3/pow10.3 | 14 ++++++ + man-pages/man3/pthread_attr_setdetachstate.3 | 13 ++++++ + man-pages/man3/pthread_attr_setguardsize.3 | 13 ++++++ + man-pages/man3/pthread_attr_setinheritsched.3 | 13 ++++++ + man-pages/man3/pthread_attr_setschedparam.3 | 13 ++++++ + man-pages/man3/pthread_attr_setschedpolicy.3 | 13 ++++++ + man-pages/man3/pthread_attr_setscope.3 | 13 ++++++ + man-pages/man3/pthread_attr_setstack.3 | 13 ++++++ + man-pages/man3/pthread_attr_setstackaddr.3 | 13 ++++++ + man-pages/man3/pthread_attr_setstacksize.3 | 13 ++++++ + man-pages/man3/pthread_equal.3 | 12 +++++ + man-pages/man3/pthread_exit.3 | 12 +++++ + man-pages/man3/pthread_getcpuclockid.3 | 12 +++++ + man-pages/man3/pthread_kill.3 | 12 +++++ + man-pages/man3/pthread_kill_other_threads_np.3 | 12 +++++ + man-pages/man3/pthread_self.3 | 12 +++++ + man-pages/man3/pthread_setaffinity_np.3 | 13 ++++++ + man-pages/man3/pthread_setcancelstate.3 | 24 ++++++++++ + man-pages/man3/pthread_setconcurrency.3 | 13 ++++++ + man-pages/man3/pthread_setschedparam.3 | 13 ++++++ + man-pages/man3/pthread_setschedprio.3 | 12 +++++ + man-pages/man3/pthread_sigmask.3 | 12 +++++ + man-pages/man3/pthread_sigqueue.3 | 12 +++++ + man-pages/man3/pthread_testcancel.3 | 12 +++++ + man-pages/man3/pthread_yield.3 | 12 +++++ + man-pages/man3/ptsname.3 | 18 +++++--- + man-pages/man3/putenv.3 | 12 +++++ + man-pages/man3/puts.3 | 16 +++++++ + man-pages/man3/putwchar.3 | 12 +++++ + man-pages/man3/qecvt.3 | 21 ++++++--- + man-pages/man3/raise.3 | 12 +++++ + man-pages/man3/rand.3 | 16 ++++++- + man-pages/man3/random.3 | 16 +++++++ + man-pages/man3/random_r.3 | 16 +++++++ + man-pages/man3/re_comp.3 | 16 ++++--- + man-pages/man3/readdir.3 | 18 +++++--- + man-pages/man3/realpath.3 | 12 +++++ + man-pages/man3/regex.3 | 19 ++++++++ + man-pages/man3/remainder.3 | 19 ++++++++ + man-pages/man3/remove.3 | 12 +++++ + man-pages/man3/remquo.3 | 14 ++++++ + man-pages/man3/rewinddir.3 | 12 +++++ + man-pages/man3/rexec.3 | 16 ++++--- + man-pages/man3/rint.3 | 19 ++++++++ + man-pages/man3/round.3 | 14 ++++-- + man-pages/man3/scalb.3 | 14 ++++++ + man-pages/man3/scalbln.3 | 15 +++++-- + man-pages/man3/sched_getcpu.3 | 12 +++++ + man-pages/man3/seekdir.3 | 12 +++++ + man-pages/man3/sem_destroy.3 | 12 +++++ + man-pages/man3/sem_getvalue.3 | 12 +++++ + man-pages/man3/sem_init.3 | 12 +++++ + man-pages/man3/sem_post.3 | 12 +++++ + man-pages/man3/sem_unlink.3 | 12 +++++ + man-pages/man3/sem_wait.3 | 14 ++++++ + man-pages/man3/setbuf.3 | 16 +++++++ + man-pages/man3/setenv.3 | 13 ++++++ + man-pages/man3/siginterrupt.3 | 12 +++++ + man-pages/man3/signbit.3 | 13 ++++-- + man-pages/man3/sigpause.3 | 12 +++++ + man-pages/man3/sigqueue.3 | 12 +++++ + man-pages/man3/sigset.3 | 16 +++++++ + man-pages/man3/sigsetops.3 | 22 +++++++++ + man-pages/man3/sigvec.3 | 23 ++++++++++ + man-pages/man3/sigwait.3 | 12 +++++ + man-pages/man3/sin.3 | 14 ++++++ + man-pages/man3/sincos.3 | 14 ++++++ + man-pages/man3/sinh.3 | 14 ++++++ + man-pages/man3/sockatmark.3 | 12 +++++ + man-pages/man3/sqrt.3 | 14 ++++++ + man-pages/man3/statvfs.3 | 13 ++++++ + man-pages/man3/stdarg.3 | 17 +++++++ + man-pages/man3/stdio_ext.3 | 27 ++++++----- + man-pages/man3/stpcpy.3 | 12 +++++ + man-pages/man3/stpncpy.3 | 12 +++++ + man-pages/man3/strcasecmp.3 | 13 ++++++ + man-pages/man3/strcat.3 | 13 ++++++ + man-pages/man3/strchr.3 | 14 ++++++ + man-pages/man3/strcmp.3 | 13 ++++++ + man-pages/man3/strcpy.3 | 13 ++++++ + man-pages/man3/strerror.3 | 20 +++++++++ + man-pages/man3/strfmon.3 | 13 ++++++ + man-pages/man3/strfry.3 | 12 +++++ + man-pages/man3/strftime.3 | 12 +++++ + man-pages/man3/strlen.3 | 12 +++++ + man-pages/man3/strnlen.3 | 12 +++++ + man-pages/man3/strpbrk.3 | 12 +++++ + man-pages/man3/strptime.3 | 12 +++++ + man-pages/man3/strsep.3 | 12 +++++ + man-pages/man3/strspn.3 | 13 ++++++ + man-pages/man3/strstr.3 | 15 +++++++ + man-pages/man3/strtod.3 | 14 ++++++ + man-pages/man3/strtoimax.3 | 13 ++++++ + man-pages/man3/strtok.3 | 18 +++++--- + man-pages/man3/strtol.3 | 14 ++++++ + man-pages/man3/strtoul.3 | 14 ++++++ + man-pages/man3/strverscmp.3 | 12 +++++ + man-pages/man3/strxfrm.3 | 12 +++++ + man-pages/man3/swab.3 | 12 +++++ + man-pages/man3/syslog.3 | 17 +++++++ + man-pages/man3/system.3 | 12 +++++ + man-pages/man3/sysv_signal.3 | 12 +++++ + man-pages/man3/tan.3 | 14 ++++++ + man-pages/man3/tanh.3 | 14 ++++++ + man-pages/man3/tcgetpgrp.3 | 13 ++++++ + man-pages/man3/tcgetsid.3 | 12 +++++ + man-pages/man3/telldir.3 | 12 +++++ + man-pages/man3/tempnam.3 | 12 +++++ + man-pages/man3/termios.3 | 29 ++++++++++++ + man-pages/man3/tgamma.3 | 14 ++++++ + man-pages/man3/timegm.3 | 13 ++++++ + man-pages/man3/tmpfile.3 | 12 +++++ + man-pages/man3/tmpnam.3 | 19 +++++--- + man-pages/man3/toascii.3 | 12 +++++ + man-pages/man3/toupper.3 | 16 +++++++ + man-pages/man3/towctrans.3 | 12 +++++ + man-pages/man3/towlower.3 | 19 ++++++++ + man-pages/man3/towupper.3 | 19 ++++++++ + man-pages/man3/trunc.3 | 14 ++++-- + man-pages/man3/tsearch.3 | 21 +++++++++ + man-pages/man3/ttyname.3 | 18 +++++--- + man-pages/man3/ttyslot.3 | 15 ++++--- + man-pages/man3/tzset.3 | 12 +++++ + man-pages/man3/ualarm.3 | 12 +++++ + man-pages/man3/ungetwc.3 | 12 +++++ + man-pages/man3/unlockpt.3 | 12 +++++ + man-pages/man3/usleep.3 | 12 +++++ + man-pages/man3/wcpcpy.3 | 12 +++++ + man-pages/man3/wcpncpy.3 | 12 +++++ + man-pages/man3/wcscasecmp.3 | 12 +++++ + man-pages/man3/wcscat.3 | 12 +++++ + man-pages/man3/wcschr.3 | 12 +++++ + man-pages/man3/wcscmp.3 | 12 +++++ + man-pages/man3/wcscpy.3 | 12 +++++ + man-pages/man3/wcscspn.3 | 12 +++++ + man-pages/man3/wcsdup.3 | 13 ++++++ + man-pages/man3/wcslen.3 | 12 +++++ + man-pages/man3/wcsncasecmp.3 | 12 +++++ + man-pages/man3/wcsncat.3 | 12 +++++ + man-pages/man3/wcsncmp.3 | 12 +++++ + man-pages/man3/wcsncpy.3 | 12 +++++ + man-pages/man3/wcsnlen.3 | 12 +++++ + man-pages/man3/wcspbrk.3 | 12 +++++ + man-pages/man3/wcsrchr.3 | 12 +++++ + man-pages/man3/wcsspn.3 | 12 +++++ + man-pages/man3/wcsstr.3 | 12 +++++ + man-pages/man3/wcstoimax.3 | 13 ++++++ + man-pages/man3/wcstok.3 | 12 +++++ + man-pages/man3/wcswidth.3 | 12 +++++ + man-pages/man3/wctomb.3 | 12 +++++ + man-pages/man3/wctrans.3 | 12 +++++ + man-pages/man3/wctype.3 | 12 +++++ + man-pages/man3/wcwidth.3 | 12 +++++ + man-pages/man3/wmemchr.3 | 12 +++++ + man-pages/man3/wmemcmp.3 | 12 +++++ + man-pages/man3/wmemcpy.3 | 12 +++++ + man-pages/man3/wmemmove.3 | 12 +++++ + man-pages/man3/wmemset.3 | 12 +++++ + man-pages/man3/y0.3 | 24 ++++++++++ + man-pages/man7/man-pages.7 | 1 + + man-pages/man7/pthreads.7 | 1 + + man-pages/man7/standards.7 | 1 + + 376 files changed, 5119 insertions(+), 293 deletions(-) + +diff --git a/man-pages/en/man3/encrypt.3 b/man-pages/en/man3/encrypt.3 +index 138db03..4f0f2a8 100644 +--- a/man-pages/en/man3/encrypt.3 ++++ b/man-pages/en/man3/encrypt.3 +@@ -1,4 +1,4 @@ +-.\" Copyright 2000 Nicolás Lichtmaier ++.\" Copyright 2000 Nicol�s Lichtmaier + .\" Created 2000-07-22 00:52-0300 + .\" + .\" %%%LICENSE_START(GPLv2+_DOC_FULL) +@@ -122,18 +122,22 @@ On success, it is unchanged. + The function is not provided. + (For example because of former USA export restrictions.) + .SH ATTRIBUTES +-.SS Multithreading (see pthreads(7)) +-The +-.BR encrypt () +-and ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw23 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR encrypt (), + .BR setkey () +-functions are not thread-safe. +-.LP +-The +-.BR encrypt_r () +-and ++T} Thread safety MT-Unsafe race:crypt ++T{ ++.BR encrypt_r (), + .BR setkey_r () +-functions are thread-safe. ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + The functions + .BR encrypt () +diff --git a/man-pages/en/man3/fclose.3 b/man-pages/en/man3/fclose.3 +index d39415a..5465b6b 100644 +--- a/man-pages/en/man3/fclose.3 ++++ b/man-pages/en/man3/fclose.3 +@@ -39,7 +39,7 @@ + .\" + .\" Converted for Linux, Mon Nov 29 15:19:14 1993, faith@cs.unc.edu + .\" +-.\" Modified 2000-07-22 by Nicolás Lichtmaier ++.\" Modified 2000-07-22 by Nicol�s Lichtmaier + .\" + .TH FCLOSE 3 2009-02-23 "GNU" "Linux Programmer's Manual" + .SH NAME +@@ -87,6 +87,18 @@ for any of the errors specified for the routines + .BR write (2) + or + .BR fflush (3). ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR fclose () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C89, C99. + .SH NOTES +diff --git a/man-pages/en/man3/fflush.3 b/man-pages/en/man3/fflush.3 +index 563a9f5..fa9ff4e 100644 +--- a/man-pages/en/man3/fflush.3 ++++ b/man-pages/en/man3/fflush.3 +@@ -39,7 +39,7 @@ + .\" + .\" Converted for Linux, Mon Nov 29 15:22:01 1993, faith@cs.unc.edu + .\" +-.\" Modified 2000-07-22 by Nicolás Lichtmaier ++.\" Modified 2000-07-22 by Nicol�s Lichtmaier + .\" Modified 2001-10-16 by John Levon + .\" + .TH FFLUSH 3 2013-07-15 "GNU" "Linux Programmer's Manual" +@@ -91,10 +91,17 @@ may also fail and set + for any of the errors specified for + .BR write (2). + .SH ATTRIBUTES +-.SS Multithreading (see pthreads(7)) +-The ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ + .BR fflush () +-function is thread-safe. ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C89, C99, POSIX.1-2001, POSIX.1-2008. + +diff --git a/man-pages/en/man3/lockf.3 b/man-pages/en/man3/lockf.3 +index 54e6c37..7509bc2 100644 +--- a/man-pages/en/man3/lockf.3 ++++ b/man-pages/en/man3/lockf.3 +@@ -1,4 +1,4 @@ +-.\" Copyright 1997 Nicolás Lichtmaier ++.\" Copyright 1997 Nicol�s Lichtmaier + .\" Created Thu Aug 7 00:44:00 ART 1997 + .\" + .\" %%%LICENSE_START(GPLv2+_DOC_FULL) +@@ -151,6 +151,18 @@ An invalid operation was specified in + .TP + .B ENOLCK + Too many segment locks open, lock table is full. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR lockf () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + SVr4, POSIX.1-2001. + .SH SEE ALSO +diff --git a/man-pages/en/man3/rand.3 b/man-pages/en/man3/rand.3 +index f31e4bf..f6de7f8 100644 +--- a/man-pages/en/man3/rand.3 ++++ b/man-pages/en/man3/rand.3 +@@ -33,7 +33,7 @@ + .\" Modified 1995-05-18, Rik Faith (faith@cs.unc.edu) to add + .\" better discussion of problems with rand on other systems. + .\" (Thanks to Esa Hyyti{ (ehyytia@snakemail.hut.fi).) +-.\" Modified 1998-04-10, Nicolás Lichtmaier ++.\" Modified 1998-04-10, Nicol�s Lichtmaier + .\" with contribution from Francesco Potorti + .\" Modified 2003-11-15, aeb, added rand_r + .\" 2010-09-13, mtk, added example program +@@ -81,7 +81,7 @@ function is automatically seeded with a value of 1. + .PP + The function + .BR rand () +-is not reentrant or thread-safe, since it ++is not reentrant, since it + uses hidden state that is modified on each call. + This might just be the seed value to be used by the next call, + or it might be something more elaborate. +@@ -126,6 +126,20 @@ functions return a value between 0 and + The + .BR srand () + function returns no value. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw25 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR rand (), ++.BR rand_r (), ++.BR srand () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + The functions + .BR rand () +diff --git a/man-pages/en/man3/strtok.3 b/man-pages/en/man3/strtok.3 +index 4bc9727..b836310 100644 +--- a/man-pages/en/man3/strtok.3 ++++ b/man-pages/en/man3/strtok.3 +@@ -25,7 +25,7 @@ + .\" %%%LICENSE_END + .\" + .\" Rewritten old page, 960210, aeb@cwi.nl +-.\" Updated, added strtok_r. 2000-02-13 Nicolás Lichtmaier ++.\" Updated, added strtok_r. 2000-02-13 Nicol�s Lichtmaier + .\" 2005-11-17, mtk: Substantial parts rewritten + .\" 2013-05-19, mtk: added much further detail on the operation of strtok() + .\" +@@ -167,14 +167,20 @@ and + functions return a pointer to + the next token, or NULL if there are no more tokens. + .SH ATTRIBUTES +-.SS Multithreading (see pthreads(7)) +-The ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ + .BR strtok () +-function is not thread-safe. +-.LP +-The ++T} Thread safety MT-Unsafe race:strtok ++T{ + .BR strtok_r () +-function is thread-safe. ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + .TP + .BR strtok () +diff --git a/man-pages/en/man3/toupper.3 b/man-pages/en/man3/toupper.3 +index 1be88cd..abc0c0f 100644 +--- a/man-pages/en/man3/toupper.3 ++++ b/man-pages/en/man3/toupper.3 +@@ -23,7 +23,7 @@ + .\" %%%LICENSE_END + .\" + .\" Modified Sat Jul 24 17:45:39 1993 by Rik Faith (faith@cs.unc.edu) +-.\" Modified 2000-02-13 by Nicolás Lichtmaier ++.\" Modified 2000-02-13 by Nicol�s Lichtmaier + .TH TOUPPER 3 1993-04-04 "GNU" "Linux Programmer's Manual" + .SH NAME + toupper, tolower \- convert letter to upper or lower case +@@ -58,6 +58,22 @@ is undefined. + The value returned is that of the converted letter, or + .I c + if the conversion was not possible. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw24 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR toupper (), ++.BR tolower (), ++.br ++.BR toupper_l (), ++.BR tolower_l () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C89, C99, 4.3BSD. + .SH BUGS +diff --git a/man-pages/man3/a64l.3 b/man-pages/man3/a64l.3 +index 377a89c..291682b 100644 +--- a/man-pages/man3/a64l.3 ++++ b/man-pages/man3/a64l.3 +@@ -1,3 +1,4 @@ ++\t + .\" Copyright 2002 walter harms (walter.harms@informatik.uni-oldenburg.de) + .\" + .\" %%%LICENSE_START(GPL_NOVERSION_ONELINE) +@@ -60,14 +61,20 @@ a-z represent 38-63 + .RE + So 123 = 59*64^0 + 1*64^1 = "v/". + .SH ATTRIBUTES +-.SS Multithreading (see pthreads(7)) +-The ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ + .BR l64a () +-function is not thread-safe. +-.LP +-The ++T} Thread safety MT-Unsafe race:l64a ++T{ + .BR a64l () +-function is thread-safe. ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + POSIX.1-2001. + .SH NOTES +diff --git a/man-pages/man3/abort.3 b/man-pages/man3/abort.3 +index 9a3a697..efaf9aa 100644 +--- a/man-pages/man3/abort.3 ++++ b/man-pages/man3/abort.3 +@@ -69,6 +69,18 @@ and then raising the signal for a second time. + The + .BR abort () + function never returns. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++ .BR abort () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + SVr4, POSIX.1-2001, 4.3BSD, C89, C99. + .SH SEE ALSO +diff --git a/man-pages/man3/abs.3 b/man-pages/man3/abs.3 +index ee75184..3d95a40 100644 +--- a/man-pages/man3/abs.3 ++++ b/man-pages/man3/abs.3 +@@ -80,14 +80,22 @@ appropriate integer type for the function. + Returns the absolute value of the integer argument, of the appropriate + integer type for the function. + .SH ATTRIBUTES +-.SS Multithreading (see pthreads(7)) +-The ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.ad l ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ + .BR abs (), + .BR labs (), + .BR llabs (), +-and + .BR imaxabs () +-functions are thread-safe. ++T} Thread safety MT-Safe ++.TE ++.ad + .SH CONFORMING TO + SVr4, POSIX.1-2001, 4.3BSD, C99. + .\" POSIX.1 (1996 edition) requires only the +diff --git a/man-pages/man3/acos.3 b/man-pages/man3/acos.3 +index 9519675..273867b 100644 +--- a/man-pages/man3/acos.3 ++++ b/man-pages/man3/acos.3 +@@ -110,6 +110,20 @@ is set to + An invalid floating-point exception + .RB ( FE_INVALID ) + is raised. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw24 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR acos (), ++.BR acosf (), ++.BR acosl () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99, POSIX.1-2001. + The variant returning +diff --git a/man-pages/man3/acosh.3 b/man-pages/man3/acosh.3 +index 7c42471..1c5b28e 100644 +--- a/man-pages/man3/acosh.3 ++++ b/man-pages/man3/acosh.3 +@@ -117,6 +117,20 @@ is set to + An invalid floating-point exception + .RB ( FE_INVALID ) + is raised. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw28 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR acosh (), ++.BR acoshf (), ++.BR acoshl () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99, POSIX.1-2001. + The variant returning +diff --git a/man-pages/man3/addseverity.3 b/man-pages/man3/addseverity.3 +index 2457ffe..f2b135c 100644 +--- a/man-pages/man3/addseverity.3 ++++ b/man-pages/man3/addseverity.3 +@@ -57,6 +57,18 @@ nonexistent or default severity class. + .SH VERSIONS + .BR addseverity () + is provided in glibc since version 2.1. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR addseverity () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + This function is not specified in the X/Open Portability Guide + although the +diff --git a/man-pages/man3/adjtime.3 b/man-pages/man3/adjtime.3 +index ada10da..5fa8b89 100644 +--- a/man-pages/man3/adjtime.3 ++++ b/man-pages/man3/adjtime.3 +@@ -99,6 +99,18 @@ The caller does not have sufficient privilege to adjust the time. + Under Linux the + .B CAP_SYS_TIME + capability is required. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR adjtime () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + 4.3BSD, System V. + .SH NOTES +diff --git a/man-pages/man3/aio_cancel.3 b/man-pages/man3/aio_cancel.3 +index 5f60253..7bdb733 100644 +--- a/man-pages/man3/aio_cancel.3 ++++ b/man-pages/man3/aio_cancel.3 +@@ -111,6 +111,18 @@ is not implemented. + The + .BR aio_cancel () + function is available since glibc 2.1. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR aio_cancel () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + POSIX.1-2001, POSIX.1-2008. + .SH EXAMPLE +diff --git a/man-pages/man3/aio_error.3 b/man-pages/man3/aio_error.3 +index f0d4601..21099ac 100644 +--- a/man-pages/man3/aio_error.3 ++++ b/man-pages/man3/aio_error.3 +@@ -80,10 +80,17 @@ The + .BR aio_error () + function is available since glibc 2.1. + .SH ATTRIBUTES +-.SS Multithreading (see pthreads(7)) +-The ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ + .BR aio_error () +-function is thread-safe. ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + POSIX.1-2001, POSIX.1-2008. + .SH EXAMPLE +diff --git a/man-pages/man3/aio_fsync.3 b/man-pages/man3/aio_fsync.3 +index 8a1a7b6..3e43184 100644 +--- a/man-pages/man3/aio_fsync.3 ++++ b/man-pages/man3/aio_fsync.3 +@@ -100,6 +100,18 @@ is not implemented. + The + .BR aio_fsync () + function is available since glibc 2.1. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR aio_fsync () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + POSIX.1-2001, POSIX.1-2008. + .SH SEE ALSO +diff --git a/man-pages/man3/aio_read.3 b/man-pages/man3/aio_read.3 +index 0cff75c..e989f69 100644 +--- a/man-pages/man3/aio_read.3 ++++ b/man-pages/man3/aio_read.3 +@@ -129,6 +129,18 @@ the maximum offset for this file. + The + .BR aio_read () + function is available since glibc 2.1. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR aio_read () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + POSIX.1-2001, POSIX.1-2008. + .SH NOTES +diff --git a/man-pages/man3/aio_return.3 b/man-pages/man3/aio_return.3 +index 764ff65..f397567 100644 +--- a/man-pages/man3/aio_return.3 ++++ b/man-pages/man3/aio_return.3 +@@ -75,10 +75,17 @@ The + .BR aio_return () + function is available since glibc 2.1. + .SH ATTRIBUTES +-.SS Multithreading (see pthreads(7)) +-The ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ + .BR aio_return () +-function is thread-safe. ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + POSIX.1-2001, POSIX.1-2008. + .SH EXAMPLE +diff --git a/man-pages/man3/aio_suspend.3 b/man-pages/man3/aio_suspend.3 +index 599fd70..52ce1b5 100644 +--- a/man-pages/man3/aio_suspend.3 ++++ b/man-pages/man3/aio_suspend.3 +@@ -104,6 +104,18 @@ is not implemented. + The + .BR aio_suspend () + function is available since glibc 2.1. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR aio_suspend () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + POSIX.1-2001, POSIX.1-2008. + .SH NOTES +diff --git a/man-pages/man3/aio_write.3 b/man-pages/man3/aio_write.3 +index 5b68326..4b3c712 100644 +--- a/man-pages/man3/aio_write.3 ++++ b/man-pages/man3/aio_write.3 +@@ -134,6 +134,18 @@ is not implemented. + The + .BR aio_write () + function is available since glibc 2.1. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR aio_write () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + POSIX.1-2001, POSIX.1-2008. + .SH NOTES +diff --git a/man-pages/man3/alloca.3 b/man-pages/man3/alloca.3 +index c1d9672..168ac19 100644 +--- a/man-pages/man3/alloca.3 ++++ b/man-pages/man3/alloca.3 +@@ -62,6 +62,18 @@ The + .BR alloca () + function returns a pointer to the beginning of the allocated space. + If the allocation causes stack overflow, program behavior is undefined. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR alloca () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + This function is not in POSIX.1-2001. + +diff --git a/man-pages/man3/argz_add.3 b/man-pages/man3/argz_add.3 +index 407de8c..137d5a4 100644 +--- a/man-pages/man3/argz_add.3 ++++ b/man-pages/man3/argz_add.3 +@@ -195,6 +195,35 @@ All argz functions that do memory allocation have a return type of + and return 0 for success, and + .B ENOMEM + if an allocation error occurs. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw33 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR argz_add (), ++.BR argz_add_sep (), ++.br ++.BR argz_append (), ++.BR argz_count (), ++.br ++.BR argz_create (), ++.BR argz_create_sep (), ++.br ++.BR argz_delete (), ++.BR argz_extract (), ++.br ++.BR argz_insert (), ++.BR argz_next (), ++.br ++.BR argz_replace (), ++.BR argz_stringify () ++T} Thread safety MT-Safe ++.TE ++ + .SH CONFORMING TO + These functions are a GNU extension. + Handle with care. +diff --git a/man-pages/man3/asin.3 b/man-pages/man3/asin.3 +index fee2f20..f4a03fa 100644 +--- a/man-pages/man3/asin.3 ++++ b/man-pages/man3/asin.3 +@@ -108,6 +108,20 @@ is set to + An invalid floating-point exception + .RB ( FE_INVALID ) + is raised. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw24 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR asin (), ++.BR asinf (), ++.BR asinl () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99, POSIX.1-2001. + The variant returning +diff --git a/man-pages/man3/asinh.3 b/man-pages/man3/asinh.3 +index ab2ec80..1f9ed24 100644 +--- a/man-pages/man3/asinh.3 ++++ b/man-pages/man3/asinh.3 +@@ -102,6 +102,20 @@ positive infinity (negative infinity) is returned. + .\" glibc 2.8 does not do this. + .SH ERRORS + No errors occur. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw27 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR asinh (), ++.BR asinhf (), ++.BR asinhl () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99, POSIX.1-2001. + The variant returning +diff --git a/man-pages/man3/assert.3 b/man-pages/man3/assert.3 +index e6033e2..505531c 100644 +--- a/man-pages/man3/assert.3 ++++ b/man-pages/man3/assert.3 +@@ -56,6 +56,19 @@ The message "assertion failed in file foo.c, function + do_bar(), line 1287" is of no help at all to a user. + .SH RETURN VALUE + No value is returned. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR assert () ++T} Thread safety MT-Safe ++.TE ++ + .SH CONFORMING TO + POSIX.1-2001, C89, C99. + In C89, +diff --git a/man-pages/man3/assert_perror.3 b/man-pages/man3/assert_perror.3 +index e1fd0a9..e84508b 100644 +--- a/man-pages/man3/assert_perror.3 ++++ b/man-pages/man3/assert_perror.3 +@@ -56,6 +56,19 @@ line number of the macro call, and the output of + .IR strerror(errnum) . + .SH RETURN VALUE + No value is returned. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR assert_perror () ++T} Thread safety MT-Safe ++.TE ++ + .SH CONFORMING TO + This is a GNU extension. + .SH BUGS +diff --git a/man-pages/man3/atan.3 b/man-pages/man3/atan.3 +index 098c7af..a12f249 100644 +--- a/man-pages/man3/atan.3 ++++ b/man-pages/man3/atan.3 +@@ -93,6 +93,20 @@ is positive infinity (negative infinity), +pi/2 (\-pi/2) is returned. + .\" glibc 2.8 does not do this. + .SH ERRORS + No errors occur. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw24 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR atan (), ++.BR atanf (), ++.BR atanl () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99, POSIX.1-2001. + The variant returning +diff --git a/man-pages/man3/atan2.3 b/man-pages/man3/atan2.3 +index b7cd08b..e0db75e 100644 +--- a/man-pages/man3/atan2.3 ++++ b/man-pages/man3/atan2.3 +@@ -163,6 +163,20 @@ is positive infinity, +pi/4 (\-pi/4) is returned. + No errors occur. + .\" POSIX.1 documents an optional underflow error + .\" glibc 2.8 does not do this. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw28 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR atan2 (), ++.BR atan2f (), ++.BR atan2l () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99, POSIX.1-2001. + The variant returning +diff --git a/man-pages/man3/atanh.3 b/man-pages/man3/atanh.3 +index 56211f6..07bd826 100644 +--- a/man-pages/man3/atanh.3 ++++ b/man-pages/man3/atanh.3 +@@ -136,6 +136,20 @@ is set to + A divide-by-zero floating-point exception + .RB ( FE_DIVBYZERO ) + is raised. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw28 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR atanh (), ++.BR atanhf (), ++.BR atanhl () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99, POSIX.1-2001. + The variant returning +diff --git a/man-pages/man3/atof.3 b/man-pages/man3/atof.3 +index 62d151f..8ba930f 100644 +--- a/man-pages/man3/atof.3 ++++ b/man-pages/man3/atof.3 +@@ -54,6 +54,18 @@ except that + does not detect errors. + .SH RETURN VALUE + The converted value. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++ .BR atof () ++T} Thread safety MT-Safe locale ++.TE + .SH CONFORMING TO + SVr4, POSIX.1-2001, 4.3BSD, C89, C99. + .SH SEE ALSO +diff --git a/man-pages/man3/atoi.3 b/man-pages/man3/atoi.3 +index 8f9c1ea..99eee1c 100644 +--- a/man-pages/man3/atoi.3 ++++ b/man-pages/man3/atoi.3 +@@ -90,6 +90,20 @@ is an obsolete name for + .BR atoll (). + .SH RETURN VALUE + The converted value. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw23 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR atoi (), ++.BR atol (), ++.BR atoll () ++T} Thread safety MT-Safe locale ++.TE + .SH CONFORMING TO + SVr4, POSIX.1-2001, 4.3BSD, C99. + C89 and +diff --git a/man-pages/man3/backtrace.3 b/man-pages/man3/backtrace.3 +index e8e9da9..79e1aec 100644 +--- a/man-pages/man3/backtrace.3 ++++ b/man-pages/man3/backtrace.3 +@@ -140,6 +140,22 @@ on error, NULL is returned. + and + .BR backtrace_symbols_fd () + are provided in glibc since version 2.1. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw22 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR backtrace (), ++.br ++.BR backtrace_symbols (), ++.br ++.BR backtrace_symbols_fd () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + These functions are GNU extensions. + .SH NOTES +diff --git a/man-pages/man3/basename.3 b/man-pages/man3/basename.3 +index 1cca6d8..5c87942 100644 +--- a/man-pages/man3/basename.3 ++++ b/man-pages/man3/basename.3 +@@ -126,6 +126,19 @@ and + return pointers to null-terminated strings. + (Do not pass these pointers to + .BR free (3).) ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw22 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR basename (), ++.BR dirname () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + POSIX.1-2001. + .SH NOTES +diff --git a/man-pages/man3/bcmp.3 b/man-pages/man3/bcmp.3 +index ef964a1..293b25a 100644 +--- a/man-pages/man3/bcmp.3 ++++ b/man-pages/man3/bcmp.3 +@@ -58,6 +58,18 @@ The + .BR bcmp () + function returns 0 if the byte sequences are equal, + otherwise a nonzero result is returned. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR bcmp () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + 4.3BSD. + This function is deprecated (marked as LEGACY in POSIX.1-2001): use +diff --git a/man-pages/man3/bcopy.3 b/man-pages/man3/bcopy.3 +index 13baa05..26d10fe 100644 +--- a/man-pages/man3/bcopy.3 ++++ b/man-pages/man3/bcopy.3 +@@ -51,6 +51,18 @@ to + The result is correct, even when both areas overlap. + .SH RETURN VALUE + None. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR bcopy () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + 4.3BSD. + This function is deprecated (marked as LEGACY in POSIX.1-2001): use +diff --git a/man-pages/man3/bindresvport.3 b/man-pages/man3/bindresvport.3 +index 8c5979b..5615e69 100644 +--- a/man-pages/man3/bindresvport.3 ++++ b/man-pages/man3/bindresvport.3 +@@ -90,17 +90,27 @@ is not NULL and + is not + .BR AF_INET . + .SH ATTRIBUTES +-.SS Multithreading (see pthreads(7)) +-Before glibc 2.17, the ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l lw23. ++Interface Attribute Value ++T{ + .BR bindresvport () +-function uses a static variable that is not protected, +-so it is not thread-safe. +- +-Since glibc 2.17, ++T} Thread safety T{ ++glibc >= 2.17: MT-Safe + .\" commit f6da27e53695ad1cc0e2a9490358decbbfdff5e5 +-the ++.br ++glibc < 2.17: MT-Unsafe ++T} ++.TE ++.PP ++The + .BR bindresvport () +-function uses a lock to protect static variable, so it is thread-safe. ++function uses a static variable that was not protected by a lock ++before glibc 2.17, rendering the function MT-Unsafe. + .SH CONFORMING TO + Not in POSIX.1-2001. + Present on the BSDs, Solaris, and many other systems. +diff --git a/man-pages/man3/bsd_signal.3 b/man-pages/man3/bsd_signal.3 +index 2ecec66..1f6270a 100644 +--- a/man-pages/man3/bsd_signal.3 ++++ b/man-pages/man3/bsd_signal.3 +@@ -60,6 +60,18 @@ on error. + .SH ERRORS + As for + .BR signal (2). ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR bsd_signal () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + 4.2BSD, POSIX.1-2001. + POSIX.1-2008 removes the specification of +diff --git a/man-pages/man3/btowc.3 b/man-pages/man3/btowc.3 +index ce96dbb..c93b58e 100644 +--- a/man-pages/man3/btowc.3 ++++ b/man-pages/man3/btowc.3 +@@ -46,6 +46,18 @@ If \fIc\fP is + or not a valid multibyte sequence of length 1, + it returns + .BR WEOF . ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR btowc () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99, POSIX.1-2001. + .SH NOTES +diff --git a/man-pages/man3/byteorder.3 b/man-pages/man3/byteorder.3 +index 5c0cc00..5d31bcf 100644 +--- a/man-pages/man3/byteorder.3 ++++ b/man-pages/man3/byteorder.3 +@@ -73,6 +73,21 @@ from network byte order to host byte order. + On the i386 the host byte order is Least Significant Byte first, + whereas the network byte order, as used on the Internet, is Most + Significant Byte first. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw34 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR htonl (), ++.BR htons (), ++.BR ntohl (), ++.BR ntohs () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + POSIX.1-2001. + +diff --git a/man-pages/man3/bzero.3 b/man-pages/man3/bzero.3 +index 35bc1f0..e94c75a 100644 +--- a/man-pages/man3/bzero.3 ++++ b/man-pages/man3/bzero.3 +@@ -47,6 +47,18 @@ bytes of the area starting at + to zero (bytes containing \(aq\\0\(aq). + .SH RETURN VALUE + None. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR bzero () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + 4.3BSD. + This function is deprecated (marked as LEGACY in POSIX.1-2001): use +diff --git a/man-pages/man3/cabs.3 b/man-pages/man3/cabs.3 +index 4c24a68..b0df7f2 100644 +--- a/man-pages/man3/cabs.3 ++++ b/man-pages/man3/cabs.3 +@@ -25,6 +25,20 @@ function returns the absolute value of the complex number + The result is a real number. + .SH VERSIONS + These functions first appeared in glibc in version 2.1. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw24 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR cabs (), ++.BR cabsf (), ++.BR cabsl () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99. + .SH NOTES +diff --git a/man-pages/man3/cacos.3 b/man-pages/man3/cacos.3 +index f5a140a..314b811 100644 +--- a/man-pages/man3/cacos.3 ++++ b/man-pages/man3/cacos.3 +@@ -35,6 +35,20 @@ One has: + .fi + .SH VERSIONS + These functions first appeared in glibc in version 2.1. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw28 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR cacos (), ++.BR cacosf (), ++.BR cacosl () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99. + .SH EXAMPLE +diff --git a/man-pages/man3/cacosh.3 b/man-pages/man3/cacosh.3 +index 7f33e55..bdf2c72 100644 +--- a/man-pages/man3/cacosh.3 ++++ b/man-pages/man3/cacosh.3 +@@ -38,6 +38,20 @@ One has: + .fi + .SH VERSIONS + These functions first appeared in glibc in version 2.1. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw30 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR cacosh (), ++.BR cacoshf (), ++.BR cacoshl () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99. + .SH EXAMPLE +diff --git a/man-pages/man3/canonicalize_file_name.3 b/man-pages/man3/canonicalize_file_name.3 +index 0aeef85..d9595a3 100644 +--- a/man-pages/man3/canonicalize_file_name.3 ++++ b/man-pages/man3/canonicalize_file_name.3 +@@ -70,6 +70,18 @@ to indicate the error. + .SH ERRORS + See + .BR realpath (3). ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw24 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR canonicalize_file_name () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + This function is a GNU extension. + .SH SEE ALSO +diff --git a/man-pages/man3/carg.3 b/man-pages/man3/carg.3 +index e00479b..7e8bada 100644 +--- a/man-pages/man3/carg.3 ++++ b/man-pages/man3/carg.3 +@@ -54,6 +54,20 @@ One has: + The return value is the range of [\-pi,pi]. + .SH VERSIONS + These functions first appeared in glibc in version 2.1. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw24 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR carg (), ++.BR cargf (), ++.BR cargl () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99. + .SH SEE ALSO +diff --git a/man-pages/man3/casin.3 b/man-pages/man3/casin.3 +index ea65d1e..9e75602 100644 +--- a/man-pages/man3/casin.3 ++++ b/man-pages/man3/casin.3 +@@ -34,6 +34,20 @@ One has: + .fi + .SH VERSIONS + These functions first appeared in glibc in version 2.1. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw28 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR casin (), ++.BR casinf (), ++.BR casinl () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99. + .SH SEE ALSO +diff --git a/man-pages/man3/casinh.3 b/man-pages/man3/casinh.3 +index 1e0fee3..67bfe2e 100644 +--- a/man-pages/man3/casinh.3 ++++ b/man-pages/man3/casinh.3 +@@ -34,6 +34,20 @@ One has: + .fi + .SH VERSIONS + These functions first appeared in glibc in version 2.1. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw30 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR casinh (), ++.BR casinhf (), ++.BR casinhl () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99. + .SH SEE ALSO +diff --git a/man-pages/man3/catan.3 b/man-pages/man3/catan.3 +index c25c979..f89dc37 100644 +--- a/man-pages/man3/catan.3 ++++ b/man-pages/man3/catan.3 +@@ -33,6 +33,20 @@ One has: + .fi + .SH VERSIONS + These functions first appeared in glibc in version 2.1. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw27 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR catan (), ++.BR catanf (), ++.BR catanl () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99. + .SH EXAMPLE +diff --git a/man-pages/man3/catanh.3 b/man-pages/man3/catanh.3 +index 7f1861c..d88766e 100644 +--- a/man-pages/man3/catanh.3 ++++ b/man-pages/man3/catanh.3 +@@ -35,6 +35,20 @@ One has: + .fi + .SH VERSIONS + These functions first appeared in glibc in version 2.1. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw30 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR catanh (), ++.BR catanhf (), ++.BR catanhl () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99. + .SH EXAMPLE +diff --git a/man-pages/man3/catgets.3 b/man-pages/man3/catgets.3 +index 17eca22..e46714a 100644 +--- a/man-pages/man3/catgets.3 ++++ b/man-pages/man3/catgets.3 +@@ -66,6 +66,18 @@ On failure, + .BR catgets () + returns the value + .IR message . ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR catgets () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + POSIX.1-2001. + .SH NOTES +diff --git a/man-pages/man3/catopen.3 b/man-pages/man3/catopen.3 +index 74ac4d2..b1ada5c 100644 +--- a/man-pages/man3/catopen.3 ++++ b/man-pages/man3/catopen.3 +@@ -143,6 +143,21 @@ is set to + The language to use if + .I flag + is 0. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR catopen () ++T} Thread safety MT-Safe env ++T{ ++.BR catclose () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + POSIX.1-2001. + .\" In XPG 1987, Vol. 3 it says: +diff --git a/man-pages/man3/cbrt.3 b/man-pages/man3/cbrt.3 +index 6378e37..55bf515 100644 +--- a/man-pages/man3/cbrt.3 ++++ b/man-pages/man3/cbrt.3 +@@ -87,6 +87,20 @@ is +0, \-0, positive infinity, negative infinity, or NaN, + is returned. + .SH ERRORS + No errors occur. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw24 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR cbrt (), ++.BR cbrtf (), ++.BR cbrtl () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99, POSIX.1-2001. + .\" .BR cbrt () +diff --git a/man-pages/man3/ceil.3 b/man-pages/man3/ceil.3 +index 8bf43e2..6fc8148 100644 +--- a/man-pages/man3/ceil.3 ++++ b/man-pages/man3/ceil.3 +@@ -79,13 +79,19 @@ itself is returned. + No errors occur. + POSIX.1-2001 documents a range error for overflows, but see NOTES. + .SH ATTRIBUTES +-.SS Multithreading (see pthreads(7)) +-The ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw24 lb lb ++l l l. ++Interface Attribute Value ++T{ + .BR ceil (), + .BR ceilf (), +-and + .BR ceill () +-functions are thread-safe. ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99, POSIX.1-2001. + The variant returning +diff --git a/man-pages/man3/cfree.3 b/man-pages/man3/cfree.3 +index 1177758..b84feab 100644 +--- a/man-pages/man3/cfree.3 ++++ b/man-pages/man3/cfree.3 +@@ -109,6 +109,18 @@ was not a pointer to a block previously allocated by + one of the routines in the + .BR malloc (3) + family. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR cfree () ++T} Thread safety MT-Safe /* In glibc */ ++.TE + .SH CONFORMING TO + The 3-argument version of + .BR cfree () +diff --git a/man-pages/man3/cimag.3 b/man-pages/man3/cimag.3 +index 66d8c8d..1540300 100644 +--- a/man-pages/man3/cimag.3 ++++ b/man-pages/man3/cimag.3 +@@ -31,13 +31,19 @@ One has: + .SH VERSIONS + These functions first appeared in glibc in version 2.1. + .SH ATTRIBUTES +-.SS Multithreading (see pthreads(7)) +-The ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw27 lb lb ++l l l. ++Interface Attribute Value ++T{ + .BR cimag (), + .BR cimagf (), +-and + .BR cimagl () +-functions are thread-safe. ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99. + .SH NOTES +diff --git a/man-pages/man3/clock_getcpuclockid.3 b/man-pages/man3/clock_getcpuclockid.3 +index c07955d..4dd1111 100644 +--- a/man-pages/man3/clock_getcpuclockid.3 ++++ b/man-pages/man3/clock_getcpuclockid.3 +@@ -86,10 +86,17 @@ The + .BR clock_getcpuclockid () + function is available in glibc since version 2.2. + .SH ATTRIBUTES +-.SS Multithreading (see pthreads(7)) +-The ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw21 lb lb ++l l l. ++Interface Attribute Value ++T{ + .BR clock_getcpuclockid () +-function is thread-safe. ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + POSIX.1-2001. + .SH NOTES +diff --git a/man-pages/man3/clog.3 b/man-pages/man3/clog.3 +index c14e19b..35fe44a 100644 +--- a/man-pages/man3/clog.3 ++++ b/man-pages/man3/clog.3 +@@ -38,6 +38,20 @@ Note that + close to zero will cause an overflow. + .SH VERSIONS + These functions first appeared in glibc in version 2.1. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw24 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR clog (), ++.BR clogf (), ++.BR clogl () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99. + .SH SEE ALSO +diff --git a/man-pages/man3/clog10.3 b/man-pages/man3/clog10.3 +index ac96dbb..790c8f5 100644 +--- a/man-pages/man3/clog10.3 ++++ b/man-pages/man3/clog10.3 +@@ -34,6 +34,20 @@ Note that + close to zero will cause an overflow. + .SH VERSIONS + These functions first appeared in glibc in version 2.1. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw30 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR clog10 (), ++.BR clog10f (), ++.BR clog10l () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + This function is a GNU extension. + It is reserved for future use in C99. +diff --git a/man-pages/man3/closedir.3 b/man-pages/man3/closedir.3 +index 1cfa9f4..64cc5c2 100644 +--- a/man-pages/man3/closedir.3 ++++ b/man-pages/man3/closedir.3 +@@ -64,6 +64,18 @@ is set appropriately. + .B EBADF + Invalid directory stream descriptor + .IR dirp . ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR closedir () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + SVr4, POSIX.1-2001, 4.3BSD. + .SH SEE ALSO +diff --git a/man-pages/man3/confstr.3 b/man-pages/man3/confstr.3 +index 4732964..7200f62 100644 +--- a/man-pages/man3/confstr.3 ++++ b/man-pages/man3/confstr.3 +@@ -124,6 +124,18 @@ is set to + If the value of + .I name + is invalid. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR confstr () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + POSIX.1-2001. + .SH EXAMPLE +diff --git a/man-pages/man3/conj.3 b/man-pages/man3/conj.3 +index 9d7bda8..de8167e 100644 +--- a/man-pages/man3/conj.3 ++++ b/man-pages/man3/conj.3 +@@ -32,13 +32,19 @@ One has: + .SH VERSIONS + These functions first appeared in glibc in version 2.1. + .SH ATTRIBUTES +-.SS Multithreading (see pthreads(7)) +-The ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw24 lb lb ++l l l. ++Interface Attribute Value ++T{ + .BR conj (), + .BR conjf (), +-and + .BR conjl () +-functions are thread-safe. ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99. + .SH SEE ALSO +diff --git a/man-pages/man3/copysign.3 b/man-pages/man3/copysign.3 +index 5559abf..c5a6fcd 100644 +--- a/man-pages/man3/copysign.3 ++++ b/man-pages/man3/copysign.3 +@@ -89,6 +89,20 @@ a NaN with the sign bit of + is returned. + .SH ERRORS + No errors occur. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw36 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR copysign (), ++.BR copysignf (), ++.BR copysignl () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99, POSIX.1-2001. + .\" 4.3BSD. +diff --git a/man-pages/man3/cos.3 b/man-pages/man3/cos.3 +index 779b186..355dfa9 100644 +--- a/man-pages/man3/cos.3 ++++ b/man-pages/man3/cos.3 +@@ -101,6 +101,20 @@ is set to + An invalid floating-point exception + .RB ( FE_INVALID ) + is raised. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw21 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR cos (), ++.BR cosf (), ++.BR cosl () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99, POSIX.1-2001. + The variant returning +diff --git a/man-pages/man3/cosh.3 b/man-pages/man3/cosh.3 +index 488af51..030c16c 100644 +--- a/man-pages/man3/cosh.3 ++++ b/man-pages/man3/cosh.3 +@@ -116,6 +116,20 @@ is set to + An overflow floating-point exception + .RB ( FE_OVERFLOW ) + is raised. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw24 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR cosh (), ++.BR coshf (), ++.BR coshl () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99, POSIX.1-2001. + The variant returning +diff --git a/man-pages/man3/cpow.3 b/man-pages/man3/cpow.3 +index d9b1b8d..a9c0189 100644 +--- a/man-pages/man3/cpow.3 ++++ b/man-pages/man3/cpow.3 +@@ -30,6 +30,20 @@ raised to the power + along the negative real axis.) + .SH VERSIONS + These functions first appeared in glibc in version 2.1. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw24 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR cpow (), ++.BR cpowf (), ++.BR cpowl () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99. + .SH SEE ALSO +diff --git a/man-pages/man3/cproj.3 b/man-pages/man3/cproj.3 +index 3d59fd6..8a19712 100644 +--- a/man-pages/man3/cproj.3 ++++ b/man-pages/man3/cproj.3 +@@ -29,6 +29,20 @@ Every complex infinite value is projected to a single infinite value, + namely to positive infinity on the real axis. + .SH VERSIONS + These functions first appeared in glibc in version 2.1. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw27 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR cproj (), ++.BR cprojf (), ++.BR cprojl () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99. + .SH NOTES +diff --git a/man-pages/man3/creal.3 b/man-pages/man3/creal.3 +index cde28a2..54d98c0 100644 +--- a/man-pages/man3/creal.3 ++++ b/man-pages/man3/creal.3 +@@ -30,6 +30,20 @@ One has: + .fi + .SH VERSIONS + These functions first appeared in glibc in version 2.1. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw27 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR creal (), ++.BR crealf (), ++.BR creall () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99. + .SH NOTES +diff --git a/man-pages/man3/crypt.3 b/man-pages/man3/crypt.3 +index 38e2293..4f04b97 100644 +--- a/man-pages/man3/crypt.3 ++++ b/man-pages/man3/crypt.3 +@@ -161,14 +161,20 @@ function was not implemented, probably because of U.S.A. export restrictions. + .\" Making encrypted data computed using crypt() publicly available has + .\" to be considered insecure for the given reasons. + .SH ATTRIBUTES +-.SS Multithreading (see pthreads(7)) +-The ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ + .BR crypt () +-function is not thread-safe. +-.LP +-The ++T} Thread safety MT-Unsafe race:crypt ++T{ + .BR crypt_r () +-function is thread-safe. ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + .BR crypt (): + SVr4, 4.3BSD, POSIX.1-2001. +diff --git a/man-pages/man3/ctermid.3 b/man-pages/man3/ctermid.3 +index 6a982d4..9eb4a2b 100644 +--- a/man-pages/man3/ctermid.3 ++++ b/man-pages/man3/ctermid.3 +@@ -59,11 +59,17 @@ is the maximum number of characters in the returned pathname. + .SH RETURN VALUE + The pointer to the pathname. + .SH ATTRIBUTES +-.SS Multithreading (see pthreads(7)) +-The ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ + .BR ctermid () +-function is thread-safe with exceptions. +-It is not thread-safe if called with a NULL parameter. ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + Svr4, POSIX.1-2001. + .SH BUGS +diff --git a/man-pages/man3/daemon.3 b/man-pages/man3/daemon.3 +index 0f7c87f..d9b1134 100644 +--- a/man-pages/man3/daemon.3 ++++ b/man-pages/man3/daemon.3 +@@ -88,6 +88,19 @@ to any of the errors specified for the + .BR fork (2) + and + .BR setsid (2). ++ ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR daemon () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + Not in POSIX.1-2001. + A similar function appears on the BSDs. +diff --git a/man-pages/man3/des_crypt.3 b/man-pages/man3/des_crypt.3 +index 706c6e8..b60336e 100644 +--- a/man-pages/man3/des_crypt.3 ++++ b/man-pages/man3/des_crypt.3 +@@ -131,6 +131,20 @@ is false only for the first two statuses. + .SH VERSIONS + These routines are present in libc 4.6.27 and later, and in + glibc 2.1 and later. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw24 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR ecb_crypt (), ++.BR cbc_crypt () ++.BR des_setparity () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + 4.3BSD. + Not in POSIX.1-2001. +diff --git a/man-pages/man3/difftime.3 b/man-pages/man3/difftime.3 +index d2d5042..980a1e3 100644 +--- a/man-pages/man3/difftime.3 ++++ b/man-pages/man3/difftime.3 +@@ -45,6 +45,18 @@ between time \fItime1\fP and time \fItime0\fP, represented as a + Each of the times is specified in calendar time, which means its + value is a measurement (in seconds) relative to the + Epoch, 1970-01-01 00:00:00 +0000 (UTC). ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR difftime () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + SVr4, 4.3BSD, C89, C99. + .SH NOTES +diff --git a/man-pages/man3/dirfd.3 b/man-pages/man3/dirfd.3 +index 9142c7d..3e8d4e6 100644 +--- a/man-pages/man3/dirfd.3 ++++ b/man-pages/man3/dirfd.3 +@@ -85,10 +85,17 @@ does not refer to a valid directory stream. + The implementation does not support the association of a file + descriptor with a directory. + .SH ATTRIBUTES +-.SS Multithreading (see pthreads(7)) +-The ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ + .BR dirfd () +-function is thread-safe. ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + POSIX.1-2008. + This function was a BSD extension, present in 4.3BSD-Reno, not in 4.2BSD. +diff --git a/man-pages/man3/div.3 b/man-pages/man3/div.3 +index 56dea09..faef9c8 100644 +--- a/man-pages/man3/div.3 ++++ b/man-pages/man3/div.3 +@@ -89,14 +89,20 @@ of the same type as the function arguments. + .SH RETURN VALUE + The \fIdiv_t\fP (etc.) structure. + .SH ATTRIBUTES +-.SS Multithreading (see pthreads(7)) +-The ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw33 lb lb ++l l l. ++Interface Attribute Value ++T{ + .BR div (), + .BR ldiv (), + .BR lldiv (), +-and + .BR imaxdiv () +-functions are thread-safe. ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + SVr4, 4.3BSD, C89. C99. + The functions +diff --git a/man-pages/man3/drand48.3 b/man-pages/man3/drand48.3 +index 272b3b8..3953f99 100644 +--- a/man-pages/man3/drand48.3 ++++ b/man-pages/man3/drand48.3 +@@ -243,8 +243,15 @@ will restore the standard values of + and + .IR c . + .SH ATTRIBUTES +-.SS Multithreading (see pthreads(7)) +-The ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.ad l ++.TS ++allbox; ++lb lb lb ++lw32 l l. ++Interface Attribute Value ++T{ + .BR drand48 (), + .BR erand48 (), + .BR lrand48 (), +@@ -253,8 +260,14 @@ The + .BR jrand48 (), + .BR srand48 (), + .BR seed48 (), +-and + .BR lcong48 () ++T} Thread safety T{ ++MT-Unsafe race:drand48 ++T} ++.TE ++.ad ++.PP ++The above + functions record global state information for the random number generator, + so they are not thread-safe. + .SH CONFORMING TO +diff --git a/man-pages/man3/drand48_r.3 b/man-pages/man3/drand48_r.3 +index 94e16ea..ee07801 100644 +--- a/man-pages/man3/drand48_r.3 ++++ b/man-pages/man3/drand48_r.3 +@@ -95,6 +95,28 @@ or + .BR lcong48_r (). + .SH RETURN VALUE + The return value is 0. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.ad l ++.TS ++allbox; ++lbw38 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR drand48_r (), ++.BR erand48_r (), ++.BR lrand48_r (), ++.BR nrand48_r (), ++.BR mrand48_r (), ++.BR jrand48_r (), ++.BR srand48_r (), ++.BR seed48_r (), ++.BR lcong48_r () ++T} Thread safety MT-Safe race:buffer ++.TE ++.ad + .SH CONFORMING TO + These functions are GNU extensions and are not portable. + .SH SEE ALSO +diff --git a/man-pages/man3/dysize.3 b/man-pages/man3/dysize.3 +index b9b577b..1c9c525 100644 +--- a/man-pages/man3/dysize.3 ++++ b/man-pages/man3/dysize.3 +@@ -48,6 +48,18 @@ The formula is defined in the macro + .I __isleap(year) + also found in + .IR . ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR dysize () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + This function occurs in SunOS 4.x. + .SH NOTES +diff --git a/man-pages/man3/ecvt.3 b/man-pages/man3/ecvt.3 +index 956b807..7e38d18 100644 +--- a/man-pages/man3/ecvt.3 ++++ b/man-pages/man3/ecvt.3 +@@ -108,12 +108,20 @@ The static string is overwritten by each call to + or + .BR fcvt (). + .SH ATTRIBUTES +-.SS Multithreading (see pthreads(7)) +-The ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ + .BR ecvt () +-and ++T} Thread safety MT-Unsafe race:ecvt ++T{ + .BR fcvt () +-functions are not thread-safe. ++T} Thread safety MT-Unsafe race:fcvt ++.TE + .SH CONFORMING TO + SVr2; + marked as LEGACY in POSIX.1-2001. +diff --git a/man-pages/man3/ecvt_r.3 b/man-pages/man3/ecvt_r.3 +index f53e822..da121c1 100644 +--- a/man-pages/man3/ecvt_r.3 ++++ b/man-pages/man3/ecvt_r.3 +@@ -85,6 +85,22 @@ and + .BR qecvt (3). + .SH RETURN VALUE + These functions return 0 on success, and \-1 otherwise. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw20 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR ecvt_r (), ++.BR fcvt_r (), ++.br ++.BR qecvt_r (), ++.BR qfcvt_r () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + These functions are GNU extensions. + .SH NOTES +diff --git a/man-pages/man3/encrypt.3 b/man-pages/man3/encrypt.3 +index 75bde23..4f0f2a8 100644 +--- a/man-pages/man3/encrypt.3 ++++ b/man-pages/man3/encrypt.3 +@@ -122,18 +122,22 @@ On success, it is unchanged. + The function is not provided. + (For example because of former USA export restrictions.) + .SH ATTRIBUTES +-.SS Multithreading (see pthreads(7)) +-The +-.BR encrypt () +-and ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw23 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR encrypt (), + .BR setkey () +-functions are not thread-safe. +-.LP +-The +-.BR encrypt_r () +-and ++T} Thread safety MT-Unsafe race:crypt ++T{ ++.BR encrypt_r (), + .BR setkey_r () +-functions are thread-safe. ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + The functions + .BR encrypt () +diff --git a/man-pages/man3/envz_add.3 b/man-pages/man3/envz_add.3 +index 18d64aa..e8ce9af 100644 +--- a/man-pages/man3/envz_add.3 ++++ b/man-pages/man3/envz_add.3 +@@ -115,6 +115,26 @@ All envz functions that do memory allocation have a return type of + and return 0 for success, and + .B ENOMEM + if an allocation error occurs. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw27 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR envz_add (), ++.BR envz_entry (), ++.br ++.BR envz_get (), ++.BR envz_merge (), ++.br ++.BR envz_remove (), ++.BR envz_strip () ++T} Thread safety MT-Safe ++.TE ++ + .SH CONFORMING TO + These functions are a GNU extension. + Handle with care. +diff --git a/man-pages/man3/erf.3 b/man-pages/man3/erf.3 +index 37d912c..e8ac953 100644 +--- a/man-pages/man3/erf.3 ++++ b/man-pages/man3/erf.3 +@@ -123,6 +123,20 @@ These functions do not set + .IR errno . + .\" FIXME . Is it intentional that these functions do not set errno? + .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6785 ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw21 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR erf (), ++.BR erff (), ++.BR erfl () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99, POSIX.1-2001. + The variant returning +diff --git a/man-pages/man3/erfc.3 b/man-pages/man3/erfc.3 +index 922e3fc..6f0677a 100644 +--- a/man-pages/man3/erfc.3 ++++ b/man-pages/man3/erfc.3 +@@ -119,6 +119,20 @@ These functions do not set + .IR errno . + .\" FIXME . Is it intentional that these functions do not set errno? + .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6785 ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw24 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR erfc (), ++.BR erfcf (), ++.BR erfcl () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99, POSIX.1-2001. + The variant returning +diff --git a/man-pages/man3/euidaccess.3 b/man-pages/man3/euidaccess.3 +index 5a06e21..02dd52a 100644 +--- a/man-pages/man3/euidaccess.3 ++++ b/man-pages/man3/euidaccess.3 +@@ -70,6 +70,19 @@ As for + The + .BR eaccess () + function was added to glibc in version 2.4. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw23 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR euidaccess (), ++.BR eaccess () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + These functions are nonstandard. + Some other systems have an +diff --git a/man-pages/man3/exec.3 b/man-pages/man3/exec.3 +index 46accc1..20204f0 100644 +--- a/man-pages/man3/exec.3 ++++ b/man-pages/man3/exec.3 +@@ -196,6 +196,25 @@ for any of the errors specified for + The + .BR execvpe () + function first appeared in glibc 2.11. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw29 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR execl (), ++.BR execle (), ++.BR execv () ++T} Thread safety MT-Safe ++T{ ++.BR execlp (), ++.BR execvp (), ++.BR execvpe () ++T} Thread safety MT-Safe env ++.TE + .SH CONFORMING TO + POSIX.1-2001, POSIX.1-2008. + +diff --git a/man-pages/man3/exit.3 b/man-pages/man3/exit.3 +index 079b64d..f7976c5 100644 +--- a/man-pages/man3/exit.3 ++++ b/man-pages/man3/exit.3 +@@ -87,6 +87,23 @@ termination, respectively. + The + .BR exit () + function does not return. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR exit () ++T} Thread safety MT-Unsafe race:exit ++.TE ++.PP ++The ++.BR exit () ++function uses a global variable that is not protected, ++so it is not thread-safe. + .SH CONFORMING TO + SVr4, 4.3BSD, POSIX.1-2001, C89, C99. + .SH NOTES +diff --git a/man-pages/man3/exp.3 b/man-pages/man3/exp.3 +index 714ddd7..c4ff8e3 100644 +--- a/man-pages/man3/exp.3 ++++ b/man-pages/man3/exp.3 +@@ -125,6 +125,20 @@ is set to + An underflow floating-point exception + .RB ( FE_UNDERFLOW ) + is raised. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR exp (), ++.BR expf (), ++.BR expl () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99, POSIX.1-2001. + The variant returning +diff --git a/man-pages/man3/exp10.3 b/man-pages/man3/exp10.3 +index 182eff0..7054b67 100644 +--- a/man-pages/man3/exp10.3 ++++ b/man-pages/man3/exp10.3 +@@ -74,6 +74,20 @@ For a discussion of the errors that can occur for these functions, see + .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6787 + .SH VERSIONS + These functions first appeared in glibc in version 2.1. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw28 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR exp10 (), ++.BR exp10f (), ++.BR exp10l () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + These functions are GNU extensions. + .SH SEE ALSO +diff --git a/man-pages/man3/exp2.3 b/man-pages/man3/exp2.3 +index a8a6e32..b22ec01 100644 +--- a/man-pages/man3/exp2.3 ++++ b/man-pages/man3/exp2.3 +@@ -88,6 +88,20 @@ For a discussion of the errors that can occur for these functions, see + .BR exp (3). + .SH VERSIONS + These functions first appeared in glibc in version 2.1. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw24 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR exp2 (), ++.BR exp2f (), ++.BR exp2l () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99, POSIX.1-2001. + The variant returning +diff --git a/man-pages/man3/expm1.3 b/man-pages/man3/expm1.3 +index c166e59..2e9412b 100644 +--- a/man-pages/man3/expm1.3 ++++ b/man-pages/man3/expm1.3 +@@ -133,6 +133,21 @@ is raised. + .\" + .\" POSIX.1 specifies an optional range error (underflow) if + .\" x is subnormal. Glibc does not implement this. ++ ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw27 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR expm1 (), ++.BR expm1f (), ++.BR expm1l () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99, POSIX.1-2001. + .\" BSD. +diff --git a/man-pages/man3/fabs.3 b/man-pages/man3/fabs.3 +index 2d41435..3f5de66 100644 +--- a/man-pages/man3/fabs.3 ++++ b/man-pages/man3/fabs.3 +@@ -83,13 +83,19 @@ is negative infinity or positive infinity, positive infinity is returned. + .SH ERRORS + No errors occur. + .SH ATTRIBUTES +-.SS Multithreading (see pthreads(7)) +-The ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw24 lb lb ++l l l. ++Interface Attribute Value ++T{ + .BR fabs (), + .BR fabsf (), +-and + .BR fabsl () +-functions are thread-safe. ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99, POSIX.1-2001. + The variant returning +diff --git a/man-pages/man3/fclose.3 b/man-pages/man3/fclose.3 +index 49b67bf..5465b6b 100644 +--- a/man-pages/man3/fclose.3 ++++ b/man-pages/man3/fclose.3 +@@ -87,6 +87,18 @@ for any of the errors specified for the routines + .BR write (2) + or + .BR fflush (3). ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR fclose () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C89, C99. + .SH NOTES +diff --git a/man-pages/man3/fcloseall.3 b/man-pages/man3/fcloseall.3 +index 02fdcf9..d92e1bc 100644 +--- a/man-pages/man3/fcloseall.3 ++++ b/man-pages/man3/fcloseall.3 +@@ -53,7 +53,18 @@ on error, + .B EOF + is returned. + .SH ATTRIBUTES +-.SS Multithreading (see pthreads(7)) ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR fcloseall () ++T} Thread safety MT-Unsafe race:streams ++.TE ++.PP + The + .BR fcloseall () + function does not lock the streams, so it is not thread-safe. +diff --git a/man-pages/man3/fdim.3 b/man-pages/man3/fdim.3 +index a1da15f..3c5023e 100644 +--- a/man-pages/man3/fdim.3 ++++ b/man-pages/man3/fdim.3 +@@ -79,13 +79,19 @@ These functions do not set + .SH VERSIONS + These functions first appeared in glibc in version 2.1. + .SH ATTRIBUTES +-.SS Multithreading (see pthreads(7)) +-The ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw24 lb lb ++l l l. ++Interface Attribute Value ++T{ + .BR fdim (), + .BR fdimf (), +-and + .BR fdiml () +-functions are thread-safe. ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99, POSIX.1-2001. + .SH SEE ALSO +diff --git a/man-pages/man3/fenv.3 b/man-pages/man3/fenv.3 +index 4d06888..80af589 100644 +--- a/man-pages/man3/fenv.3 ++++ b/man-pages/man3/fenv.3 +@@ -262,6 +262,68 @@ These functions return zero on success and nonzero if an error occurred. + .\" of the C99 Standard. + .SH VERSIONS + These functions first appeared in glibc in version 2.1. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.nh ++.ad l ++.TS ++allbox; ++lb lb lb ++lw38 l l. ++Interface Attribute Value ++T{ ++.BR feclearexcept (), ++.BR fegetexceptflag (), ++.BR fegetexceptflag (), ++.BR fesetexceptflag (), ++.BR fetestexcept (), ++.BR fegetround (), ++.BR fesetround (), ++.BR fegetenv (), ++.BR feholdexcept (), ++.BR fesetenv (), ++.BR feupdateenv (), ++.BR feenableexcept (), ++.BR fedisableexcept (), ++.BR fegetexcept () ++T} Thread safety T{ ++MT-Safe ++T} ++.TE ++.ad ++.hy ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.nh ++.ad l ++.TS ++allbox; ++lb lb lb ++lw35 l l. ++Interface Attribute Value ++T{ ++.BR feclearexcept (), ++.BR fegetexceptflag (), ++.BR feraiseexcept (), ++.BR fesetexceptflag (), ++.BR fetestexcept (), ++.BR fegetround (), ++.BR fesetround (), ++.BR fegetenv (), ++.BR feholdexcept (), ++.BR fesetenv (), ++.BR feupdateenv (), ++.BR feenableexcept (), ++.BR fedisableexcept (), ++.BR fegetexcept () ++T} Thread safety T{ ++MT-Safe ++T} ++.TE ++.ad ++.hy + .SH CONFORMING TO + IEC 60559 (IEC 559:1989), ANSI/IEEE 854, C99, POSIX.1-2001. + .SH NOTES +diff --git a/man-pages/man3/ferror.3 b/man-pages/man3/ferror.3 +index e17c04a..e984de7 100644 +--- a/man-pages/man3/ferror.3 ++++ b/man-pages/man3/ferror.3 +@@ -104,14 +104,21 @@ return \-1 and set + to + .BR EBADF .) + .SH ATTRIBUTES +-.SS Multithreading (see pthreads(7)) +-The ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw19 lb lb ++l l l. ++Interface Attribute Value ++T{ + .BR clearerr (), + .BR feof (), ++.br + .BR ferror (), +-and + .BR fileno () +-functions are thread-safe. ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + The functions + .BR clearerr (), +diff --git a/man-pages/man3/fflush.3 b/man-pages/man3/fflush.3 +index c77f6c9..fa9ff4e 100644 +--- a/man-pages/man3/fflush.3 ++++ b/man-pages/man3/fflush.3 +@@ -91,10 +91,17 @@ may also fail and set + for any of the errors specified for + .BR write (2). + .SH ATTRIBUTES +-.SS Multithreading (see pthreads(7)) +-The ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ + .BR fflush () +-function is thread-safe. ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C89, C99, POSIX.1-2001, POSIX.1-2008. + +diff --git a/man-pages/man3/ffs.3 b/man-pages/man3/ffs.3 +index 1127bd0..bf3bd23 100644 +--- a/man-pages/man3/ffs.3 ++++ b/man-pages/man3/ffs.3 +@@ -88,6 +88,20 @@ arguments of possibly different size. + These functions return the position of the first bit set, + or 0 if no bits are set in + .IR i . ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw22 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR ffs (), ++.BR ffsl (), ++.BR ffsll () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + .BR ffs (): + 4.3BSD, POSIX.1-2001. +diff --git a/man-pages/man3/fgetwc.3 b/man-pages/man3/fgetwc.3 +index 1cff7c5..2e13f81 100644 +--- a/man-pages/man3/fgetwc.3 ++++ b/man-pages/man3/fgetwc.3 +@@ -67,6 +67,19 @@ Apart from the usual ones, there is + .B EILSEQ + The data obtained from the input stream does not + form a valid character. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw17 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR fgetwc (), ++.BR getwc () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99, POSIX.1-2001. + .SH NOTES +diff --git a/man-pages/man3/fgetws.3 b/man-pages/man3/fgetws.3 +index c02010e..fcd9667 100644 +--- a/man-pages/man3/fgetws.3 ++++ b/man-pages/man3/fgetws.3 +@@ -49,6 +49,18 @@ The + function, if successful, returns \fIws\fP. + If end of stream + was already reached or if an error occurred, it returns NULL. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR fgetws () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99, POSIX.1-2001. + .SH NOTES +diff --git a/man-pages/man3/finite.3 b/man-pages/man3/finite.3 +index aabe810..8f5fb52 100644 +--- a/man-pages/man3/finite.3 ++++ b/man-pages/man3/finite.3 +@@ -119,19 +119,27 @@ is positive infinity, \-1 if + .I x + is negative infinity, and 0 otherwise. + .SH ATTRIBUTES +-.SS Multithreading (see pthreads(7)) +-The ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw31 lb lb ++l l l. ++Interface Attribute Value ++T{ + .BR finite (), + .BR finitef (), + .BR finitel (), ++.br + .BR isinf (), + .BR isinff (), + .BR isinfl (), ++.br + .BR isnan (), + .BR isnanf (), +-and + .BR isnanl () +-functions are thread-safe. ++T} Thread safety MT-Safe ++.TE + .SH NOTES + Note that these functions are obsolete. + C99 defines macros +diff --git a/man-pages/man3/flockfile.3 b/man-pages/man3/flockfile.3 +index eca296f..d6f51a7 100644 +--- a/man-pages/man3/flockfile.3 ++++ b/man-pages/man3/flockfile.3 +@@ -125,13 +125,19 @@ function returns zero for success + .SH ERRORS + None. + .SH ATTRIBUTES +-.SS Multithreading (see pthreads(7)) +-The ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw29 lb lb ++l l l. ++Interface Attribute Value ++T{ + .BR flockfile (), + .BR ftrylockfile (), +-and + .BR funlockfile () +-functions are thread-safe. ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + POSIX.1-2001. + .SH AVAILABILITY +diff --git a/man-pages/man3/floor.3 b/man-pages/man3/floor.3 +index dddfce2..15c9423 100644 +--- a/man-pages/man3/floor.3 ++++ b/man-pages/man3/floor.3 +@@ -78,13 +78,19 @@ itself is returned. + No errors occur. + POSIX.1-2001 documents a range error for overflows, but see NOTES. + .SH ATTRIBUTES +-.SS Multithreading (see pthreads(7)) +-The ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw27 lb lb ++l l l. ++Interface Attribute Value ++T{ + .BR floor (), + .BR floorf (), +-and + .BR floorl () +-functions are thread-safe. ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99, POSIX.1-2001. + The variant returning +diff --git a/man-pages/man3/fma.3 b/man-pages/man3/fma.3 +index 6083e98..1af3deb 100644 +--- a/man-pages/man3/fma.3 ++++ b/man-pages/man3/fma.3 +@@ -153,6 +153,20 @@ These functions do not set + .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6801 + .SH VERSIONS + These functions first appeared in glibc in version 2.1. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw21 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR fma (), ++.BR fmaf (), ++.BR fmal () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99, POSIX.1-2001. + .SH SEE ALSO +diff --git a/man-pages/man3/fmax.3 b/man-pages/man3/fmax.3 +index 810d5b2..3b38940 100644 +--- a/man-pages/man3/fmax.3 ++++ b/man-pages/man3/fmax.3 +@@ -55,6 +55,20 @@ If both arguments are NaN, a NaN is returned. + No errors occur. + .SH VERSIONS + These functions first appeared in glibc in version 2.1. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw21 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR fma (), ++.BR fmaf (), ++.BR fmal () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99, POSIX.1-2001. + .SH SEE ALSO +diff --git a/man-pages/man3/fmin.3 b/man-pages/man3/fmin.3 +index c7b8e27..aee17a5 100644 +--- a/man-pages/man3/fmin.3 ++++ b/man-pages/man3/fmin.3 +@@ -55,6 +55,20 @@ If both arguments are NaN, a NaN is returned. + No errors occur. + .SH VERSIONS + These functions first appeared in glibc in version 2.1. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw24 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR fmin (), ++.BR fminf (), ++.BR fminl () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99, POSIX.1-2001. + .SH SEE ALSO +diff --git a/man-pages/man3/fmod.3 b/man-pages/man3/fmod.3 +index f645f48..50a8434 100644 +--- a/man-pages/man3/fmod.3 ++++ b/man-pages/man3/fmod.3 +@@ -143,6 +143,20 @@ An invalid floating-point exception + is raised. + .\" POSIX.1 documents an optional underflow error, but AFAICT it doesn't + .\" (can't?) occur -- mtk, Jul 2008 ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw24 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR fmod (), ++.BR fmodf (), ++.BR fmodl () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99, POSIX.1-2001. + The variant returning +diff --git a/man-pages/man3/fmtmsg.3 b/man-pages/man3/fmtmsg.3 +index 462a543..d2e6eb4 100644 +--- a/man-pages/man3/fmtmsg.3 ++++ b/man-pages/man3/fmtmsg.3 +@@ -223,7 +223,22 @@ is the string printed when a message of this class is processed by + .BR fmtmsg () + is provided in glibc since version 2.1. + .SH ATTRIBUTES +-.SS Multithreading (see pthreads(7)) ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lbw23 ++l l l. ++Interface Attribute Value ++T{ ++.BR fmtmsg () ++T} Thread safety T{ ++glibc >= 2.16: MT-Safe ++.br ++glibc < 2.16: MT-Unsafe ++T} ++.TE ++.PP + Before glibc 2.16, the + .BR fmtmsg () + function uses a static variable that is not protected, +diff --git a/man-pages/man3/fnmatch.3 b/man-pages/man3/fnmatch.3 +index 700ed70..3e33fd6 100644 +--- a/man-pages/man3/fnmatch.3 ++++ b/man-pages/man3/fnmatch.3 +@@ -93,6 +93,18 @@ matches + .IR pattern , + .B FNM_NOMATCH + if there is no match or another nonzero value if there is an error. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR fnmatch () ++T} Thread safety MT-Safe env locale ++.TE + .SH CONFORMING TO + POSIX.2. + The +diff --git a/man-pages/man3/fopen.3 b/man-pages/man3/fopen.3 +index a6b8f73..1c0ddf0 100644 +--- a/man-pages/man3/fopen.3 ++++ b/man-pages/man3/fopen.3 +@@ -243,6 +243,20 @@ for any of the errors specified for the routines + .BR fclose (3) + and + .BR fflush (3). ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw28 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR fopen (), ++.BR fdopen (), ++.BR freopen () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + The + .BR fopen () +diff --git a/man-pages/man3/fopencookie.3 b/man-pages/man3/fopencookie.3 +index 4ab4617..3b3b3a8 100644 +--- a/man-pages/man3/fopencookie.3 ++++ b/man-pages/man3/fopencookie.3 +@@ -242,6 +242,18 @@ returns a pointer to the new stream. + On error, NULL is returned. + .\" .SH ERRORS + .\" It's not clear if errno ever gets set... ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR fopencookie () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + This function is a nonstandard GNU extension. + .SH EXAMPLE +diff --git a/man-pages/man3/fpclassify.3 b/man-pages/man3/fpclassify.3 +index 235b05f..b2b297e 100644 +--- a/man-pages/man3/fpclassify.3 ++++ b/man-pages/man3/fpclassify.3 +@@ -115,6 +115,24 @@ returns 1 if + is positive infinity, and \-1 if + .I x + is negative infinity. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.ad l ++.TS ++allbox; ++lbw28 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR fpclassify (), ++.BR isfinite (), ++.BR isnormal (), ++.BR isnan (), ++.BR isinf () ++T} Thread safety MT-Safe ++.TE ++.ad + .SH CONFORMING TO + C99, POSIX.1. + +diff --git a/man-pages/man3/fread.3 b/man-pages/man3/fread.3 +index 2294ee0..e3dd15a 100644 +--- a/man-pages/man3/fread.3 ++++ b/man-pages/man3/fread.3 +@@ -100,6 +100,19 @@ does not distinguish between end-of-file and error, and callers must use + and + .BR ferror (3) + to determine which occurred. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw17 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR fread (), ++.BR fwrite () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C89, POSIX.1-2001. + .SH SEE ALSO +diff --git a/man-pages/man3/frexp.3 b/man-pages/man3/frexp.3 +index ecb4105..99b1b0a 100644 +--- a/man-pages/man3/frexp.3 ++++ b/man-pages/man3/frexp.3 +@@ -105,6 +105,20 @@ positive infinity (negative infinity) is returned, and the value of + is unspecified. + .SH ERRORS + No errors occur. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw27 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR frexp (), ++.BR frexpf (), ++.BR frexpl () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99, POSIX.1-2001. + The variant returning +diff --git a/man-pages/man3/ftime.3 b/man-pages/man3/ftime.3 +index 0395d78..8df54eb 100644 +--- a/man-pages/man3/ftime.3 ++++ b/man-pages/man3/ftime.3 +@@ -67,6 +67,19 @@ fields are unspecified; avoid relying on them. + .SH RETURN VALUE + This function always returns 0. + (POSIX.1-2001 specifies, and some systems document, a \-1 error return.) ++ ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR ftime () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + 4.2BSD, POSIX.1-2001. + POSIX.1-2008 removes the specification of +diff --git a/man-pages/man3/ftok.3 b/man-pages/man3/ftok.3 +index d90aa50..fe4704c 100644 +--- a/man-pages/man3/ftok.3 ++++ b/man-pages/man3/ftok.3 +@@ -67,6 +67,18 @@ On failure \-1 is returned, with + indicating the error as for the + .BR stat (2) + system call. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR ftok () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + POSIX.1-2001. + .SH NOTES +diff --git a/man-pages/man3/futimes.3 b/man-pages/man3/futimes.3 +index 0005611..773669b 100644 +--- a/man-pages/man3/futimes.3 ++++ b/man-pages/man3/futimes.3 +@@ -90,6 +90,19 @@ is available since glibc 2.3. + is available since glibc 2.6, and is implemented using the + .BR utimensat (2) + system call, which is supported since kernel 2.6.22. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw20 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR futimes (), ++.BR lutimes () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + These functions are not specified in any standard. + Other than Linux, they are available only on the BSDs. +diff --git a/man-pages/man3/gamma.3 b/man-pages/man3/gamma.3 +index a528b23..8b11b3c 100644 +--- a/man-pages/man3/gamma.3 ++++ b/man-pages/man3/gamma.3 +@@ -62,6 +62,20 @@ See + .SH ERRORS + See + .BR lgamma (3). ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw27 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR gamma (), ++.BR gammaf (), ++.BR gammal () ++T} Thread safety MT-Unsafe race:signgam ++.TE + .SH CONFORMING TO + Because of historical variations in behavior across systems, + this function is not specified in any standard. +diff --git a/man-pages/man3/getauxval.3 b/man-pages/man3/getauxval.3 +index 1752385..94925bb 100644 +--- a/man-pages/man3/getauxval.3 ++++ b/man-pages/man3/getauxval.3 +@@ -182,6 +182,18 @@ No errors are diagnosed. + The + .BR getauxval () + function was added to glibc in version 2.16. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR getauxval () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + This function is a nonstandard glibc extension. + .SH NOTES +diff --git a/man-pages/man3/getcontext.3 b/man-pages/man3/getcontext.3 +index e1e582d..a9df6a3 100644 +--- a/man-pages/man3/getcontext.3 ++++ b/man-pages/man3/getcontext.3 +@@ -150,6 +150,19 @@ On error, both return \-1 and set + appropriately. + .SH ERRORS + None defined. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw26 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR getcontext (), ++.BR setcontext () ++T} Thread safety MT-Safe race:ucp ++.TE + .SH CONFORMING TO + SUSv2, POSIX.1-2001. + POSIX.1-2008 removes the specification of +diff --git a/man-pages/man3/getcwd.3 b/man-pages/man3/getcwd.3 +index 1ece72f..4cabd6e 100644 +--- a/man-pages/man3/getcwd.3 ++++ b/man-pages/man3/getcwd.3 +@@ -205,6 +205,22 @@ The + argument is less than the length of the absolute pathname of the + working directory, including the terminating null byte. + You need to allocate a bigger array and try again. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw22 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR getcwd (), ++.BR getwd () ++T} Thread safety MT-Safe ++T{ ++.BR get_current_dir_name () ++T} Thread safety MT-Safe env ++.TE + .SH CONFORMING TO + .BR getcwd () + conforms to POSIX.1-2001. +diff --git a/man-pages/man3/getdate.3 b/man-pages/man3/getdate.3 +index 78e38a9..d0ce800 100644 +--- a/man-pages/man3/getdate.3 ++++ b/man-pages/man3/getdate.3 +@@ -193,14 +193,20 @@ File containing format patterns. + Variables used by + .BR strptime (3). + .SH ATTRIBUTES +-.SS Multithreading (see pthreads(7)) +-The ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ + .BR getdate () +-function is not thread-safe. +-.LP +-The ++T} Thread safety MT-Unsafe race:getdate env locale ++T{ + .BR getdate_r () +-function is thread-safe. ++T} Thread safety MT-Safe env locale ++.TE + .SH CONFORMING TO + POSIX.1-2001. + .SH NOTES +diff --git a/man-pages/man3/getdirentries.3 b/man-pages/man3/getdirentries.3 +index ec4abcb..ad18c62 100644 +--- a/man-pages/man3/getdirentries.3 ++++ b/man-pages/man3/getdirentries.3 +@@ -61,6 +61,18 @@ If an error occurs, \-1 is returned, and + is set appropriately. + .SH ERRORS + See the Linux library source code for details. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR getdirentries () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + Not in POSIX.1-2001. + Present on the BSDs, and a few other systems. +diff --git a/man-pages/man3/getdtablesize.3 b/man-pages/man3/getdtablesize.3 +index 693b202..cbab25a 100644 +--- a/man-pages/man3/getdtablesize.3 ++++ b/man-pages/man3/getdtablesize.3 +@@ -66,6 +66,18 @@ On Linux, + can return any of the errors described for + .BR getrlimit (2); + see NOTES below. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR getdtablesize () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + SVr4, 4.4BSD (the + .BR getdtablesize () +diff --git a/man-pages/man3/getenv.3 b/man-pages/man3/getenv.3 +index ec45247..ccb7de8 100644 +--- a/man-pages/man3/getenv.3 ++++ b/man-pages/man3/getenv.3 +@@ -93,6 +93,19 @@ environment, or NULL if there is no match. + .SH VERSIONS + .BR secure_getenv () + first appeared in glibc 2.17. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw25 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR getenv (), ++.BR secure_getenv () ++T} Thread safety MT-Safe env ++.TE + .SH CONFORMING TO + .BR getenv (): + SVr4, POSIX.1-2001, 4.3BSD, C89, C99. +diff --git a/man-pages/man3/getfsent.3 b/man-pages/man3/getfsent.3 +index ebb2d1e..0554f22 100644 +--- a/man-pages/man3/getfsent.3 ++++ b/man-pages/man3/getfsent.3 +@@ -112,6 +112,27 @@ Upon failure or end-of-file, these functions return NULL and 0, respectively. + .\" The + .\" .BR getfsent () + .\" function appeared in 4.0BSD; the other four functions appeared in 4.3BSD. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lbw24 ++l l l. ++Interface Attribute Value ++T{ ++.BR endfsent (), ++.br ++.BR setfsent () ++T} Thread safety MT-Unsafe race:fsent ++T{ ++.BR getfsent (), ++.br ++.BR getfsspec (), ++.br ++.BR getfsfile () ++T} Thread safety MT-Unsafe race:fsent locale ++.TE + .SH CONFORMING TO + These functions are not in POSIX.1-2001. + Several operating systems have them, +diff --git a/man-pages/man3/getgrent.3 b/man-pages/man3/getgrent.3 +index d0b5a97..eafbbc7 100644 +--- a/man-pages/man3/getgrent.3 ++++ b/man-pages/man3/getgrent.3 +@@ -163,6 +163,39 @@ The + and + .BR endgrent() + functions are thread-safe. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw11 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR getgrent () ++T} Thread safety T{ ++MT-Unsafe race:grent ++.br ++race:grentbuf locale ++T} ++T{ ++.BR setgrent (), ++.BR endgrent () ++T} Thread safety MT-Unsafe race:grent locale ++.TE ++ ++[[ ++In the above table, ++.I grent ++in ++.I race:grent ++signifies that if any of the functions ++.BR setgrent (), ++.BR getgrent (), ++or ++.BR endgrent () ++are used in parallel in different threads of a program, then data races could occur. ++]] + .SH CONFORMING TO + SVr4, 4.3BSD, POSIX.1-2001. + .SH SEE ALSO +diff --git a/man-pages/man3/getgrnam.3 b/man-pages/man3/getgrnam.3 +index 792a3da..3a53ab8 100644 +--- a/man-pages/man3/getgrnam.3 ++++ b/man-pages/man3/getgrnam.3 +@@ -208,18 +208,25 @@ Insufficient buffer space supplied. + .I /etc/group + local group database file + .SH ATTRIBUTES +-.SS Multithreading (see pthreads(7)) +-The ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ + .BR getgrnam () +-and ++T} Thread safety MT-Unsafe race:grnam locale ++T{ + .BR getgrgid () +-functions are not thread-safe. +-.LP +-The +-.BR getgrnam_r () +-and ++T} Thread safety MT-Unsafe race:grgid locale ++T{ ++.BR getgrnam_r (), ++.br + .BR getgrgid_r () +-functions are thread-safe. ++T} Thread safety MT-Safe locale ++.TE + .SH CONFORMING TO + SVr4, 4.3BSD, POSIX.1-2001. + .SH NOTES +diff --git a/man-pages/man3/getgrouplist.3 b/man-pages/man3/getgrouplist.3 +index bf3d41c..ae1f128 100644 +--- a/man-pages/man3/getgrouplist.3 ++++ b/man-pages/man3/getgrouplist.3 +@@ -95,6 +95,18 @@ can be used to resize the buffer passed to a further call + .BR getgrouplist (). + .SH VERSIONS + This function is present since glibc 2.2.4. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR getgrouplist () ++T} Thread safety MT-Safe locale ++.TE + .SH CONFORMING TO + This function is nonstandard; it appears on most BSDs. + .SH BUGS +diff --git a/man-pages/man3/getloadavg.3 b/man-pages/man3/getloadavg.3 +index c3254a6..b58073c 100644 +--- a/man-pages/man3/getloadavg.3 ++++ b/man-pages/man3/getloadavg.3 +@@ -62,6 +62,18 @@ the number of samples actually retrieved is returned. + .\" 4.3BSD Reno . + .SH VERSIONS + This function is available in glibc since version 2.2. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR getloadavg () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + Not in POSIX.1-2001. + Present on the BSDs and Solaris. +diff --git a/man-pages/man3/getlogin.3 b/man-pages/man3/getlogin.3 +index b384d68..15e2e8a 100644 +--- a/man-pages/man3/getlogin.3 ++++ b/man-pages/man3/getlogin.3 +@@ -138,19 +138,48 @@ password database file + (traditionally \fI/etc/utmp\fP; + some libc versions used \fI/var/adm/utmp\fP) + .SH ATTRIBUTES +-.SS Multithreading (see pthreads(7)) +-The ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ + .BR getlogin () +-function is not thread-safe. +-.LP +-The ++T} Thread safety T{ ++MT-Unsafe race:getlogin race:utent ++.br ++sig:ALRM timer locale ++T} ++T{ + .BR getlogin_r () +-function is thread-safe. +-.LP +-The ++T} Thread safety T{ ++MT-Unsafe race:utent sig:ALRM timer ++.br ++locale ++T} ++T{ + .BR cuserid () +-function is thread-safe with exceptions. +-It is not thread-safe if called with a NULL parameter. ++T} Thread safety MT-Unsafe race:cuserid/!string locale ++.TE ++ ++In the above table, ++.I utent ++in ++.I race:utent ++signifies that if any of the functions ++.BR setutent (3), ++.BR getutent (3), ++or ++.BR endutent (3) ++are used in parallel in different threads of a program, ++then data races could occur. ++.BR getlogin () ++and ++.BR getlogin_r () ++call those functions, ++so we use race:utent to remind users. + .SH CONFORMING TO + .BR getlogin () + and +diff --git a/man-pages/man3/getopt.3 b/man-pages/man3/getopt.3 +index 83bb44f..808e4b0 100644 +--- a/man-pages/man3/getopt.3 ++++ b/man-pages/man3/getopt.3 +@@ -315,6 +315,20 @@ wildcard expansion and so should not be considered as options. + This behavior was removed in + .BR bash (1) + version 2.01, but the support remains in glibc. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw24 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR getopt (), ++.BR getopt_long (), ++.BR getopt_long_only () ++T} Thread safety MT-Unsafe race:getopt env ++.TE + .SH CONFORMING TO + .TP + .BR getopt (): +diff --git a/man-pages/man3/getpass.3 b/man-pages/man3/getpass.3 +index 7d59d16..73d5035 100644 +--- a/man-pages/man3/getpass.3 ++++ b/man-pages/man3/getpass.3 +@@ -94,10 +94,17 @@ The process does not have a controlling terminal. + .\" .BR getpass () + .\" function appeared in Version 7 AT&T UNIX. + .SH ATTRIBUTES +-.SS Multithreading (see pthreads(7)) +-The ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ + .BR getpass () +-function is not thread-safe. ++T} Thread safety MT-Unsafe term ++.TE + .SH CONFORMING TO + Present in SUSv2, but marked LEGACY. + Removed in POSIX.1-2001. +diff --git a/man-pages/man3/getpt.3 b/man-pages/man3/getpt.3 +index 13e6daa..542fa8f 100644 +--- a/man-pages/man3/getpt.3 ++++ b/man-pages/man3/getpt.3 +@@ -39,6 +39,18 @@ can fail with various errors described in + .SH VERSIONS + .BR getpt () + is provided in glibc since version 2.1. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR getpt () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + .BR getpt () + is glibc-specific; +diff --git a/man-pages/man3/getpwent.3 b/man-pages/man3/getpwent.3 +index 968c0d9..29a9417 100644 +--- a/man-pages/man3/getpwent.3 ++++ b/man-pages/man3/getpwent.3 +@@ -162,6 +162,40 @@ The + and + .BR endpwent() + functions are thread-safe. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw11 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR getpwent () ++T} Thread safety T{ ++MT-Unsafe race:pwent ++.br ++race:pwentbuf locale ++T} ++T{ ++.BR setpwent (), ++.br ++.BR endpwent () ++T} Thread safety MT-Unsafe race:pwent locale ++.TE ++ ++[[ ++In the above table, ++.I pwent ++in ++.I race:pwent ++signifies that if any of the functions ++.BR setpwent (), ++.BR getpwent (), ++or ++.BR endpwent () ++are used in parallel in different threads of a program, then data races could occur. ++]] + .SH CONFORMING TO + SVr4, 4.3BSD, POSIX.1-2001. + The +diff --git a/man-pages/man3/getpwnam.3 b/man-pages/man3/getpwnam.3 +index 19dc54b..d196bf0 100644 +--- a/man-pages/man3/getpwnam.3 ++++ b/man-pages/man3/getpwnam.3 +@@ -215,18 +215,42 @@ Insufficient buffer space supplied. + .I /etc/passwd + local password database file + .SH ATTRIBUTES +-.SS Multithreading (see pthreads(7)) +-The ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw22 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR getpwnam (), ++.BR getpwuid () ++T} Thread safety MT-Unsafe ++T{ ++.BR getpwnam_r (), ++.BR getpwuid_r () ++T} Thread safety MT-Safe ++.TE ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ + .BR getpwnam () +-and ++T} Thread safety MT-Unsafe race:pwnam locale ++T{ + .BR getpwuid () +-functions are not thread-safe. +-.LP +-The +-.BR getpwnam_r () +-and ++T} Thread safety MT-Unsafe race:pwuid locale ++T{ ++.BR getpwnam_r (), ++.br + .BR getpwuid_r () +-functions are thread-safe. ++T} Thread safety MT-Safe locale ++.TE + .SH CONFORMING TO + SVr4, 4.3BSD, POSIX.1-2001. + The +diff --git a/man-pages/man3/gets.3 b/man-pages/man3/gets.3 +index 1399a1d..9645360 100644 +--- a/man-pages/man3/gets.3 ++++ b/man-pages/man3/gets.3 +@@ -135,6 +135,19 @@ returns + on success, or + .B EOF + on error. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR gets () ++T} Thread safety MT-Safe ++.TE ++ + .SH CONFORMING TO + C89, C99, POSIX.1-2001. + +diff --git a/man-pages/man3/getsubopt.3 b/man-pages/man3/getsubopt.3 +index c32ff55..8dac94a 100644 +--- a/man-pages/man3/getsubopt.3 ++++ b/man-pages/man3/getsubopt.3 +@@ -126,6 +126,18 @@ is changed, the first suboption before the call to + .BR getsubopt () + is not (necessarily) the same as the first suboption after + .BR getsubopt (). ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR getsubopt () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + POSIX.1-2001. + .SH NOTES +diff --git a/man-pages/man3/getttyent.3 b/man-pages/man3/getttyent.3 +index 1ae7c08..bb04a46 100644 +--- a/man-pages/man3/getttyent.3 ++++ b/man-pages/man3/getttyent.3 +@@ -70,22 +70,20 @@ can be: + #define TTY_SECURE 0x02 /* allow UID 0 to login */ + .fi + .SH ATTRIBUTES +-.SS Multithreading (see pthreads(7)) +-The +-.BR getttyent () +-function returns a pointer to a static variable, so it is not thread-safe. +-.LP +-The +-.BR setttyent () +-and +-.BR endttyent () +-functions use a static variable, so they are not thread-safe. +-.LP +-The ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw25 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR getttyent (), ++.BR setttyent (), ++.BR endttyent (), + .BR getttynam () +-function calls thread-unsafe function +-.BR getttyent () +-so it is not thread-safe. ++T} Thread safety MT-Unsafe race:ttyent ++.TE + .SH CONFORMING TO + Not in POSIX.1-2001. + Present on the BSDs, and perhaps other systems. +diff --git a/man-pages/man3/getusershell.3 b/man-pages/man3/getusershell.3 +index f4032a9..e291872 100644 +--- a/man-pages/man3/getusershell.3 ++++ b/man-pages/man3/getusershell.3 +@@ -91,13 +91,20 @@ function returns a NULL pointer on end-of-file. + /etc/shells + .fi + .SH ATTRIBUTES +-.SS Multithreading (see pthreads(7)) +-The ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw31 lb lb ++l l l. ++Interface Attribute Value ++T{ + .BR getusershell (), +-.BR setusershell () +-and ++.BR setusershell (), ++.br + .BR endusershell () +-functions are not thread-safe. ++T} Thread safety MT-Unsafe ++.TE + .SH CONFORMING TO + 4.3BSD. + .SH SEE ALSO +diff --git a/man-pages/man3/getutmp.3 b/man-pages/man3/getutmp.3 +index 89f7a5f..0fa3db3 100644 +--- a/man-pages/man3/getutmp.3 ++++ b/man-pages/man3/getutmp.3 +@@ -52,6 +52,19 @@ function performs the converse operation. + These functions do not return a value. + .SH VERSIONS + These functions first appeared in glibc in version 2.1.1. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw21 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR getutmp (), ++.BR getutmpx () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + These functions are nonstandard, but appear on a few other systems, + such as Solaris and NetBSD. +diff --git a/man-pages/man3/getw.3 b/man-pages/man3/getw.3 +index 6216a7f..23c7016 100644 +--- a/man-pages/man3/getw.3 ++++ b/man-pages/man3/getw.3 +@@ -77,6 +77,19 @@ returns the word read, and + .BR putw () + returns 0. + On error, they return \fBEOF\fP. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw14 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR getw (), ++.BR putw () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + SVr4, SUSv2. Not present in POSIX.1-2001. + .SH BUGS +diff --git a/man-pages/man3/gnu_get_libc_version.3 b/man-pages/man3/gnu_get_libc_version.3 +index f1710c9..5e9db1e 100644 +--- a/man-pages/man3/gnu_get_libc_version.3 ++++ b/man-pages/man3/gnu_get_libc_version.3 +@@ -46,6 +46,19 @@ This will be a string such as + .IR "stable" . + .SH VERSIONS + These functions first appeared in glibc in version 2.1. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw23 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR gnu_get_libc_version (), ++.BR gnu_get_libc_release () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + These functions are glibc-specific. + .SH EXAMPLE +diff --git a/man-pages/man3/grantpt.3 b/man-pages/man3/grantpt.3 +index 1d76d57..68a1165 100644 +--- a/man-pages/man3/grantpt.3 ++++ b/man-pages/man3/grantpt.3 +@@ -53,6 +53,19 @@ argument is valid but not associated with a master pseudoterminal. + .SH VERSIONS + .BR grantpt () + is provided in glibc since version 2.1. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR grantpt () ++T} Thread safety MT-Safe locale ++.TE ++ + .SH CONFORMING TO + POSIX.1-2001. + .SH NOTES +diff --git a/man-pages/man3/hsearch.3 b/man-pages/man3/hsearch.3 +index ef02541..4ec8705 100644 +--- a/man-pages/man3/hsearch.3 ++++ b/man-pages/man3/hsearch.3 +@@ -229,20 +229,26 @@ POSIX.1-2001 specifies only the + .B ENOMEM + error. + .SH ATTRIBUTES +-.SS Multithreading (see pthreads(7)) +-The ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw25 lb lb ++l l l. ++Interface Attribute Value ++T{ + .BR hcreate (), + .BR hsearch (), +-and ++.br + .BR hdestroy () +-functions use a global space for storing the table, so they are not thread-safe. +-.LP +-The ++T} Thread safety MT-Unsafe race:hsearch ++T{ + .BR hcreate_r (), + .BR hsearch_r (), +-and ++.br + .BR hdestroy_r () +-functions are thread-safe. ++T} Thread safety MT-Safe race:htab ++.TE + .SH CONFORMING TO + The functions + .BR hcreate (), +diff --git a/man-pages/man3/iconv.3 b/man-pages/man3/iconv.3 +index 97159b4..a513290 100644 +--- a/man-pages/man3/iconv.3 ++++ b/man-pages/man3/iconv.3 +@@ -139,6 +139,19 @@ An invalid multibyte sequence has been encountered in the input. + An incomplete multibyte sequence has been encountered in the input. + .SH VERSIONS + This function is available in glibc since version 2.1. ++.SH ATTRIBUTES ++.SS Multithreading (see pthreads(7)) ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR iconv () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + POSIX.1-2001. + .SH NOTES +diff --git a/man-pages/man3/if_nametoindex.3 b/man-pages/man3/if_nametoindex.3 +index fe4cf2d..95da792 100644 +--- a/man-pages/man3/if_nametoindex.3 ++++ b/man-pages/man3/if_nametoindex.3 +@@ -82,6 +82,19 @@ may also fail for any of the errors specified for + .BR socket (2) + or + .BR ioctl (2). ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw34 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR if_nametoindex (), ++.BR if_indextoname () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + RFC\ 3493, POSIX.1-2001. + +diff --git a/man-pages/man3/ilogb.3 b/man-pages/man3/ilogb.3 +index 2990e8f..87b72b5 100644 +--- a/man-pages/man3/ilogb.3 ++++ b/man-pages/man3/ilogb.3 +@@ -143,6 +143,20 @@ or raise an exception for this case. + .\" or raise an exception? + .\" log(), log2(), log10() do set errno + .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6794 ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw27 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR ilogb (), ++.BR ilogbf (), ++.BR ilogbl () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99, POSIX.1-2001. + .SH SEE ALSO +diff --git a/man-pages/man3/index.3 b/man-pages/man3/index.3 +index c206dca..64a5fdf 100644 +--- a/man-pages/man3/index.3 ++++ b/man-pages/man3/index.3 +@@ -59,6 +59,19 @@ and + .BR rindex () + functions return a pointer to + the matched character or NULL if the character is not found. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR index (), ++.BR rindex () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + 4.3BSD; marked as LEGACY in POSIX.1-2001. + POSIX.1-2008 removes the specifications of +diff --git a/man-pages/man3/inet.3 b/man-pages/man3/inet.3 +index 2f4b5ac..430075a 100644 +--- a/man-pages/man3/inet.3 ++++ b/man-pages/man3/inet.3 +@@ -207,6 +207,28 @@ struct in_addr { + }; + .fi + .in ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw30 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR inet_aton (), ++.BR inet_addr (), ++.br ++.BR inet_network (), ++.BR inet_ntoa () ++T} Thread safety MT-Safe locale ++T{ ++.BR inet_makeaddr (), ++.BR inet_lnaof (), ++.br ++.BR inet_netof () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + 4.3BSD. + .BR inet_addr () +diff --git a/man-pages/man3/inet_pton.3 b/man-pages/man3/inet_pton.3 +index b80cf37..4562b56 100644 +--- a/man-pages/man3/inet_pton.3 ++++ b/man-pages/man3/inet_pton.3 +@@ -126,6 +126,18 @@ does not contain a valid address family, \-1 is returned and + .I errno + is set to + .BR EAFNOSUPPORT . ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR inet_pton () ++T} Thread safety MT-Safe locale ++.TE + .SH CONFORMING TO + POSIX.1-2001. + .SH NOTES +diff --git a/man-pages/man3/isalpha.3 b/man-pages/man3/isalpha.3 +index ec047c5..b7e00b6 100644 +--- a/man-pages/man3/isalpha.3 ++++ b/man-pages/man3/isalpha.3 +@@ -162,6 +162,49 @@ The values returned are nonzero if the character + .I c + falls into the tested class, and a zero value + if not. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.ad l ++.TS ++allbox; ++lbw33 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR isalnum (), ++.BR isalpha (), ++.BR isascii (), ++.BR isblank (), ++.BR iscntrl (), ++.BR isdigit (), ++.BR isgraph (), ++.BR islower (), ++.BR isprint (), ++.BR ispunct (), ++.BR isspace (), ++.BR isupper (), ++.BR isxdigit () ++T} Thread safety MT-Safe ++.TE ++.ad ++.\" FIXME: need a thread-safety statement about the *_l functions ++.SH VERSIONS ++.BR isalnum_l (), ++.BR isalpha_l (), ++.BR isblank_l (), ++.BR iscntrl_l (), ++.BR isdigit_l (), ++.BR isgraph_l (), ++.BR islower_l (), ++.BR isprint_l (), ++.BR ispunct_l (), ++.BR isspace_l (), ++.BR isupper_l (), ++.BR isxdigit_l (), ++and ++.BR isascii_l () ++are available since glibc 2.3. + .SH CONFORMING TO + C99, 4.3BSD. + C89 specifies all of these functions except +diff --git a/man-pages/man3/isatty.3 b/man-pages/man3/isatty.3 +index 77480c2..344dc39 100644 +--- a/man-pages/man3/isatty.3 ++++ b/man-pages/man3/isatty.3 +@@ -59,6 +59,18 @@ POSIX.1-2001 specifies the error + .BR ENOTTY + .\" FIXME File a bug for this? + for this case. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR isatty () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + SVr4, 4.3BSD, POSIX.1-2001. + .SH SEE ALSO +diff --git a/man-pages/man3/isgreater.3 b/man-pages/man3/isgreater.3 +index 0af7505..7107fb7 100644 +--- a/man-pages/man3/isgreater.3 ++++ b/man-pages/man3/isgreater.3 +@@ -122,6 +122,25 @@ or + is NaN and 0 otherwise. + .SH ERRORS + No errors occur. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.ad l ++.TS ++allbox; ++lbw30 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR isgreater (), ++.BR isgreaterequal (), ++.BR isless (), ++.BR islessequal (), ++.BR islessgreater (), ++.BR isunordered () ++T} Thread safety MT-Safe ++.TE ++.ad + .SH CONFORMING TO + C99, POSIX.1-2001. + .SH NOTES +diff --git a/man-pages/man3/iswalnum.3 b/man-pages/man3/iswalnum.3 +index e023743..bd3b3f9 100644 +--- a/man-pages/man3/iswalnum.3 ++++ b/man-pages/man3/iswalnum.3 +@@ -63,6 +63,18 @@ if + is a wide character + belonging to the wide-character class "alnum". + Otherwise it returns zero. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR iswalnum () ++T} Thread safety MT-Safe locale ++.TE + .SH CONFORMING TO + C99. + .SH NOTES +diff --git a/man-pages/man3/iswalpha.3 b/man-pages/man3/iswalpha.3 +index 0e148bf..d3c8970 100644 +--- a/man-pages/man3/iswalpha.3 ++++ b/man-pages/man3/iswalpha.3 +@@ -67,6 +67,18 @@ if + is a wide character + belonging to the wide-character class "alpha". + Otherwise it returns zero. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR iswalpha () ++T} Thread safety MT-Safe locale ++.TE + .SH CONFORMING TO + C99. + .SH NOTES +diff --git a/man-pages/man3/iswblank.3 b/man-pages/man3/iswblank.3 +index deee7d9..6f4200f 100644 +--- a/man-pages/man3/iswblank.3 ++++ b/man-pages/man3/iswblank.3 +@@ -66,6 +66,18 @@ function returns nonzero + if \fIwc\fP is a wide character + belonging to the wide-character class "blank". + Otherwise it returns zero. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR iswblank () ++T} Thread safety MT-Safe locale ++.TE + .SH CONFORMING TO + POSIX.1-2001. + .SH NOTES +diff --git a/man-pages/man3/iswcntrl.3 b/man-pages/man3/iswcntrl.3 +index e99afd3..84428fc 100644 +--- a/man-pages/man3/iswcntrl.3 ++++ b/man-pages/man3/iswcntrl.3 +@@ -51,6 +51,18 @@ function returns nonzero if + is a + wide character belonging to the wide-character class "cntrl". + Otherwise it returns zero. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR iswcntrl () ++T} Thread safety MT-Safe locale ++.TE + .SH CONFORMING TO + C99. + .SH NOTES +diff --git a/man-pages/man3/iswctype.3 b/man-pages/man3/iswctype.3 +index 2873494..f4b4270 100644 +--- a/man-pages/man3/iswctype.3 ++++ b/man-pages/man3/iswctype.3 +@@ -54,6 +54,18 @@ the + has the designated + property. + Otherwise it returns 0. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR iswctype () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99. + .SH NOTES +diff --git a/man-pages/man3/iswlower.3 b/man-pages/man3/iswlower.3 +index 00eaa4b..7813d3f 100644 +--- a/man-pages/man3/iswlower.3 ++++ b/man-pages/man3/iswlower.3 +@@ -73,6 +73,18 @@ if + is a wide character + belonging to the wide-character class "lower". + Otherwise it returns zero. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR iswlower () ++T} Thread safety MT-Safe locale ++.TE + .SH CONFORMING TO + C99. + .SH NOTES +diff --git a/man-pages/man3/iswprint.3 b/man-pages/man3/iswprint.3 +index 43bf0ec..15d3f7a 100644 +--- a/man-pages/man3/iswprint.3 ++++ b/man-pages/man3/iswprint.3 +@@ -45,6 +45,18 @@ function returns nonzero if + is a + wide character belonging to the wide-character class "print". + Otherwise it returns zero. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR iswprint () ++T} Thread safety MT-Safe locale ++.TE + .SH CONFORMING TO + C99. + .SH NOTES +diff --git a/man-pages/man3/iswpunct.3 b/man-pages/man3/iswpunct.3 +index c629b98..9f2d0c8 100644 +--- a/man-pages/man3/iswpunct.3 ++++ b/man-pages/man3/iswpunct.3 +@@ -57,6 +57,18 @@ if + is a wide-character + belonging to the wide-character class "punct". + Otherwise it returns zero. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR iswpunct () ++T} Thread safety MT-Safe locale ++.TE + .SH CONFORMING TO + C99. + .SH NOTES +diff --git a/man-pages/man3/iswspace.3 b/man-pages/man3/iswspace.3 +index bbdfc62..83a3896 100644 +--- a/man-pages/man3/iswspace.3 ++++ b/man-pages/man3/iswspace.3 +@@ -53,6 +53,18 @@ function returns nonzero if + is a wide character + belonging to the wide-character class "space". + Otherwise it returns zero. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR iswspace () ++T} Thread safety MT-Safe locale ++.TE + .SH CONFORMING TO + C99. + .SH NOTES +diff --git a/man-pages/man3/iswupper.3 b/man-pages/man3/iswupper.3 +index 0383f52..0e1e3ca 100644 +--- a/man-pages/man3/iswupper.3 ++++ b/man-pages/man3/iswupper.3 +@@ -67,6 +67,18 @@ function returns nonzero if + is a wide character + belonging to the wide-character class "upper". + Otherwise it returns zero. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR iswupper () ++T} Thread safety MT-Safe locale ++.TE + .SH CONFORMING TO + C99. + .SH NOTES +diff --git a/man-pages/man3/iswxdigit.3 b/man-pages/man3/iswxdigit.3 +index 2c21b39..5714eeb 100644 +--- a/man-pages/man3/iswxdigit.3 ++++ b/man-pages/man3/iswxdigit.3 +@@ -58,6 +58,18 @@ function returns nonzero if + is a wide character + belonging to the wide-character class "xdigit". + Otherwise it returns zero. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR iswxdigit () ++T} Thread safety MT-Safe locale ++.TE + .SH CONFORMING TO + C99. + .SH NOTES +diff --git a/man-pages/man3/j0.3 b/man-pages/man3/j0.3 +index f2e3365..bc0637c 100644 +--- a/man-pages/man3/j0.3 ++++ b/man-pages/man3/j0.3 +@@ -147,6 +147,30 @@ These functions do not raise exceptions for + .\" FIXME . Is it intentional that these functions do not raise exceptions? + .\" e.g., j0(1.5e16) + .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6805 ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR j0 (), ++.BR j0f (), ++.BR j0l () ++T} Thread safety MT-Safe ++T{ ++.BR j1 (), ++.BR j1f (), ++.BR j1l () ++T} Thread safety MT-Safe ++T{ ++.BR jn (), ++.BR jnf (), ++.BR jnl () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + The functions returning + .I double +diff --git a/man-pages/man3/ldexp.3 b/man-pages/man3/ldexp.3 +index 07d3e2a..15bf899 100644 +--- a/man-pages/man3/ldexp.3 ++++ b/man-pages/man3/ldexp.3 +@@ -126,6 +126,20 @@ is set to + An underflow floating-point exception + .RB ( FE_UNDERFLOW ) + is raised. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw27 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR ldexp (), ++.BR ldexpf (), ++.BR ldexpl () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99, POSIX.1-2001. + The variant returning +diff --git a/man-pages/man3/lio_listio.3 b/man-pages/man3/lio_listio.3 +index 3881ccb..96eb394 100644 +--- a/man-pages/man3/lio_listio.3 ++++ b/man-pages/man3/lio_listio.3 +@@ -202,6 +202,19 @@ then none of the I/O operations has been initiated. + The + .BR lio_listio () + function is available since glibc 2.1. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR lio_listio () ++T} Thread safety MT-Safe ++.TE ++ + .SH CONFORMING TO + POSIX.1-2001, POSIX.1-2008. + .SH NOTES +diff --git a/man-pages/man3/localeconv.3 b/man-pages/man3/localeconv.3 +index 1a66878..7d87a34 100644 +--- a/man-pages/man3/localeconv.3 ++++ b/man-pages/man3/localeconv.3 +@@ -63,11 +63,17 @@ The + .BR localeconv () + function always succeeds. + .SH ATTRIBUTES +-.SS Multithreading (see pthreads(7)) +-The ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ + .BR localeconv () +-function is not thread-safe, since it returns a pointer to a structure which +-might be overwritten by subsequent calls. ++T} Thread safety MT-Unsafe race:localeconv locale ++.TE + .SH CONFORMING TO + C89, C99. + .SH BUGS +diff --git a/man-pages/man3/lockf.3 b/man-pages/man3/lockf.3 +index c618c2a..7509bc2 100644 +--- a/man-pages/man3/lockf.3 ++++ b/man-pages/man3/lockf.3 +@@ -151,6 +151,18 @@ An invalid operation was specified in + .TP + .B ENOLCK + Too many segment locks open, lock table is full. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR lockf () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + SVr4, POSIX.1-2001. + .SH SEE ALSO +diff --git a/man-pages/man3/log10.3 b/man-pages/man3/log10.3 +index 437f03b..3c28cfc 100644 +--- a/man-pages/man3/log10.3 ++++ b/man-pages/man3/log10.3 +@@ -86,6 +86,20 @@ when calling these functions. + + For a discussion of the errors that can occur for these functions, see + .BR log (3). ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw28 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR log10 (), ++.BR log10f (), ++.BR log10l () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99, POSIX.1-2001. + The variant returning +diff --git a/man-pages/man3/log1p.3 b/man-pages/man3/log1p.3 +index d0164d3..e175ea8 100644 +--- a/man-pages/man3/log1p.3 ++++ b/man-pages/man3/log1p.3 +@@ -139,6 +139,20 @@ These functions do not set + .\" FIXME . Is it intentional that these functions do not set errno? + .\" log(), log2(), log10() do set errno + .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6792 ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw27 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR log1p (), ++.BR log1pf (), ++.BR log1pl () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99, POSIX.1-2001. + .\" BSD +diff --git a/man-pages/man3/logb.3 b/man-pages/man3/logb.3 +index 77e9f74..6309710 100644 +--- a/man-pages/man3/logb.3 ++++ b/man-pages/man3/logb.3 +@@ -140,6 +140,20 @@ These functions do not set + .\" .BR logb () + .\" function occurs in 4.3BSD. + .\" see IEEE.3 in the 4.3BSD manual ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw24 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR logb (), ++.BR logbf (), ++.BR logbl () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99, POSIX.1-2001. + .SH SEE ALSO +diff --git a/man-pages/man3/lrint.3 b/man-pages/man3/lrint.3 +index ffb24e2..97efc54 100644 +--- a/man-pages/man3/lrint.3 ++++ b/man-pages/man3/lrint.3 +@@ -106,6 +106,24 @@ These functions do not set + .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6798 + .SH VERSIONS + These functions first appeared in glibc in version 2.1. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw30 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR lrint (), ++.BR lrintf (), ++.BR lrintl (), ++.br ++.BR llrint (), ++.BR llrintf (), ++.BR llrintl () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99, POSIX.1-2001. + .SH SEE ALSO +diff --git a/man-pages/man3/lround.3 b/man-pages/man3/lround.3 +index e9bacac..fb65128 100644 +--- a/man-pages/man3/lround.3 ++++ b/man-pages/man3/lround.3 +@@ -109,6 +109,24 @@ These functions do not set + .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6797 + .SH VERSIONS + These functions first appeared in glibc in version 2.1. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw33 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR lround (), ++.BR lroundf (), ++.BR lroundl (), ++.br ++.BR llround (), ++.BR llroundf (), ++.BR llroundl () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99, POSIX.1-2001. + .SH SEE ALSO +diff --git a/man-pages/man3/makecontext.3 b/man-pages/man3/makecontext.3 +index 9a8b7a8..d125581 100644 +--- a/man-pages/man3/makecontext.3 ++++ b/man-pages/man3/makecontext.3 +@@ -102,6 +102,21 @@ Insufficient stack space left. + and + .BR swapcontext () + are provided in glibc since version 2.1. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR makecontext () ++T} Thread safety MT-Safe race:ucp ++T{ ++.BR swapcontext () ++T} Thread safety MT-Safe race:oucp race:ucp ++.TE + .SH CONFORMING TO + SUSv2, POSIX.1-2001. + POSIX.1-2008 removes the specifications of +diff --git a/man-pages/man3/makedev.3 b/man-pages/man3/makedev.3 +index d093f3d..a03345d 100644 +--- a/man-pages/man3/makedev.3 ++++ b/man-pages/man3/makedev.3 +@@ -59,6 +59,20 @@ they return, respectively, the major and minor components. + These macros can be useful to, for example, + decompose the device IDs in the structure returned by + .BR stat (2). ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw27 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR makedev (), ++.BR major (), ++.BR minor () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + The + .BR makedev (), +diff --git a/man-pages/man3/malloc.3 b/man-pages/man3/malloc.3 +index 1526d2a..c8b7228 100644 +--- a/man-pages/man3/malloc.3 ++++ b/man-pages/man3/malloc.3 +@@ -165,6 +165,21 @@ is returned. + If + .BR realloc () + fails the original block is left untouched; it is not freed or moved. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw38 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR malloc (), ++.BR free (), ++.BR calloc (), ++.BR realloc () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C89, C99. + .SH NOTES +diff --git a/man-pages/man3/malloc_usable_size.3 b/man-pages/man3/malloc_usable_size.3 +index c873411..cdd171a 100644 +--- a/man-pages/man3/malloc_usable_size.3 ++++ b/man-pages/man3/malloc_usable_size.3 +@@ -45,6 +45,18 @@ the block of allocated memory pointed to by + If + .I ptr + is NULL, 0 is returned. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw20 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR malloc_usable_size () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + This function is a GNU extension. + .SH NOTES +diff --git a/man-pages/man3/mblen.3 b/man-pages/man3/mblen.3 +index ca1e275..c78c359 100644 +--- a/man-pages/man3/mblen.3 ++++ b/man-pages/man3/mblen.3 +@@ -85,10 +85,17 @@ It returns \-1, if an + invalid multibyte sequence was encountered or if it couldn't parse a complete + multibyte character. + .SH ATTRIBUTES +-.SS Multithreading (see pthreads(7)) +-The ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ + .BR mblen () +-function is not thread-safe. ++T} Thread safety MT-Unsafe race ++.TE + .SH CONFORMING TO + C99. + .SH NOTES +diff --git a/man-pages/man3/mbrlen.3 b/man-pages/man3/mbrlen.3 +index e5ecbca..925c93f 100644 +--- a/man-pages/man3/mbrlen.3 ++++ b/man-pages/man3/mbrlen.3 +@@ -102,11 +102,17 @@ character, meaning that + .I n + should be increased. + .SH ATTRIBUTES +-.SS Multithreading (see pthreads(7)) +-The ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ + .BR mbrlen () +-function is thread-safe with exceptions. +-It is not thread-safe if called with a NULL \fIps\fP parameter. ++T} Thread safety MT-Unsafe race:mbrlen/!ps ++.TE + .SH CONFORMING TO + C99. + .SH NOTES +diff --git a/man-pages/man3/mbrtowc.3 b/man-pages/man3/mbrtowc.3 +index db32b8b..31f91db 100644 +--- a/man-pages/man3/mbrtowc.3 ++++ b/man-pages/man3/mbrtowc.3 +@@ -172,11 +172,17 @@ character, meaning that + .I n + should be increased. + .SH ATTRIBUTES +-.SS Multithreading (see pthreads(7)) +-The ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ + .BR mbrtowc () +-function is thread-safe with exceptions. +-It is not thread-safe if called with a NULL \fIps\fP parameter. ++T} Thread safety MT-Unsafe race:mbrtowc/!ps ++.TE + .SH CONFORMING TO + C99. + .SH NOTES +diff --git a/man-pages/man3/mbsinit.3 b/man-pages/man3/mbsinit.3 +index 3f11733..24bb575 100644 +--- a/man-pages/man3/mbsinit.3 ++++ b/man-pages/man3/mbsinit.3 +@@ -81,6 +81,18 @@ is an initial state, or if + .I ps + is a NULL pointer. + Otherwise it returns 0. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR mbsinit () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99. + .SH NOTES +diff --git a/man-pages/man3/mbstowcs.3 b/man-pages/man3/mbstowcs.3 +index 7ddff2a..a5ceac3 100644 +--- a/man-pages/man3/mbstowcs.3 ++++ b/man-pages/man3/mbstowcs.3 +@@ -90,6 +90,18 @@ If an invalid multibyte sequence was + encountered, + .I (size_t)\ \-1 + is returned. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR mbstowcs () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99. + .SH NOTES +diff --git a/man-pages/man3/mbtowc.3 b/man-pages/man3/mbtowc.3 +index a871de3..5e8794a 100644 +--- a/man-pages/man3/mbtowc.3 ++++ b/man-pages/man3/mbtowc.3 +@@ -111,6 +111,18 @@ is NULL, the + function + returns nonzero if the encoding + has nontrivial shift state, or zero if the encoding is stateless. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR mbtowc () ++T} Thread safety MT-Unsafe race ++.TE + .SH CONFORMING TO + C99. + .SH NOTES +diff --git a/man-pages/man3/memccpy.3 b/man-pages/man3/memccpy.3 +index fd8b409..f5a91c1 100644 +--- a/man-pages/man3/memccpy.3 ++++ b/man-pages/man3/memccpy.3 +@@ -67,6 +67,18 @@ first + .I n + characters of + .IR src . ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR memccpy () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + SVr4, 4.3BSD, POSIX.1-2001. + .SH SEE ALSO +diff --git a/man-pages/man3/memchr.3 b/man-pages/man3/memchr.3 +index 26b7ce7..3bf2be8 100644 +--- a/man-pages/man3/memchr.3 ++++ b/man-pages/man3/memchr.3 +@@ -121,6 +121,20 @@ first appeared in glibc in version 2.1. + + .BR memrchr () + first appeared in glibc in version 2.2. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw32 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR memchr (), ++.BR memrchr (), ++.BR rawmemchr () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + The + .BR memchr () +diff --git a/man-pages/man3/memcmp.3 b/man-pages/man3/memcmp.3 +index b843c34..d5838b9 100644 +--- a/man-pages/man3/memcmp.3 ++++ b/man-pages/man3/memcmp.3 +@@ -57,6 +57,18 @@ that differ in + .I s1 + and + .IR s2 . ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR memcmp () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + SVr4, 4.3BSD, C89, C99, POSIX.1-2001. + .SH SEE ALSO +diff --git a/man-pages/man3/memcpy.3 b/man-pages/man3/memcpy.3 +index c63db2c..96a3623 100644 +--- a/man-pages/man3/memcpy.3 ++++ b/man-pages/man3/memcpy.3 +@@ -49,6 +49,18 @@ if the memory areas do overlap. + The + .BR memcpy () + function returns a pointer to \fIdest\fP. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR memcpy () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + SVr4, 4.3BSD, C89, C99, POSIX.1-2001. + .SH SEE ALSO +diff --git a/man-pages/man3/memfrob.3 b/man-pages/man3/memfrob.3 +index 84dd60b..666832f 100644 +--- a/man-pages/man3/memfrob.3 ++++ b/man-pages/man3/memfrob.3 +@@ -55,6 +55,18 @@ The + .BR memfrob () + function returns a pointer to the encrypted memory + area. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR memfrob () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + The + .BR memfrob () +diff --git a/man-pages/man3/memmem.3 b/man-pages/man3/memmem.3 +index f3bc9b8..8118676 100644 +--- a/man-pages/man3/memmem.3 ++++ b/man-pages/man3/memmem.3 +@@ -56,6 +56,18 @@ The + .BR memmem () + function returns a pointer to the beginning of the + substring, or NULL if the substring is not found. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR memmem () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + This function is a GNU extension. + .SH BUGS +diff --git a/man-pages/man3/memmove.3 b/man-pages/man3/memmove.3 +index ab503ed..1b27956 100644 +--- a/man-pages/man3/memmove.3 ++++ b/man-pages/man3/memmove.3 +@@ -59,6 +59,18 @@ The + .BR memmove () + function returns a pointer to + .IR dest . ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR memmove () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + SVr4, 4.3BSD, C89, C99, POSIX.1-2001. + .SH SEE ALSO +diff --git a/man-pages/man3/mempcpy.3 b/man-pages/man3/mempcpy.3 +index 3a4bb2d..c169f34 100644 +--- a/man-pages/man3/mempcpy.3 ++++ b/man-pages/man3/mempcpy.3 +@@ -57,6 +57,19 @@ wide characters. + .SH VERSIONS + .BR mempcpy () + first appeared in glibc in version 2.1. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw21 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR mempcpy (), ++.BR wmempcpy () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + This function is a GNU extension. + .SH EXAMPLE +diff --git a/man-pages/man3/memset.3 b/man-pages/man3/memset.3 +index 46f5580..aef3c4f 100644 +--- a/man-pages/man3/memset.3 ++++ b/man-pages/man3/memset.3 +@@ -51,6 +51,18 @@ The + .BR memset () + function returns a pointer to the memory area + .IR s . ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR memset () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + SVr4, 4.3BSD, C89, C99, POSIX.1-2001. + .SH SEE ALSO +diff --git a/man-pages/man3/mkdtemp.3 b/man-pages/man3/mkdtemp.3 +index ad8429f..cd2e484 100644 +--- a/man-pages/man3/mkdtemp.3 ++++ b/man-pages/man3/mkdtemp.3 +@@ -83,6 +83,18 @@ Also see + for other possible values for \fIerrno\fP. + .SH VERSIONS + Available since glibc 2.1.91. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR mkdtemp () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + POSIX.1-2008. + This function is present on the BSDs. +diff --git a/man-pages/man3/mkfifo.3 b/man-pages/man3/mkfifo.3 +index 5272d16..0cea17d 100644 +--- a/man-pages/man3/mkfifo.3 ++++ b/man-pages/man3/mkfifo.3 +@@ -101,6 +101,19 @@ directory. + .TP + .B EROFS + \fIpathname\fP refers to a read-only file system. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw20 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR mkfifo (), ++.BR mkfifoat () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + POSIX.1-2001. + .SH SEE ALSO +diff --git a/man-pages/man3/mkstemp.3 b/man-pages/man3/mkstemp.3 +index fbd5809..d58eb73 100644 +--- a/man-pages/man3/mkstemp.3 ++++ b/man-pages/man3/mkstemp.3 +@@ -173,6 +173,22 @@ is available since glibc 2.7. + and + .BR mkostemps () + are available since glibc 2.11. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw23 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR mkstemp (), ++.BR mkostemp (), ++.br ++.BR mkstemps (), ++.BR mkostemps () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + .BR mkstemp (): + 4.3BSD, POSIX.1-2001. +diff --git a/man-pages/man3/mktemp.3 b/man-pages/man3/mktemp.3 +index 688aba4..ada5128 100644 +--- a/man-pages/man3/mktemp.3 ++++ b/man-pages/man3/mktemp.3 +@@ -89,6 +89,18 @@ is set to indicate the error. + .TP + .B EINVAL + The last six characters of \fItemplate\fP were not XXXXXX. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR mktemp () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + 4.3BSD, POSIX.1-2001. + POSIX.1-2008 removes the specification of +diff --git a/man-pages/man3/modf.3 b/man-pages/man3/modf.3 +index b997ccb..03b5144 100644 +--- a/man-pages/man3/modf.3 ++++ b/man-pages/man3/modf.3 +@@ -93,13 +93,19 @@ is set to positive infinity (negative infinity). + .SH ERRORS + No errors occur. + .SH ATTRIBUTES +-.SS Multithreading (see pthreads(7)) +-The ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw24 lb lb ++l l l. ++Interface Attribute Value ++T{ + .BR modf (), + .BR modff (), +-and + .BR modfl () +-functions are thread-safe. ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99, POSIX.1-2001. + The variant returning +diff --git a/man-pages/man3/mq_close.3 b/man-pages/man3/mq_close.3 +index 427aba7..f08dde1 100644 +--- a/man-pages/man3/mq_close.3 ++++ b/man-pages/man3/mq_close.3 +@@ -56,6 +56,18 @@ set to indicate the error. + The descriptor specified in + .I mqdes + is invalid. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR mq_close () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + POSIX.1-2001. + .SH NOTES +diff --git a/man-pages/man3/mq_getattr.3 b/man-pages/man3/mq_getattr.3 +index 5b44472..7f65b18 100644 +--- a/man-pages/man3/mq_getattr.3 ++++ b/man-pages/man3/mq_getattr.3 +@@ -134,6 +134,19 @@ is invalid. + .I newattr\->mq_flags + contained set bits other than + .BR O_NONBLOCK . ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw26 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR mq_getattr (), ++.BR mq_setattr () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + POSIX.1-2001. + .SH NOTES +diff --git a/man-pages/man3/mq_open.3 b/man-pages/man3/mq_open.3 +index 6bd2e77..35f2266 100644 +--- a/man-pages/man3/mq_open.3 ++++ b/man-pages/man3/mq_open.3 +@@ -221,6 +221,18 @@ This probably occurred because the + .I queues_max + limit was encountered; see + .BR mq_overview (7). ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR mq_open () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + POSIX.1-2001. + .SH BUGS +diff --git a/man-pages/man3/mq_receive.3 b/man-pages/man3/mq_receive.3 +index b7a1554..5f8c89e 100644 +--- a/man-pages/man3/mq_receive.3 ++++ b/man-pages/man3/mq_receive.3 +@@ -153,6 +153,19 @@ attribute of the message queue. + .TP + .B ETIMEDOUT + The call timed out before a message could be transferred. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw31 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR mq_receive (), ++.BR mq_timedreceive () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + POSIX.1-2001. + .SH NOTES +diff --git a/man-pages/man3/mq_send.3 b/man-pages/man3/mq_send.3 +index b99c861..e53cee7 100644 +--- a/man-pages/man3/mq_send.3 ++++ b/man-pages/man3/mq_send.3 +@@ -158,6 +158,19 @@ attribute of the message queue. + .TP + .B ETIMEDOUT + The call timed out before a message could be transferred. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw25 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR mq_send (), ++.BR mq_timedsend () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + POSIX.1-2001. + .SH NOTES +diff --git a/man-pages/man3/mq_unlink.3 b/man-pages/man3/mq_unlink.3 +index 16af6bf..2b944a7 100644 +--- a/man-pages/man3/mq_unlink.3 ++++ b/man-pages/man3/mq_unlink.3 +@@ -59,6 +59,18 @@ was too long. + .B ENOENT + There is no message queue with the given + .IR name . ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR mq_unlink () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + POSIX.1-2001. + .SH SEE ALSO +diff --git a/man-pages/man3/mtrace.3 b/man-pages/man3/mtrace.3 +index c6ad1ae..472d336 100644 +--- a/man-pages/man3/mtrace.3 ++++ b/man-pages/man3/mtrace.3 +@@ -75,6 +75,19 @@ In set-user-ID and set-group-ID programs, + is ignored, and + .BR mtrace () + has no effect. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw20 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR mtrace (), ++.BR muntrace () ++T} Thread safety MT-Unsafe ++.TE + .SH CONFORMING TO + These functions are GNU extensions. + .SH NOTES +diff --git a/man-pages/man3/nan.3 b/man-pages/man3/nan.3 +index cf045ce..016c1ae 100644 +--- a/man-pages/man3/nan.3 ++++ b/man-pages/man3/nan.3 +@@ -72,6 +72,20 @@ selects one. + On other systems it may do nothing. + .SH VERSIONS + These functions first appeared in glibc in version 2.1. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw21 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR nan (), ++.BR nanf (), ++.BR nanl () ++T} Thread safety MT-Safe locale ++.TE + .SH CONFORMING TO + C99, POSIX.1-2001. + See also IEC 559 and the appendix with +diff --git a/man-pages/man3/nextafter.3 b/man-pages/man3/nextafter.3 +index 7b94e23..f204e57 100644 +--- a/man-pages/man3/nextafter.3 ++++ b/man-pages/man3/nextafter.3 +@@ -170,6 +170,25 @@ These functions do not set + .IR errno . + .\" FIXME . Is it intentional that these functions do not set errno? + .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6799 ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw28 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR nextafter (), ++.BR nextafterf (), ++.br ++.BR nextafterl (), ++.BR nexttoward (), ++.br ++.BR nexttowardf (), ++.BR nexttowardl () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99, POSIX.1-2001. + This function is defined in IEC 559 (and the appendix with +diff --git a/man-pages/man3/nl_langinfo.3 b/man-pages/man3/nl_langinfo.3 +index 3962a6a..4c2ce58 100644 +--- a/man-pages/man3/nl_langinfo.3 ++++ b/man-pages/man3/nl_langinfo.3 +@@ -119,7 +119,18 @@ The Latin-1 default has historical reasons, + since all Unix systems originally used only 8-bit character encoding. + For more information about ISO-8859-1 see + .BR charsets (7). +- ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR nl_langinfo () ++T} Thread safety MT-Safe locale ++.TE + .SH CONFORMING TO + SUSv2, POSIX.1-2001. + .SH EXAMPLE +diff --git a/man-pages/man3/opendir.3 b/man-pages/man3/opendir.3 +index 4b365d2..316dcff 100644 +--- a/man-pages/man3/opendir.3 ++++ b/man-pages/man3/opendir.3 +@@ -115,6 +115,19 @@ Insufficient memory to complete the operation. + .SH VERSIONS + .BR fdopendir () + is available in glibc since version 2.4. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw22 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR opendir (), ++.BR fdopendir () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + .BR opendir () + is present on SVr4, 4.3BSD, and specified in POSIX.1-2001. +diff --git a/man-pages/man3/posix_fallocate.3 b/man-pages/man3/posix_fallocate.3 +index 89a6b20..f5c50ff 100644 +--- a/man-pages/man3/posix_fallocate.3 ++++ b/man-pages/man3/posix_fallocate.3 +@@ -100,6 +100,18 @@ refers to a pipe. + .SH VERSIONS + .BR posix_fallocate () + is available since glibc 2.1.94. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR posix_fallocate () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + POSIX.1-2001. + +diff --git a/man-pages/man3/posix_openpt.3 b/man-pages/man3/posix_openpt.3 +index 5df3e79..21a24fc 100644 +--- a/man-pages/man3/posix_openpt.3 ++++ b/man-pages/man3/posix_openpt.3 +@@ -74,6 +74,18 @@ See + Glibc support for + .BR posix_openpt () + has been provided since version 2.2.1. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR posix_openpt () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + .BR posix_openpt () + is part of the UNIX 98 pseudoterminal support (see +diff --git a/man-pages/man3/pow.3 b/man-pages/man3/pow.3 +index 135318a..502de17 100644 +--- a/man-pages/man3/pow.3 ++++ b/man-pages/man3/pow.3 +@@ -313,6 +313,20 @@ is set to + An underflow floating-point exception + .RB ( FE_UNDERFLOW ) + is raised. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw24 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR pow (), ++.BR powf (), ++.BR powl () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99, POSIX.1-2001. + The variant returning +diff --git a/man-pages/man3/pow10.3 b/man-pages/man3/pow10.3 +index 9cebc5d..8703e9b 100644 +--- a/man-pages/man3/pow10.3 ++++ b/man-pages/man3/pow10.3 +@@ -46,6 +46,20 @@ power + .IR x . + .SH VERSIONS + These functions first appeared in glibc in version 2.1. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw28 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR pow10 (), ++.BR pow10f (), ++.BR pow10l () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + This is a GNU extension. + .SH NOTES +diff --git a/man-pages/man3/pthread_attr_setdetachstate.3 b/man-pages/man3/pthread_attr_setdetachstate.3 +index 4cd08c0..4a6acd5 100644 +--- a/man-pages/man3/pthread_attr_setdetachstate.3 ++++ b/man-pages/man3/pthread_attr_setdetachstate.3 +@@ -84,6 +84,19 @@ can fail with the following error: + .B EINVAL + An invalid value was specified in + .IR detachstate . ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw30 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR pthread_attr_setdetachstate (), ++.BR pthread_attr_getdetachstate () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + POSIX.1-2001. + .SH NOTES +diff --git a/man-pages/man3/pthread_attr_setguardsize.3 b/man-pages/man3/pthread_attr_setguardsize.3 +index 91433d2..6161675 100644 +--- a/man-pages/man3/pthread_attr_setguardsize.3 ++++ b/man-pages/man3/pthread_attr_setguardsize.3 +@@ -103,6 +103,19 @@ On Linux these functions always succeed + handle a possible error return). + .SH VERSIONS + These functions are provided by glibc since version 2.1. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw28 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR pthread_attr_setguardsize (), ++.BR pthread_attr_getguardsize () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + POSIX.1-2001. + .SH NOTES +diff --git a/man-pages/man3/pthread_attr_setinheritsched.3 b/man-pages/man3/pthread_attr_setinheritsched.3 +index 0128df3..f2d7e34 100644 +--- a/man-pages/man3/pthread_attr_setinheritsched.3 ++++ b/man-pages/man3/pthread_attr_setinheritsched.3 +@@ -107,6 +107,19 @@ error ("attempt was made to set the attribute to an unsupported value") for + .BR pthread_attr_setinheritsched (). + .\" .SH VERSIONS + .\" Available since glibc 2.0. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw31 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR pthread_attr_setinheritsched (), ++.BR pthread_attr_getinheritsched () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + POSIX.1-2001. + .SH BUGS +diff --git a/man-pages/man3/pthread_attr_setschedparam.3 b/man-pages/man3/pthread_attr_setschedparam.3 +index f4cf261..e012051 100644 +--- a/man-pages/man3/pthread_attr_setschedparam.3 ++++ b/man-pages/man3/pthread_attr_setschedparam.3 +@@ -97,6 +97,19 @@ On Linux these functions always succeed + handle a possible error return). + .\" .SH VERSIONS + .\" Available since glibc 2.0. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw29 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR pthread_attr_setschedparam (), ++.BR pthread_attr_getschedparam () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + POSIX.1-2001. + .SH NOTES +diff --git a/man-pages/man3/pthread_attr_setschedpolicy.3 b/man-pages/man3/pthread_attr_setschedpolicy.3 +index 9588615..2f815d2 100644 +--- a/man-pages/man3/pthread_attr_setschedpolicy.3 ++++ b/man-pages/man3/pthread_attr_setschedpolicy.3 +@@ -97,6 +97,19 @@ error ("attempt was made to set the attribute to an unsupported value") for + .BR pthread_attr_setschedpolicy (). + .\" .SH VERSIONS + .\" Available since glibc 2.0. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw30 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR pthread_attr_setschedpolicy (), ++.BR pthread_attr_getschedpolicy () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + POSIX.1-2001. + .SH EXAMPLE +diff --git a/man-pages/man3/pthread_attr_setscope.3 b/man-pages/man3/pthread_attr_setscope.3 +index c4aa4fc..be60893 100644 +--- a/man-pages/man3/pthread_attr_setscope.3 ++++ b/man-pages/man3/pthread_attr_setscope.3 +@@ -116,6 +116,19 @@ An invalid value was specified in + specified the value + .BR PTHREAD_SCOPE_PROCESS , + which is not supported on Linux. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw24 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR pthread_attr_setscope (), ++.BR pthread_attr_getscope () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + POSIX.1-2001. + .SH NOTES +diff --git a/man-pages/man3/pthread_attr_setstack.3 b/man-pages/man3/pthread_attr_setstack.3 +index 39e7797..60cc854 100644 +--- a/man-pages/man3/pthread_attr_setstack.3 ++++ b/man-pages/man3/pthread_attr_setstack.3 +@@ -109,6 +109,19 @@ and + is not both readable and writable by the caller. + .SH VERSIONS + These functions are provided by glibc since version 2.2. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw24 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR pthread_attr_setstack (), ++.BR pthread_attr_getstack () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + POSIX.1-2001. + .SH NOTES +diff --git a/man-pages/man3/pthread_attr_setstackaddr.3 b/man-pages/man3/pthread_attr_setstackaddr.3 +index 862cd6a..d2203de 100644 +--- a/man-pages/man3/pthread_attr_setstackaddr.3 ++++ b/man-pages/man3/pthread_attr_setstackaddr.3 +@@ -80,6 +80,19 @@ No errors are defined + handle a possible error return). + .SH VERSIONS + These functions are provided by glibc since version 2.1. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw28 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR pthread_attr_setstackaddr (), ++.BR pthread_attr_getstackaddr () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + POSIX.1-2001 specifies these functions but marks them as obsolete. + POSIX.1-2008 removes the specification of these functions. +diff --git a/man-pages/man3/pthread_attr_setstacksize.3 b/man-pages/man3/pthread_attr_setstacksize.3 +index 841b6ac..06db657 100644 +--- a/man-pages/man3/pthread_attr_setstacksize.3 ++++ b/man-pages/man3/pthread_attr_setstacksize.3 +@@ -80,6 +80,19 @@ if + is not a multiple of the system page size. + .SH VERSIONS + These functions are provided by glibc since version 2.1. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw28 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR pthread_attr_setstacksize (), ++.BR pthread_attr_getstacksize () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + POSIX.1-2001. + .SH NOTES +diff --git a/man-pages/man3/pthread_equal.3 b/man-pages/man3/pthread_equal.3 +index b734ea8..879a056 100644 +--- a/man-pages/man3/pthread_equal.3 ++++ b/man-pages/man3/pthread_equal.3 +@@ -44,6 +44,18 @@ If the two thread IDs are equal, + returns a nonzero value; otherwise, it returns 0. + .SH ERRORS + This function always succeeds. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR pthread_equal () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + POSIX.1-2001. + .SH NOTES +diff --git a/man-pages/man3/pthread_exit.3 b/man-pages/man3/pthread_exit.3 +index 9781327..ed8809e 100644 +--- a/man-pages/man3/pthread_exit.3 ++++ b/man-pages/man3/pthread_exit.3 +@@ -72,6 +72,18 @@ are called. + This function does not return to the caller. + .SH ERRORS + This function always succeeds. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR pthread_exit () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + POSIX.1-2001. + .SH NOTES +diff --git a/man-pages/man3/pthread_getcpuclockid.3 b/man-pages/man3/pthread_getcpuclockid.3 +index c2193a0..6f28122 100644 +--- a/man-pages/man3/pthread_getcpuclockid.3 ++++ b/man-pages/man3/pthread_getcpuclockid.3 +@@ -62,6 +62,18 @@ No thread with the ID + could be found. + .SH VERSIONS + This function is available in glibc since version 2.2. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw23 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR pthread_getcpuclockid () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + POSIX.1-2001. + .SH NOTES +diff --git a/man-pages/man3/pthread_kill.3 b/man-pages/man3/pthread_kill.3 +index 0c0703a..2a841e0 100644 +--- a/man-pages/man3/pthread_kill.3 ++++ b/man-pages/man3/pthread_kill.3 +@@ -63,6 +63,18 @@ An invalid signal was specified. + No thread with the ID + .I thread + could be found. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR pthread_kill () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + POSIX.1-2001. + .SH NOTES +diff --git a/man-pages/man3/pthread_kill_other_threads_np.3 b/man-pages/man3/pthread_kill_other_threads_np.3 +index 92c5e4e..5ba8c3f 100644 +--- a/man-pages/man3/pthread_kill_other_threads_np.3 ++++ b/man-pages/man3/pthread_kill_other_threads_np.3 +@@ -44,6 +44,18 @@ to-be-terminated threads are ignored, + and the cleanup handlers are not called in those threads. + .\" .SH VERSIONS + .\" Available since glibc 2.0 ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw31 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR pthread_kill_other_threads_np () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + This function is a nonstandard GNU extension; + hence the suffix "_np" (nonportable) in the name. +diff --git a/man-pages/man3/pthread_self.3 b/man-pages/man3/pthread_self.3 +index bd06066..2753753 100644 +--- a/man-pages/man3/pthread_self.3 ++++ b/man-pages/man3/pthread_self.3 +@@ -47,6 +47,18 @@ call that created this thread. + This function always succeeds, returning the calling thread's ID. + .SH ERRORS + This function always succeeds. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR pthread_self () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + POSIX.1-2001. + .SH NOTES +diff --git a/man-pages/man3/pthread_setaffinity_np.3 b/man-pages/man3/pthread_setaffinity_np.3 +index 0fc7239..2200d62 100644 +--- a/man-pages/man3/pthread_setaffinity_np.3 ++++ b/man-pages/man3/pthread_setaffinity_np.3 +@@ -118,6 +118,19 @@ No thread with the ID + could be found. + .SH VERSIONS + These functions are provided by glibc since version 2.3.4. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw25 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR pthread_setaffinity_np (), ++.BR pthread_getaffinity_np () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + These functions are nonstandard GNU extensions; + hence the suffix "_np" (nonportable) in the names. +diff --git a/man-pages/man3/pthread_setcancelstate.3 b/man-pages/man3/pthread_setcancelstate.3 +index 06d5451..556eb31 100644 +--- a/man-pages/man3/pthread_setcancelstate.3 ++++ b/man-pages/man3/pthread_setcancelstate.3 +@@ -110,6 +110,30 @@ Invalid value for + .IR type . + .\" .SH VERSIONS + .\" Available since glibc 2.0 ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.ad l ++.TS ++allbox; ++lb lb lb ++lw25 l l. ++Interface Attribute Value ++T{ ++.BR pthread_setcancelstate (), ++.BR pthread_setcanceltype () ++T} Thread safety T{ ++MT-Safe ++T} ++T{ ++.BR pthread_setcancelstate (), ++.BR pthread_setcanceltype () ++T} Async-cancel-safety T{ ++AC-Safe ++T} ++.TE ++.ad ++.hy + .SH CONFORMING TO + POSIX.1-2001. + .SH NOTES +diff --git a/man-pages/man3/pthread_setconcurrency.3 b/man-pages/man3/pthread_setconcurrency.3 +index b86cd88..34d2dcb 100644 +--- a/man-pages/man3/pthread_setconcurrency.3 ++++ b/man-pages/man3/pthread_setconcurrency.3 +@@ -80,6 +80,19 @@ error ("the value specified by + would cause a system resource to be exceeded"). + .SH VERSIONS + These functions are available in glibc since version 2.1. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw25 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR pthread_setconcurrency (), ++.BR pthread_getconcurrency () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + POSIX.1-2001. + .SH NOTES +diff --git a/man-pages/man3/pthread_setschedparam.3 b/man-pages/man3/pthread_setschedparam.3 +index 693122d..7c9ba7d 100644 +--- a/man-pages/man3/pthread_setschedparam.3 ++++ b/man-pages/man3/pthread_setschedparam.3 +@@ -138,6 +138,19 @@ to an unsupported value") error for + .BR pthread_setschedparam (). + .\" .SH VERSIONS + .\" Available since glibc 2.0 ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw24 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR pthread_setschedparam (), ++.BR pthread_getschedparam () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + POSIX.1-2001. + .SH NOTES +diff --git a/man-pages/man3/pthread_setschedprio.3 b/man-pages/man3/pthread_setschedprio.3 +index 49819fc..01049e2 100644 +--- a/man-pages/man3/pthread_setschedprio.3 ++++ b/man-pages/man3/pthread_setschedprio.3 +@@ -80,6 +80,18 @@ to an unsupported value") error for + .BR pthread_setschedparam (3). + .SH VERSIONS + This function is available in glibc since version 2.3.4. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw22 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR pthread_setschedprio () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + POSIX.1-2001. + .SH NOTES +diff --git a/man-pages/man3/pthread_sigmask.3 b/man-pages/man3/pthread_sigmask.3 +index eea9c53..0f54bbd 100644 +--- a/man-pages/man3/pthread_sigmask.3 ++++ b/man-pages/man3/pthread_sigmask.3 +@@ -54,6 +54,18 @@ on error, it returns an error number. + .SH ERRORS + See + .BR sigprocmask (2). ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR pthread_sigmask () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + POSIX.1-2001. + .SH NOTES +diff --git a/man-pages/man3/pthread_sigqueue.3 b/man-pages/man3/pthread_sigqueue.3 +index 19d317b..85230a2 100644 +--- a/man-pages/man3/pthread_sigqueue.3 ++++ b/man-pages/man3/pthread_sigqueue.3 +@@ -90,6 +90,18 @@ is not valid. + The + .BR pthread_sigqueue () + function first appeared in glibc 2.11. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR pthread_sigqueue () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + This function is a GNU extension. + .SH SEE ALSO +diff --git a/man-pages/man3/pthread_testcancel.3 b/man-pages/man3/pthread_testcancel.3 +index aa11879..45f57f6 100644 +--- a/man-pages/man3/pthread_testcancel.3 ++++ b/man-pages/man3/pthread_testcancel.3 +@@ -55,6 +55,18 @@ to this function, then the function does not return. + This function always succeeds. + .\" SH VERSIONS + .\" Available since glibc 2.0 ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw20 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR pthread_testcancel () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + POSIX.1-2001. + .SH EXAMPLE +diff --git a/man-pages/man3/pthread_yield.3 b/man-pages/man3/pthread_yield.3 +index 3bd8baa..b0b5ba7 100644 +--- a/man-pages/man3/pthread_yield.3 ++++ b/man-pages/man3/pthread_yield.3 +@@ -50,6 +50,18 @@ on error, it returns an error number. + On Linux, this call always succeeds + (but portable and future-proof applications should nevertheless + handle a possible error return). ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR pthread_yield () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + This call is nonstandard, but present on several other systems. + Use the standardized +diff --git a/man-pages/man3/ptsname.3 b/man-pages/man3/ptsname.3 +index 39e2458..706ef00 100644 +--- a/man-pages/man3/ptsname.3 ++++ b/man-pages/man3/ptsname.3 +@@ -77,14 +77,20 @@ is too small. + .BR ptsname () + is provided in glibc since version 2.1. + .SH ATTRIBUTES +-.SS Multithreading (see pthreads(7)) +-The ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ + .BR ptsname () +-function is not thread-safe. +-.LP +-The ++T} Thread safety MT-Unsafe race:ptsname ++T{ + .BR ptsname_r () +-function is thread-safe. ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + .BR ptsname () + is part of the UNIX 98 pseudoterminal support (see +diff --git a/man-pages/man3/putenv.3 b/man-pages/man3/putenv.3 +index db5412d..c2a9f67 100644 +--- a/man-pages/man3/putenv.3 ++++ b/man-pages/man3/putenv.3 +@@ -76,6 +76,18 @@ is set to indicate the cause. + .TP + .B ENOMEM + Insufficient space to allocate new environment. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR putenv () ++T} Thread safety MT-Unsafe const:env ++.TE + .SH CONFORMING TO + SVr4, POSIX.1-2001, 4.3BSD. + .SH NOTES +diff --git a/man-pages/man3/puts.3 b/man-pages/man3/puts.3 +index 2c91a77..2443ee3 100644 +--- a/man-pages/man3/puts.3 ++++ b/man-pages/man3/puts.3 +@@ -100,6 +100,22 @@ and + return a nonnegative number on success, or + .B EOF + on error. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw25 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR fputc (), ++.BR fputs (), ++.BR putc (), ++.BR putchar (), ++.BR puts () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C89, C99. + .SH BUGS +diff --git a/man-pages/man3/putwchar.3 b/man-pages/man3/putwchar.3 +index b3d3bfd..64db847 100644 +--- a/man-pages/man3/putwchar.3 ++++ b/man-pages/man3/putwchar.3 +@@ -57,6 +57,18 @@ function returns + if no error occurred, or + .B WEOF + to indicate an error. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR putwchar () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99. + .SH NOTES +diff --git a/man-pages/man3/qecvt.3 b/man-pages/man3/qecvt.3 +index 41d0ae0..ea50ea6 100644 +--- a/man-pages/man3/qecvt.3 ++++ b/man-pages/man3/qecvt.3 +@@ -70,16 +70,23 @@ See + and + .BR gcvt (3). + .SH ATTRIBUTES +-.SS Multithreading (see pthreads(7)) +-The ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ + .BR qecvt () +-and ++T} Thread safety MT-Unsafe race:qecvt ++T{ + .BR qfcvt () +-functions are not thread-safe. +-.LP +-The ++T} Thread safety MT-Unsafe race:qfcvt ++T{ + .BR qgcvt () +-function is thread-safe. ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + SVr4. + Not seen in most common UNIX implementations, +diff --git a/man-pages/man3/raise.3 b/man-pages/man3/raise.3 +index 6bafa7b..0f7b930 100644 +--- a/man-pages/man3/raise.3 ++++ b/man-pages/man3/raise.3 +@@ -61,6 +61,18 @@ will return only after the signal handler has returned. + .SH RETURN VALUE + .BR raise () + returns 0 on success, and nonzero for failure. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR raise () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C89, C99, POSIX.1-2001. + .SH NOTES +diff --git a/man-pages/man3/rand.3 b/man-pages/man3/rand.3 +index 0d47d18..f6de7f8 100644 +--- a/man-pages/man3/rand.3 ++++ b/man-pages/man3/rand.3 +@@ -81,7 +81,7 @@ function is automatically seeded with a value of 1. + .PP + The function + .BR rand () +-is not reentrant or thread-safe, since it ++is not reentrant, since it + uses hidden state that is modified on each call. + This might just be the seed value to be used by the next call, + or it might be something more elaborate. +@@ -126,6 +126,20 @@ functions return a value between 0 and + The + .BR srand () + function returns no value. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw25 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR rand (), ++.BR rand_r (), ++.BR srand () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + The functions + .BR rand () +diff --git a/man-pages/man3/random.3 b/man-pages/man3/random.3 +index 98c6123..dbc1e93 100644 +--- a/man-pages/man3/random.3 ++++ b/man-pages/man3/random.3 +@@ -149,6 +149,22 @@ was NULL. + .B EINVAL + A state array of less than 8 bytes was specified to + .BR initstate (). ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw23 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR random (), ++.BR srandom (), ++.br ++.BR initstate (), ++.BR setstate () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + 4.3BSD, POSIX.1-2001. + .SH NOTES +diff --git a/man-pages/man3/random_r.3 b/man-pages/man3/random_r.3 +index 2af909c..08edca2 100644 +--- a/man-pages/man3/random_r.3 ++++ b/man-pages/man3/random_r.3 +@@ -125,6 +125,22 @@ or + argument to + .BR random_r () + was NULL. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw27 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR random_r (), ++.BR srandom_r (), ++.br ++.BR initstate_r (), ++.BR setstate_r () ++T} Thread safety MT-Safe race:buf ++.TE + .SH CONFORMING TO + These functions are nonstandard glibc extensions. + .\" These functions appear to be on Tru64, but don't seem to be on +diff --git a/man-pages/man3/re_comp.3 b/man-pages/man3/re_comp.3 +index 3f8039d..ba5dc95 100644 +--- a/man-pages/man3/re_comp.3 ++++ b/man-pages/man3/re_comp.3 +@@ -64,12 +64,18 @@ otherwise it returns a pointer to an appropriate error message. + .BR re_exec () + returns 1 for a successful match, zero for failure. + .SH ATTRIBUTES +-.SS Multithreading (see pthreads(7)) +-The +-.BR re_comp () +-and ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw20 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR re_comp (), + .BR re_exec () +-functions are not thread-safe. ++T} Thread safety MT-Unsafe ++.TE + .SH CONFORMING TO + 4.3BSD. + .SH NOTES +diff --git a/man-pages/man3/readdir.3 b/man-pages/man3/readdir.3 +index 8c005c0..21f6c7b 100644 +--- a/man-pages/man3/readdir.3 ++++ b/man-pages/man3/readdir.3 +@@ -145,14 +145,20 @@ returns 0, and returns NULL in + .B EBADF + Invalid directory stream descriptor \fIdirp\fP. + .SH ATTRIBUTES +-.SS Multithreading (see pthreads(7)) +-The ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ + .BR readdir () +-function is not thread-safe. +-.LP +-The ++T} Thread safety MT-Unsafe race:dirstream ++T{ + .BR readdir_r () +-function is thread-safe. ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + SVr4, 4.3BSD, POSIX.1-2001. + .SH NOTES +diff --git a/man-pages/man3/realpath.3 b/man-pages/man3/realpath.3 +index 04bea69..3f53096 100644 +--- a/man-pages/man3/realpath.3 ++++ b/man-pages/man3/realpath.3 +@@ -134,6 +134,18 @@ The named file does not exist. + A component of the path prefix is not a directory. + .SH VERSIONS + On Linux, this function appeared in libc 4.5.21. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR realpath () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + 4.4BSD, POSIX.1-2001. + +diff --git a/man-pages/man3/regex.3 b/man-pages/man3/regex.3 +index fd990f0..80b128e 100644 +--- a/man-pages/man3/regex.3 ++++ b/man-pages/man3/regex.3 +@@ -301,6 +301,25 @@ The regex routines ran out of memory. + .TP + .B REG_ESUBREG + Invalid back reference to a subexpression. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw20 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR regcomp (), ++.BR regexec () ++T} Thread safety MT-Safe locale ++T{ ++.BR regerror () ++T} Thread safety MT-Safe env ++T{ ++.BR regfree () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + POSIX.1-2001. + .SH SEE ALSO +diff --git a/man-pages/man3/remainder.3 b/man-pages/man3/remainder.3 +index e2306b9..3dfd6f2 100644 +--- a/man-pages/man3/remainder.3 ++++ b/man-pages/man3/remainder.3 +@@ -177,6 +177,25 @@ is set to + An invalid floating-point exception + .RB ( FE_INVALID ) + is raised. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw26 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR drem (), ++.BR dremf (), ++.BR dreml (), ++.br ++.BR remainder (), ++.BR remainderf (), ++.br ++.BR remainderl () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + .\" IEC 60559. + The functions +diff --git a/man-pages/man3/remove.3 b/man-pages/man3/remove.3 +index 724fd5c..1d008d3 100644 +--- a/man-pages/man3/remove.3 ++++ b/man-pages/man3/remove.3 +@@ -67,6 +67,18 @@ The errors that occur are those for + .BR unlink (2) + and + .BR rmdir (2). ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR remove () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C89, C99, 4.3BSD, POSIX.1-2001. + .SH NOTES +diff --git a/man-pages/man3/remquo.3 b/man-pages/man3/remquo.3 +index 1478f9b..bc4bcd1 100644 +--- a/man-pages/man3/remquo.3 ++++ b/man-pages/man3/remquo.3 +@@ -121,6 +121,20 @@ These functions do not set + .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6802 + .SH VERSIONS + These functions first appeared in glibc in version 2.1. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw30 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR remquo (), ++.BR remquof (), ++.BR remquol () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99, POSIX.1-2001. + .SH SEE ALSO +diff --git a/man-pages/man3/rewinddir.3 b/man-pages/man3/rewinddir.3 +index f02cda0..fbefa4f 100644 +--- a/man-pages/man3/rewinddir.3 ++++ b/man-pages/man3/rewinddir.3 +@@ -50,6 +50,18 @@ to the beginning of the directory. + The + .BR rewinddir () + function returns no value. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR rewinddir () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + SVr4, 4.3BSD, POSIX.1-2001. + .SH SEE ALSO +diff --git a/man-pages/man3/rexec.3 b/man-pages/man3/rexec.3 +index 998a766..c789034 100644 +--- a/man-pages/man3/rexec.3 ++++ b/man-pages/man3/rexec.3 +@@ -140,12 +140,18 @@ The + .BR rexec_af () + function was added to glibc in version 2.2. + .SH ATTRIBUTES +-.SS Multithreading (see pthreads(7)) +-The +-.BR rexec () +-and ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw19 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR rexec (), + .BR rexec_af () +-functions are not thread-safe. ++T} Thread safety MT-Unsafe ++.TE + .SH CONFORMING TO + These functions are not in POSIX.1-2001. + The +diff --git a/man-pages/man3/rint.3 b/man-pages/man3/rint.3 +index 4e2ed5c..133f744 100644 +--- a/man-pages/man3/rint.3 ++++ b/man-pages/man3/rint.3 +@@ -113,6 +113,25 @@ itself is returned. + .SH ERRORS + No errors occur. + POSIX.1-2001 documents a range error for overflows, but see NOTES. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw26 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR nearbyint (), ++.BR nearbyintf (), ++.br ++.BR nearbyintl (), ++.BR rint (), ++.br ++.BR rintf (), ++.BR rintl () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99, POSIX.1-2001. + .SH NOTES +diff --git a/man-pages/man3/round.3 b/man-pages/man3/round.3 +index 33948a3..5453710 100644 +--- a/man-pages/man3/round.3 ++++ b/man-pages/man3/round.3 +@@ -86,13 +86,19 @@ POSIX.1-2001 documents a range error for overflows, but see NOTES. + .SH VERSIONS + These functions first appeared in glibc in version 2.1. + .SH ATTRIBUTES +-.SS Multithreading (see pthreads(7)) +-The ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw27 lb lb ++l l l. ++Interface Attribute Value ++T{ + .BR round (), + .BR roundf (), +-and + .BR roundl () +-functions are thread-safe. ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99, POSIX.1-2001. + .SH NOTES +diff --git a/man-pages/man3/scalb.3 b/man-pages/man3/scalb.3 +index e60abaa..ed2f224 100644 +--- a/man-pages/man3/scalb.3 ++++ b/man-pages/man3/scalb.3 +@@ -174,6 +174,20 @@ These functions do not set + .\" FIXME . Is it intentional that these functions do not set errno? + .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6803 + .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6804 ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw28 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR scalb (), ++.BR scalbf (), ++.BR scalbl () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + .BR scalb () + is specified in POSIX.1-2001, but marked obsolescent. +diff --git a/man-pages/man3/scalbln.3 b/man-pages/man3/scalbln.3 +index 76fa828..998fb3c 100644 +--- a/man-pages/man3/scalbln.3 ++++ b/man-pages/man3/scalbln.3 +@@ -158,16 +158,23 @@ These functions do not set + .SH VERSIONS + These functions first appeared in glibc in version 2.1. + .SH ATTRIBUTES +-.SS Multithreading (see pthreads(7)) +-The ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw33 lb lb ++l l l. ++Interface Attribute Value ++T{ + .BR scalbn (), + .BR scalbnf (), + .BR scalbnl (), ++.br + .BR scalbln (), + .BR scalblnf (), +-and + .BR scalblnl () +-functions are thread-safe. ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99, POSIX.1-2001. + .SH NOTES +diff --git a/man-pages/man3/sched_getcpu.3 b/man-pages/man3/sched_getcpu.3 +index 646c2b5..7048260 100644 +--- a/man-pages/man3/sched_getcpu.3 ++++ b/man-pages/man3/sched_getcpu.3 +@@ -69,6 +69,18 @@ This kernel does not implement + .BR getcpu (2). + .SH VERSIONS + This function is available since glibc 2.6. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR sched_getcpu () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + .BR sched_getcpu () + is glibc specific. +diff --git a/man-pages/man3/seekdir.3 b/man-pages/man3/seekdir.3 +index 9e52298..06138d0 100644 +--- a/man-pages/man3/seekdir.3 ++++ b/man-pages/man3/seekdir.3 +@@ -61,6 +61,18 @@ argument should be a value returned by a previous call to + The + .BR seekdir () + function returns no value. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR seekdir () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + 4.3BSD, POSIX.1-2001. + .SH NOTES +diff --git a/man-pages/man3/sem_destroy.3 b/man-pages/man3/sem_destroy.3 +index 9dd3dd1..14b488d 100644 +--- a/man-pages/man3/sem_destroy.3 ++++ b/man-pages/man3/sem_destroy.3 +@@ -63,6 +63,18 @@ is set to indicate the error. + .B EINVAL + .I sem + is not a valid semaphore. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR sem_destroy () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + POSIX.1-2001. + .SH NOTES +diff --git a/man-pages/man3/sem_getvalue.3 b/man-pages/man3/sem_getvalue.3 +index 985b2f0..658f4b6 100644 +--- a/man-pages/man3/sem_getvalue.3 ++++ b/man-pages/man3/sem_getvalue.3 +@@ -62,6 +62,18 @@ is set to indicate the error. + .B EINVAL + .I sem + is not a valid semaphore. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR sem_getvalue () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + POSIX.1-2001. + .SH NOTES +diff --git a/man-pages/man3/sem_init.3 b/man-pages/man3/sem_init.3 +index fcd61bc..12f3ab3 100644 +--- a/man-pages/man3/sem_init.3 ++++ b/man-pages/man3/sem_init.3 +@@ -92,6 +92,18 @@ exceeds + is nonzero, + but the system does not support process-shared semaphores (see + .BR sem_overview (7)). ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR sem_init () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + POSIX.1-2001. + .SH NOTES +diff --git a/man-pages/man3/sem_post.3 b/man-pages/man3/sem_post.3 +index 6ec3bbe..79bdc89 100644 +--- a/man-pages/man3/sem_post.3 ++++ b/man-pages/man3/sem_post.3 +@@ -58,6 +58,18 @@ is not a valid semaphore. + .B EOVERFLOW + .\" Added in POSIX.1-2008 TC1 (Austin Interpretation 213) + The maximum allowable value for a semaphore would be exceeded. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR sem_post () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + POSIX.1-2001. + .SH NOTES +diff --git a/man-pages/man3/sem_unlink.3 b/man-pages/man3/sem_unlink.3 +index c3f5777..1985d2f 100644 +--- a/man-pages/man3/sem_unlink.3 ++++ b/man-pages/man3/sem_unlink.3 +@@ -59,6 +59,18 @@ was too long. + .B ENOENT + There is no semaphore with the given + .IR name . ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR sem_unlink () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + POSIX.1-2001. + .SH SEE ALSO +diff --git a/man-pages/man3/sem_wait.3 b/man-pages/man3/sem_wait.3 +index 1678087..c3debd3 100644 +--- a/man-pages/man3/sem_wait.3 ++++ b/man-pages/man3/sem_wait.3 +@@ -140,6 +140,20 @@ is less than 0, or greater than or equal to 1000 million. + The call timed out before the semaphore could be locked. + .\" POSIX.1-2001 also allows EDEADLK -- "A deadlock condition + .\" was detected", but this does not occur on Linux(?). ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw26 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR sem_wait (), ++.BR sem_trywait (), ++.BR sem_timedwait () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + POSIX.1-2001. + .SH NOTES +diff --git a/man-pages/man3/setbuf.3 b/man-pages/man3/setbuf.3 +index 77afba7..cb15b4e 100644 +--- a/man-pages/man3/setbuf.3 ++++ b/man-pages/man3/setbuf.3 +@@ -161,6 +161,22 @@ It may set + on failure. + + The other functions do not return a value. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw23 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR setbuf (), ++.BR setbuffer (), ++.br ++.BR setlinebuf (), ++.BR setvbuf () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + The + .BR setbuf () +diff --git a/man-pages/man3/setenv.3 b/man-pages/man3/setenv.3 +index 3bad1d4..d08ca4e 100644 +--- a/man-pages/man3/setenv.3 ++++ b/man-pages/man3/setenv.3 +@@ -124,6 +124,19 @@ or contains an \(aq=\(aq character. + .TP + .B ENOMEM + Insufficient memory to add a new variable to the environment. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR setenv (), ++.BR unsetenv () ++T} Thread safety MT-Unsafe const:env ++.TE + .SH CONFORMING TO + 4.3BSD, POSIX.1-2001. + .SH NOTES +diff --git a/man-pages/man3/siginterrupt.3 b/man-pages/man3/siginterrupt.3 +index 1cfc638..66b121d 100644 +--- a/man-pages/man3/siginterrupt.3 ++++ b/man-pages/man3/siginterrupt.3 +@@ -84,6 +84,18 @@ set to indicate the cause of the error. + .TP + .B EINVAL + The specified signal number is invalid. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR siginterrupt () ++T} Thread safety MT-Unsafe const:sigintr ++.TE + .SH CONFORMING TO + 4.3BSD, POSIX.1-2001. + POSIX.1-2008 marks +diff --git a/man-pages/man3/signbit.3 b/man-pages/man3/signbit.3 +index 5c3be42..5dd4885 100644 +--- a/man-pages/man3/signbit.3 ++++ b/man-pages/man3/signbit.3 +@@ -59,10 +59,17 @@ is negative; otherwise it returns zero. + .SH ERRORS + No errors occur. + .SH ATTRIBUTES +-.SS Multithreading (see pthreads(7)) +-The ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ + .BR signbit () +-macro is thread-safe. ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99, POSIX.1-2001. + This function is defined in IEC 559 (and the appendix with +diff --git a/man-pages/man3/sigpause.3 b/man-pages/man3/sigpause.3 +index e5109ce..31316fc 100644 +--- a/man-pages/man3/sigpause.3 ++++ b/man-pages/man3/sigpause.3 +@@ -53,6 +53,18 @@ with + .I errno + set to + .BR EINTR . ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR sigpause () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + The System V version of + .BR sigpause () +diff --git a/man-pages/man3/sigqueue.3 b/man-pages/man3/sigqueue.3 +index 872a532..a8e421c 100644 +--- a/man-pages/man3/sigqueue.3 ++++ b/man-pages/man3/sigqueue.3 +@@ -111,6 +111,18 @@ No process has a PID matching + .IR pid . + .SH VERSIONS + This system call first appeared in Linux 2.2. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR sigqueue () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + POSIX.1-2001. + .SH NOTES +diff --git a/man-pages/man3/sigset.3 b/man-pages/man3/sigset.3 +index 5decb43..5e6a6d5 100644 +--- a/man-pages/man3/sigset.3 ++++ b/man-pages/man3/sigset.3 +@@ -170,6 +170,22 @@ For + .BR sigignore (), + see the errors under + .BR sigaction (2). ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw23 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR sigset (), ++.BR sighold (), ++.br ++.BR sigrelse (), ++.BR sigignore () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + SVr4, POSIX.1-2001. + These functions are obsolete: do not use them in new programs. +diff --git a/man-pages/man3/sigsetops.3 b/man-pages/man3/sigsetops.3 +index 8711862..08dc85c 100644 +--- a/man-pages/man3/sigsetops.3 ++++ b/man-pages/man3/sigsetops.3 +@@ -128,6 +128,28 @@ to indicate the cause. + .B EINVAL + .I sig + is not a valid signal. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw31 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR sigemptyset (), ++.BR sigfillset (), ++.br ++.BR sigaddset (), ++.BR sigdelset (), ++.br ++.BR sigismember (), ++.BR sigisemptyset (), ++.br ++.BR sigorset (), ++.BR sigandset () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + POSIX.1-2001. + .SH NOTES +diff --git a/man-pages/man3/sigvec.3 b/man-pages/man3/sigvec.3 +index 7b5bc72..82e0b30 100644 +--- a/man-pages/man3/sigvec.3 ++++ b/man-pages/man3/sigvec.3 +@@ -218,6 +218,29 @@ See the ERRORS under + .BR sigaction (2) + and + .BR sigprocmask (2). ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw32 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR sigvec (), ++.BR sigmask (), ++.BR sigblock (), ++.BR sigsetmask (), ++.BR siggetmask () ++T} Thread safety MT-Safe ++.TE ++.SH VERSIONS ++Starting with version 2.21, the GNU C library no longer exports the ++.BR sigvec () ++function as part of the ABI. ++(To ensure backward compatibility, ++the glibc symbol versioning scheme continues to export the interface ++to binaries linked against older versions of the library.) + .SH CONFORMING TO + All of these functions were in + 4.3BSD, except +diff --git a/man-pages/man3/sigwait.3 b/man-pages/man3/sigwait.3 +index 7b841bf..1550524 100644 +--- a/man-pages/man3/sigwait.3 ++++ b/man-pages/man3/sigwait.3 +@@ -77,6 +77,18 @@ On error, it returns a positive error number (listed in ERRORS). + .\" Does not occur for glibc. + .I set + contains an invalid signal number. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR sigwait () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + POSIX.1-2001. + .SH NOTES +diff --git a/man-pages/man3/sin.3 b/man-pages/man3/sin.3 +index b0c270f..6cdc901 100644 +--- a/man-pages/man3/sin.3 ++++ b/man-pages/man3/sin.3 +@@ -105,6 +105,20 @@ is set to + An invalid floating-point exception + .RB ( FE_INVALID ) + is raised. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw21 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR sin (), ++.BR sinf (), ++.BR sinl () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99, POSIX.1-2001. + The variant returning +diff --git a/man-pages/man3/sincos.3 b/man-pages/man3/sincos.3 +index 0e34ab4..4f748a3 100644 +--- a/man-pages/man3/sincos.3 ++++ b/man-pages/man3/sincos.3 +@@ -72,6 +72,20 @@ These functions do not set + .\" those functions. + .SH VERSIONS + These functions first appeared in glibc in version 2.1. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw30 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR sincos (), ++.BR sincosf (), ++.BR sincosl () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + This function is a GNU extension. + .SH SEE ALSO +diff --git a/man-pages/man3/sinh.3 b/man-pages/man3/sinh.3 +index ab79609..5da26a8 100644 +--- a/man-pages/man3/sinh.3 ++++ b/man-pages/man3/sinh.3 +@@ -121,6 +121,20 @@ is set to + An overflow floating-point exception + .RB ( FE_OVERFLOW ) + is raised. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw24 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR sinh (), ++.BR sinhf (), ++.BR sinhl () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99, POSIX.1-2001. + The variant returning +diff --git a/man-pages/man3/sockatmark.3 b/man-pages/man3/sockatmark.3 +index 9e8d50c..8552f72 100644 +--- a/man-pages/man3/sockatmark.3 ++++ b/man-pages/man3/sockatmark.3 +@@ -70,6 +70,18 @@ can be applied. + .SH VERSIONS + .BR sockatmark () + was added to glibc in version 2.2.4. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR sockatmark () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + POSIX.1-2001. + .SH NOTES +diff --git a/man-pages/man3/sqrt.3 b/man-pages/man3/sqrt.3 +index c5dd46d..d2ed9ab 100644 +--- a/man-pages/man3/sqrt.3 ++++ b/man-pages/man3/sqrt.3 +@@ -104,6 +104,20 @@ is set to + An invalid floating-point exception + .RB ( FE_INVALID ) + is raised. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw24 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR sqrt (), ++.BR sqrtf (), ++.BR sqrtl () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99, POSIX.1-2001. + The variant returning +diff --git a/man-pages/man3/statvfs.3 b/man-pages/man3/statvfs.3 +index ef5c59c..3b35f80 100644 +--- a/man-pages/man3/statvfs.3 ++++ b/man-pages/man3/statvfs.3 +@@ -154,6 +154,19 @@ is not a directory. + .TP + .B EOVERFLOW + Some values were too large to be represented in the returned struct. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw21 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR statvfs (), ++.BR fstatvfs () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + POSIX.1-2001. + .SH NOTES +diff --git a/man-pages/man3/stdarg.3 b/man-pages/man3/stdarg.3 +index 719aab7..4ce610d 100644 +--- a/man-pages/man3/stdarg.3 ++++ b/man-pages/man3/stdarg.3 +@@ -226,6 +226,23 @@ Some systems that do not supply + have + .B __va_copy + instead, since that was the name used in the draft proposal. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw21 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR va_start (), ++.BR va_end (), ++.BR va_copy () ++T} Thread safety MT-Safe ++T{ ++.BR va_arg () ++T} Thread safety MT-Safe race:ap ++.TE + .SH CONFORMING TO + The + .BR va_start (), +diff --git a/man-pages/man3/stdio_ext.3 b/man-pages/man3/stdio_ext.3 +index 3585e75..267edd2 100644 +--- a/man-pages/man3/stdio_ext.3 ++++ b/man-pages/man3/stdio_ext.3 +@@ -130,24 +130,31 @@ The + .BR __fpurge () + function discards the contents of the stream's buffer. + .SH ATTRIBUTES +-.SS Multithreading (see pthreads(7)) +-The ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw28 lb lb ++l l l. ++Interface Attribute Value ++T{ + .BR __fbufsize (), + .BR __fpending (), +-.BR __fpurge () +-and ++.br ++.BR __fpurge (), + .BR __fsetlocking () +-functions do not lock the stream, so they are not thread-safe. +-.LP +-The ++T} Thread safety MT-Safe race:stream ++T{ + .BR __flbf (), + .BR __freadable (), ++.br + .BR __freading (), + .BR __fwritable (), +-.BR __fwriting () +-and ++.br ++.BR __fwriting (), + .BR _flushlbf () +-functions are thread-safe. ++T} Thread safety MT-Safe ++.TE + .SH SEE ALSO + .BR flockfile (3), + .BR fpurge (3) +diff --git a/man-pages/man3/stpcpy.3 b/man-pages/man3/stpcpy.3 +index 3e1e67f..cd51b11 100644 +--- a/man-pages/man3/stpcpy.3 ++++ b/man-pages/man3/stpcpy.3 +@@ -68,6 +68,18 @@ of the string + .I dest + (that is, the address of the terminating null byte) + rather than the beginning. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR stpcpy () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + This function was added to POSIX.1-2008. + Before that, it was not part of +diff --git a/man-pages/man3/stpncpy.3 b/man-pages/man3/stpncpy.3 +index 3a0a400..9f10507 100644 +--- a/man-pages/man3/stpncpy.3 ++++ b/man-pages/man3/stpncpy.3 +@@ -88,6 +88,18 @@ or, if + .I dest + is not null-terminated, + .IR "dest + n" . ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR stpncpy () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + This function was added to POSIX.1-2008. + Before that, it was a GNU extension. +diff --git a/man-pages/man3/strcasecmp.3 b/man-pages/man3/strcasecmp.3 +index 190ed66..5017c5a 100644 +--- a/man-pages/man3/strcasecmp.3 ++++ b/man-pages/man3/strcasecmp.3 +@@ -73,6 +73,19 @@ an integer less than, equal to, or greater than zero if + bytes thereof) is found, respectively, to be + less than, to match, or be greater than + .IR s2 . ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw27 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR strcasecmp (), ++.BR strncasecmp () ++T} Thread safety MT-Safe locale ++.TE + .SH CONFORMING TO + 4.4BSD, POSIX.1-2001. + .SH SEE ALSO +diff --git a/man-pages/man3/strcat.3 b/man-pages/man3/strcat.3 +index d71426c..27d20d9 100644 +--- a/man-pages/man3/strcat.3 ++++ b/man-pages/man3/strcat.3 +@@ -127,6 +127,19 @@ and + .BR strncat () + functions return a pointer to the resulting string + .IR dest . ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw19 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR strcat (), ++.BR strncat () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + SVr4, 4.3BSD, C89, C99. + .SH NOTES +diff --git a/man-pages/man3/strchr.3 b/man-pages/man3/strchr.3 +index 25ab2c4..59005f1 100644 +--- a/man-pages/man3/strchr.3 ++++ b/man-pages/man3/strchr.3 +@@ -104,6 +104,20 @@ if the character is not found. + .SH VERSIONS + .BR strchrnul () + first appeared in glibc in version 2.1.1. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw32 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR strchr (), ++.BR strrchr (), ++.BR strchrnul () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + .BR strchr () + and +diff --git a/man-pages/man3/strcmp.3 b/man-pages/man3/strcmp.3 +index 5cac204..8a1bce8 100644 +--- a/man-pages/man3/strcmp.3 ++++ b/man-pages/man3/strcmp.3 +@@ -76,6 +76,19 @@ less than, equal to, or greater than zero if + bytes thereof) is found, respectively, to be less than, to + match, or be greater than + .IR s2 . ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw19 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR strcmp (), ++.BR strncmp () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + SVr4, 4.3BSD, C89, C99. + .SH SEE ALSO +diff --git a/man-pages/man3/strcpy.3 b/man-pages/man3/strcpy.3 +index 57ee6d0..2923b25 100644 +--- a/man-pages/man3/strcpy.3 ++++ b/man-pages/man3/strcpy.3 +@@ -113,6 +113,19 @@ and + functions return a pointer to + the destination string + .IR dest . ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw19 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR strcpy (), ++.BR strncpy () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + SVr4, 4.3BSD, C89, C99. + .SH NOTES +diff --git a/man-pages/man3/strerror.3 b/man-pages/man3/strerror.3 +index 41da3fb..2b12a60 100644 +--- a/man-pages/man3/strerror.3 ++++ b/man-pages/man3/strerror.3 +@@ -181,6 +181,26 @@ function is not thread-safe. + The + .BR strerror_r () + function is thread-safe. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw26 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR strerror () ++T} Thread safety MT-Unsafe race:strerror ++T{ ++.BR strerror_r (), ++.BR strerror_l () ++T} Thread safety MT-Safe ++.TE ++.SH VERSIONS ++The ++.BR strerror_l () ++function first appeared in glibc 2.6. + .SH CONFORMING TO + .BR strerror () + is specified by POSIX.1-2001, C89, C99. +diff --git a/man-pages/man3/strfmon.3 b/man-pages/man3/strfmon.3 +index 1d55187..702b35a 100644 +--- a/man-pages/man3/strfmon.3 ++++ b/man-pages/man3/strfmon.3 +@@ -135,6 +135,19 @@ Otherwise, it sets + to + .BR E2BIG , + returns \-1, and the contents of the array is undefined. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR strfmon () ++T} Thread safety MT-Safe locale ++.TE ++ + .SH CONFORMING TO + Not in POSIX.1-2001. + Present on several other systems. +diff --git a/man-pages/man3/strfry.3 b/man-pages/man3/strfry.3 +index d53ccfd..f8d5a26 100644 +--- a/man-pages/man3/strfry.3 ++++ b/man-pages/man3/strfry.3 +@@ -54,6 +54,18 @@ The + .BR strfry () + functions returns a pointer to the randomized + string. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR strfry () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + The + .BR strfry () +diff --git a/man-pages/man3/strftime.3 b/man-pages/man3/strftime.3 +index d64c763..4d66f13 100644 +--- a/man-pages/man3/strftime.3 ++++ b/man-pages/man3/strftime.3 +@@ -358,6 +358,18 @@ The environment variables + and + .B LC_TIME + are used. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR strftime () ++T} Thread safety MT-Safe env locale ++.TE + .SH CONFORMING TO + SVr4, C89, C99. + There are strict inclusions between the set of conversions +diff --git a/man-pages/man3/strlen.3 b/man-pages/man3/strlen.3 +index 2dc3747..e0592b4 100644 +--- a/man-pages/man3/strlen.3 ++++ b/man-pages/man3/strlen.3 +@@ -47,6 +47,18 @@ The + .BR strlen () + function returns the number of bytes in the string + .IR s . ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR strlen () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + SVr4, 4.3BSD, C89, C99. + .SH SEE ALSO +diff --git a/man-pages/man3/strnlen.3 b/man-pages/man3/strnlen.3 +index 7f7943b..0f84109 100644 +--- a/man-pages/man3/strnlen.3 ++++ b/man-pages/man3/strnlen.3 +@@ -68,6 +68,18 @@ if there is no null byte (\(aq\\0\(aq) among the first + .I maxlen + bytes pointed to by + .IR s . ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR strnlen () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + POSIX.1-2008. + .SH SEE ALSO +diff --git a/man-pages/man3/strpbrk.3 b/man-pages/man3/strpbrk.3 +index 990e5af..5dd44ea 100644 +--- a/man-pages/man3/strpbrk.3 ++++ b/man-pages/man3/strpbrk.3 +@@ -53,6 +53,18 @@ that matches one of the bytes in + .IR accept , + or NULL + if no such byte is found. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR strpbrk () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + SVr4, 4.3BSD, C89, C99. + .SH SEE ALSO +diff --git a/man-pages/man3/strptime.3 b/man-pages/man3/strptime.3 +index 7af3aad..e438400 100644 +--- a/man-pages/man3/strptime.3 ++++ b/man-pages/man3/strptime.3 +@@ -292,6 +292,18 @@ If + fails to match all + of the format string and therefore an error occurred the function + returns NULL. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR strptime () ++T} Thread safety MT-Safe env locale ++.TE + .SH CONFORMING TO + SUSv2, POSIX.1-2001. + .SH NOTES +diff --git a/man-pages/man3/strsep.3 b/man-pages/man3/strsep.3 +index 3e84d1d..8d468ac 100644 +--- a/man-pages/man3/strsep.3 ++++ b/man-pages/man3/strsep.3 +@@ -77,6 +77,18 @@ The + function returns a pointer to the token, + that is, it returns the original value of + .IR *stringp . ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR strsep () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + 4.4BSD. + .SH NOTES +diff --git a/man-pages/man3/strspn.3 b/man-pages/man3/strspn.3 +index dfd6587..42bc406 100644 +--- a/man-pages/man3/strspn.3 ++++ b/man-pages/man3/strspn.3 +@@ -71,6 +71,19 @@ the initial segment of + .I s + which are not in the string + .IR reject . ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw19 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR strspn (), ++.BR strcspn () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + SVr4, 4.3BSD, C89, C99. + .SH SEE ALSO +diff --git a/man-pages/man3/strstr.3 b/man-pages/man3/strstr.3 +index 3c7cfe6..8ebb447 100644 +--- a/man-pages/man3/strstr.3 ++++ b/man-pages/man3/strstr.3 +@@ -62,6 +62,21 @@ but ignores the case of both arguments. + .SH RETURN VALUE + These functions return a pointer to the beginning of the + substring, or NULL if the substring is not found. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR strstr () ++T} Thread safety MT-Safe ++T{ ++.BR strcasestr () ++T} Thread safety MT-Safe locale ++.TE + .SH CONFORMING TO + The + .BR strstr () +diff --git a/man-pages/man3/strtod.3 b/man-pages/man3/strtod.3 +index 65c4fef..c939f5e 100644 +--- a/man-pages/man3/strtod.3 ++++ b/man-pages/man3/strtod.3 +@@ -157,6 +157,20 @@ is stored in + .TP + .B ERANGE + Overflow or underflow occurred. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw29 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR strtod (), ++.BR strtof (), ++.BR strtold () ++T} Thread safety MT-Safe locale ++.TE + .SH CONFORMING TO + C89 describes + .BR strtod (), +diff --git a/man-pages/man3/strtoimax.3 b/man-pages/man3/strtoimax.3 +index d39093a..5a44801 100644 +--- a/man-pages/man3/strtoimax.3 ++++ b/man-pages/man3/strtoimax.3 +@@ -55,6 +55,19 @@ is returned, and + .I errno + is set to + .BR ERANGE . ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw24 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR strtoimax (), ++.BR strtoumax () ++T} Thread safety MT-Safe locale ++.TE + .SH CONFORMING TO + C99, POSIX.1-2001. + .SH SEE ALSO +diff --git a/man-pages/man3/strtok.3 b/man-pages/man3/strtok.3 +index 27543d1..b836310 100644 +--- a/man-pages/man3/strtok.3 ++++ b/man-pages/man3/strtok.3 +@@ -167,14 +167,20 @@ and + functions return a pointer to + the next token, or NULL if there are no more tokens. + .SH ATTRIBUTES +-.SS Multithreading (see pthreads(7)) +-The ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ + .BR strtok () +-function is not thread-safe. +-.LP +-The ++T} Thread safety MT-Unsafe race:strtok ++T{ + .BR strtok_r () +-function is thread-safe. ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + .TP + .BR strtok () +diff --git a/man-pages/man3/strtol.3 b/man-pages/man3/strtol.3 +index fe0aec0..abce900 100644 +--- a/man-pages/man3/strtol.3 ++++ b/man-pages/man3/strtol.3 +@@ -158,6 +158,20 @@ to + .B EINVAL + in case + no conversion was performed (no digits seen, and 0 returned). ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw29 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR strtol (), ++.BR strtoll (), ++.BR strtoq () ++T} Thread safety MT-Safe locale ++.TE + .SH CONFORMING TO + .BR strtol () + conforms to SVr4, 4.3BSD, C89, C99 and POSIX.1-2001, and +diff --git a/man-pages/man3/strtoul.3 b/man-pages/man3/strtoul.3 +index 89b5a39..0c1e1af 100644 +--- a/man-pages/man3/strtoul.3 ++++ b/man-pages/man3/strtoul.3 +@@ -162,6 +162,20 @@ to + .B EINVAL + in case + no conversion was performed (no digits seen, and 0 returned). ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw32 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR strtoul (), ++.BR strtoull (), ++.BR strtouq () ++T} Thread safety MT-Safe locale ++.TE + .SH CONFORMING TO + .BR strtoul () + conforms to SVr4, C89, C99 and POSIX-2001, and +diff --git a/man-pages/man3/strverscmp.3 b/man-pages/man3/strverscmp.3 +index e68fc04..f50882c 100644 +--- a/man-pages/man3/strverscmp.3 ++++ b/man-pages/man3/strverscmp.3 +@@ -87,6 +87,18 @@ less than, equal to, or greater than zero if + is found, respectively, to be earlier than, equal to, + or later than + .IR s2 . ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR strverscmp () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + This function is a GNU extension. + .SH SEE ALSO +diff --git a/man-pages/man3/strxfrm.3 b/man-pages/man3/strxfrm.3 +index 8174f15..deb5a8b 100644 +--- a/man-pages/man3/strxfrm.3 ++++ b/man-pages/man3/strxfrm.3 +@@ -73,6 +73,18 @@ or more, the + contents of + .I dest + are indeterminate. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR strxfrm () ++T} Thread safety MT-Safe locale ++.TE + .SH CONFORMING TO + SVr4, 4.3BSD, C89, C99. + .SH NOTES +diff --git a/man-pages/man3/swab.3 b/man-pages/man3/swab.3 +index 4ceb996..79c6591 100644 +--- a/man-pages/man3/swab.3 ++++ b/man-pages/man3/swab.3 +@@ -69,6 +69,18 @@ should be even.) + The + .BR swab () + function returns no value. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR swab () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + SVr4, 4.3BSD, POSIX.1-2001. + .SH SEE ALSO +diff --git a/man-pages/man3/syslog.3 b/man-pages/man3/syslog.3 +index 648f657..957291c 100644 +--- a/man-pages/man3/syslog.3 ++++ b/man-pages/man3/syslog.3 +@@ -249,6 +249,23 @@ debug-level message + The function + .BR setlogmask (3) + can be used to restrict logging to specified levels only. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw21 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR openlog (), ++.BR closelog () ++T} Thread safety MT-Safe ++T{ ++.BR syslog (), ++.BR vsyslog () ++T} Thread safety MT-Safe env locale ++.TE + .SH CONFORMING TO + The functions + .BR openlog (), +diff --git a/man-pages/man3/system.3 b/man-pages/man3/system.3 +index 0240dec..13ad44f 100644 +--- a/man-pages/man3/system.3 ++++ b/man-pages/man3/system.3 +@@ -75,6 +75,18 @@ returns nonzero if the shell is available, and zero if not. + .PP + .BR system () + does not affect the wait status of any other children. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR system () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C89, C99, POSIX.1-2001. + .SH NOTES +diff --git a/man-pages/man3/sysv_signal.3 b/man-pages/man3/sysv_signal.3 +index 619112d..b94d8c9 100644 +--- a/man-pages/man3/sysv_signal.3 ++++ b/man-pages/man3/sysv_signal.3 +@@ -57,6 +57,18 @@ on error. + .SH ERRORS + As for + .BR signal (2). ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR sysv_signal () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + This function is nonstandard. + .SH NOTES +diff --git a/man-pages/man3/tan.3 b/man-pages/man3/tan.3 +index ce9eaee..4bf0da5 100644 +--- a/man-pages/man3/tan.3 ++++ b/man-pages/man3/tan.3 +@@ -130,6 +130,20 @@ Range error: result overflow + An overflow floating-point exception + .RB ( FE_OVERFLOW ) + is raised. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw21 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR tan (), ++.BR tanf (), ++.BR tanl () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99, POSIX.1-2001. + The variant returning +diff --git a/man-pages/man3/tanh.3 b/man-pages/man3/tanh.3 +index 3ec6e18..92f46b6 100644 +--- a/man-pages/man3/tanh.3 ++++ b/man-pages/man3/tanh.3 +@@ -97,6 +97,20 @@ is positive infinity (negative infinity), + .\" glibc 2.8 does not do this. + .SH ERRORS + No errors occur. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw24 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR tanh (), ++.BR tanhf (), ++.BR tanhl () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99, POSIX.1-2001. + The variant returning +diff --git a/man-pages/man3/tcgetpgrp.3 b/man-pages/man3/tcgetpgrp.3 +index 706789b..8a7ace7 100644 +--- a/man-pages/man3/tcgetpgrp.3 ++++ b/man-pages/man3/tcgetpgrp.3 +@@ -106,6 +106,19 @@ of the calling process. + .I pgrp + has a supported value, but is not the process group ID of a + process in the same session as the calling process. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw24 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR tcgetpgrp (), ++.BR tcsetpgrp () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + POSIX.1-2001. + .SH NOTES +diff --git a/man-pages/man3/tcgetsid.3 b/man-pages/man3/tcgetsid.3 +index a7730df..6be32cd 100644 +--- a/man-pages/man3/tcgetsid.3 ++++ b/man-pages/man3/tcgetsid.3 +@@ -62,6 +62,18 @@ it has one but it is not described by + .SH VERSIONS + .BR tcgetsid () + is provided in glibc since version 2.1. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR tcgetsid () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + POSIX.1-2001. + .SH NOTES +diff --git a/man-pages/man3/telldir.3 b/man-pages/man3/telldir.3 +index 872fbb9..7c17eea 100644 +--- a/man-pages/man3/telldir.3 ++++ b/man-pages/man3/telldir.3 +@@ -61,6 +61,18 @@ is set appropriately. + .TP + .B EBADF + Invalid directory stream descriptor \fIdirp\fP. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR telldir () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + 4.3BSD, POSIX.1-2001. + .SH NOTES +diff --git a/man-pages/man3/tempnam.3 b/man-pages/man3/tempnam.3 +index f68d40b..8dcad47 100644 +--- a/man-pages/man3/tempnam.3 ++++ b/man-pages/man3/tempnam.3 +@@ -95,6 +95,18 @@ set to indicate the cause of the error. + .TP + .B ENOMEM + Allocation of storage failed. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR tempnam () ++T} Thread safety MT-Safe env ++.TE + .SH CONFORMING TO + SVr4, 4.3BSD, POSIX.1-2001. + POSIX.1-2008 marks +diff --git a/man-pages/man3/termios.3 b/man-pages/man3/termios.3 +index 07af8bb..6a1c36b 100644 +--- a/man-pages/man3/termios.3 ++++ b/man-pages/man3/termios.3 +@@ -929,6 +929,35 @@ Therefore, when making multiple changes + it may be necessary to follow this call with a further call to + .BR tcgetattr () + to check that all changes have been performed successfully. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.nh ++.ad l ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR tcgetattr (), ++.BR tcsetattr (), ++.BR tcsendbreak (), ++.BR tcdrain (), ++.br ++.BR tcflush (), ++.br ++.BR tcflow (), ++.BR cfmakeraw (), ++.BR cfgetispeed (), ++.BR cfgetospeed (), ++.BR cfsetispeed (), ++.BR cfsetospeed (), ++.BR cfsetspeed () ++T} Thread safety MT-Safe ++.TE ++.ad ++.hy + .SH CONFORMING TO + .BR tcgetattr (), + .BR tcsetattr (), +diff --git a/man-pages/man3/tgamma.3 b/man-pages/man3/tgamma.3 +index 6fb6338..23dfba8 100644 +--- a/man-pages/man3/tgamma.3 ++++ b/man-pages/man3/tgamma.3 +@@ -159,6 +159,20 @@ is not set for this case. + .\" exception for various cases. + .SH VERSIONS + These functions first appeared in glibc in version 2.1. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw30 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR tgamma (), ++.BR tgammaf (), ++.BR tgammal () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99, POSIX.1-2001. + .SH NOTES +diff --git a/man-pages/man3/timegm.3 b/man-pages/man3/timegm.3 +index aed2ba3..2a4751e 100644 +--- a/man-pages/man3/timegm.3 ++++ b/man-pages/man3/timegm.3 +@@ -51,6 +51,19 @@ are the inverses of + .BR localtime (3) + and + .BR gmtime (3). ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw21 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR timelocal (), ++.BR timegm () ++T} Thread safety MT-Safe env locale ++.TE + .SH CONFORMING TO + These functions are nonstandard GNU extensions + that are also present on the BSDs. +diff --git a/man-pages/man3/tmpfile.3 b/man-pages/man3/tmpfile.3 +index 7ff8b02..a7d2fc8 100644 +--- a/man-pages/man3/tmpfile.3 ++++ b/man-pages/man3/tmpfile.3 +@@ -75,6 +75,18 @@ There was no room in the directory to add the new filename. + .TP + .B EROFS + Read-only file system. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR tmpfile () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + SVr4, 4.3BSD, C89, C99, SUSv2, POSIX.1-2001. + .SH NOTES +diff --git a/man-pages/man3/tmpnam.3 b/man-pages/man3/tmpnam.3 +index 7fdfba8..b6d1014 100644 +--- a/man-pages/man3/tmpnam.3 ++++ b/man-pages/man3/tmpnam.3 +@@ -75,15 +75,20 @@ filename, or NULL if a unique name cannot be generated. + .SH ERRORS + No errors are defined. + .SH ATTRIBUTES +-.SS Multithreading (see pthreads(7)) +-The ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ + .BR tmpnam () +-function is thread-safe with exceptions. +-It is not thread-safe if called with a NULL parameter. +-.LP +-The ++T} Thread safety MT-Unsafe race:tmpnam/!s ++T{ + .BR tmpnam_r () +-function is thread-safe. ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + SVr4, 4.3BSD, C89, C99, POSIX.1-2001. + POSIX.1-2008 marks +diff --git a/man-pages/man3/toascii.3 b/man-pages/man3/toascii.3 +index d4b48ff..cfe8df2 100644 +--- a/man-pages/man3/toascii.3 ++++ b/man-pages/man3/toascii.3 +@@ -51,6 +51,18 @@ value that fits into the ASCII character set, by clearing the + high-order bits. + .SH RETURN VALUE + The value returned is that of the converted character. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR toascii () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + SVr4, BSD, POSIX.1-2001. + POSIX.1-2008 marks +diff --git a/man-pages/man3/toupper.3 b/man-pages/man3/toupper.3 +index 45d6bf4..abc0c0f 100644 +--- a/man-pages/man3/toupper.3 ++++ b/man-pages/man3/toupper.3 +@@ -58,6 +58,22 @@ is undefined. + The value returned is that of the converted letter, or + .I c + if the conversion was not possible. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw24 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR toupper (), ++.BR tolower (), ++.br ++.BR toupper_l (), ++.BR tolower_l () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C89, C99, 4.3BSD. + .SH BUGS +diff --git a/man-pages/man3/towctrans.3 b/man-pages/man3/towctrans.3 +index e2dcebb..c27e8d9 100644 +--- a/man-pages/man3/towctrans.3 ++++ b/man-pages/man3/towctrans.3 +@@ -52,6 +52,18 @@ if + .I wc + is + .BR WEOF . ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR towctrans () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99. + .SH NOTES +diff --git a/man-pages/man3/towlower.3 b/man-pages/man3/towlower.3 +index f507773..65652f2 100644 +--- a/man-pages/man3/towlower.3 ++++ b/man-pages/man3/towlower.3 +@@ -50,6 +50,25 @@ if + .I wc + is + .BR WEOF . ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR towlower () ++T} Thread safety MT-Safe locale ++T{ ++.BR towlower_l () ++T} Thread safety MT-Safe ++.TE ++.SH VERSIONS ++The ++.BR towlower_l () ++function first appeared in glibc 2.3. + .SH CONFORMING TO + C99. + .SH NOTES +diff --git a/man-pages/man3/towupper.3 b/man-pages/man3/towupper.3 +index ebdedaf..68b24e2 100644 +--- a/man-pages/man3/towupper.3 ++++ b/man-pages/man3/towupper.3 +@@ -50,6 +50,25 @@ if + .I wc + is + .BR WEOF . ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR towupper () ++T} Thread safety MT-Safe locale ++T{ ++.BR towupper_l () ++T} Thread safety MT-Safe ++.TE ++.SH VERSIONS ++The ++.BR towupper_l () ++function first appeared in glibc 2.3. + .SH CONFORMING TO + C99. + .SH NOTES +diff --git a/man-pages/man3/trunc.3 b/man-pages/man3/trunc.3 +index 5793c27..fee50d1 100644 +--- a/man-pages/man3/trunc.3 ++++ b/man-pages/man3/trunc.3 +@@ -73,13 +73,19 @@ No errors occur. + .SH VERSIONS + These functions first appeared in glibc in version 2.1. + .SH ATTRIBUTES +-.SS Multithreading (see pthreads(7)) +-The ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw27 lb lb ++l l l. ++Interface Attribute Value ++T{ + .BR trunc (), + .BR truncf (), +-and + .BR truncl () +-functions are thread-safe. ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99, POSIX.1-2001. + .SH NOTES +diff --git a/man-pages/man3/tsearch.3 b/man-pages/man3/tsearch.3 +index b1f0f7a..c11f21f 100644 +--- a/man-pages/man3/tsearch.3 ++++ b/man-pages/man3/tsearch.3 +@@ -187,6 +187,27 @@ also + return NULL if + .IR rootp + was NULL on entry. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR tsearch (), ++.BR tfind (), ++.br ++.BR tdelete () ++T} Thread safety MT-Safe race:rootp ++T{ ++.BR twalk () ++T} Thread safety MT-Safe race:root ++T{ ++.BR tdestroy () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + SVr4, POSIX.1-2001. + The function +diff --git a/man-pages/man3/ttyname.3 b/man-pages/man3/ttyname.3 +index bf909c3..9547440 100644 +--- a/man-pages/man3/ttyname.3 ++++ b/man-pages/man3/ttyname.3 +@@ -72,14 +72,20 @@ File descriptor does not refer to a terminal device. + .I buflen + was too small to allow storing the pathname. + .SH ATTRIBUTES +-.SS Multithreading (see pthreads(7)) +-The ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ + .BR ttyname () +-function is not thread-safe. +-.LP +-The ++T} Thread safety MT-Unsafe race:ttyname ++T{ + .BR ttyname_r () +-function is thread-safe. ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + 4.2BSD, POSIX.1-2001. + .SH SEE ALSO +diff --git a/man-pages/man3/ttyslot.3 b/man-pages/man3/ttyslot.3 +index efd6dfb..880eaa5 100644 +--- a/man-pages/man3/ttyslot.3 ++++ b/man-pages/man3/ttyslot.3 +@@ -121,12 +121,17 @@ associated with a terminal that occurs in this data base) + it returns 0 on UNIX V6 and V7 and BSD-like systems, + but \-1 on System V-like systems. + .SH ATTRIBUTES +-.SS Multithreading (see pthreads(7)) +-The ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ + .BR ttyslot () +-function calls thread-unsafe function +-.BR getttyent (), +-so it is not thread-safe. ++T} Thread safety MT-Unsafe ++.TE + .SH CONFORMING TO + SUSv1; marked as LEGACY in SUSv2; removed in POSIX.1-2001. + SUSv2 requires \-1 on error. +diff --git a/man-pages/man3/tzset.3 b/man-pages/man3/tzset.3 +index 70a9bc5..175b571 100644 +--- a/man-pages/man3/tzset.3 ++++ b/man-pages/man3/tzset.3 +@@ -213,6 +213,18 @@ Often + is a symlink to the file + .I localtime + or to the correct timezone file in the system timezone directory. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR tzset () ++T} Thread safety MT-Safe env locale ++.TE + .SH CONFORMING TO + SVr4, POSIX.1-2001, 4.3BSD. + .SH NOTES +diff --git a/man-pages/man3/ualarm.3 b/man-pages/man3/ualarm.3 +index 094506d..8c33d07 100644 +--- a/man-pages/man3/ualarm.3 ++++ b/man-pages/man3/ualarm.3 +@@ -89,6 +89,18 @@ Interrupted by a signal. + .B EINVAL + \fIusecs\fP or \fIinterval\fP is not smaller than 1000000. + (On systems where that is considered an error.) ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR ualarm () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + 4.3BSD, POSIX.1-2001. + POSIX.1-2001 marks +diff --git a/man-pages/man3/ungetwc.3 b/man-pages/man3/ungetwc.3 +index 5e15976..daaa669 100644 +--- a/man-pages/man3/ungetwc.3 ++++ b/man-pages/man3/ungetwc.3 +@@ -74,6 +74,18 @@ when successful, or + .B WEOF + upon + failure. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR ungetwc () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99. + .SH NOTES +diff --git a/man-pages/man3/unlockpt.3 b/man-pages/man3/unlockpt.3 +index e7067c8..3152244 100644 +--- a/man-pages/man3/unlockpt.3 ++++ b/man-pages/man3/unlockpt.3 +@@ -43,6 +43,18 @@ argument is not associated with a master pseudoterminal. + .SH VERSIONS + .BR unlockpt () + is provided in glibc since version 2.1. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR unlockpt () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + POSIX.1-2001. + .SH SEE ALSO +diff --git a/man-pages/man3/usleep.3 b/man-pages/man3/usleep.3 +index 933a43b..f7dfa10 100644 +--- a/man-pages/man3/usleep.3 ++++ b/man-pages/man3/usleep.3 +@@ -88,6 +88,18 @@ Interrupted by a signal; see + .B EINVAL + \fIusec\fP is not smaller than 1000000. + (On systems where that is considered an error.) ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR usleep () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + 4.3BSD, POSIX.1-2001. + POSIX.1-2001 declares this function obsolete; use +diff --git a/man-pages/man3/wcpcpy.3 b/man-pages/man3/wcpcpy.3 +index 10874ef..cc6aa63 100644 +--- a/man-pages/man3/wcpcpy.3 ++++ b/man-pages/man3/wcpcpy.3 +@@ -64,6 +64,18 @@ wide characters at + returns a pointer to the end of the wide-character string + .IR dest , + that is, a pointer to the terminating null wide character. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR wcpcpy () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + POSIX.1-2008. + .SH SEE ALSO +diff --git a/man-pages/man3/wcpncpy.3 b/man-pages/man3/wcpncpy.3 +index 9c9eda1..a4a09e2 100644 +--- a/man-pages/man3/wcpncpy.3 ++++ b/man-pages/man3/wcpncpy.3 +@@ -90,6 +90,18 @@ characters at + .BR wcpncpy () + returns a pointer to the last wide character written, that is, + .IR dest + n \- 1" . ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR wcpncpy () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + POSIX.1-2008. + .SH SEE ALSO +diff --git a/man-pages/man3/wcscasecmp.3 b/man-pages/man3/wcscasecmp.3 +index cc95824..2d86e75 100644 +--- a/man-pages/man3/wcscasecmp.3 ++++ b/man-pages/man3/wcscasecmp.3 +@@ -80,6 +80,18 @@ ignoring case. + The + .BR wcscasecmp () + function is provided in glibc since version 2.1. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR wcscasecmp () ++T} Thread safety MT-Safe locale ++.TE + .SH CONFORMING TO + POSIX.1-2008. + This function is not specified in POSIX.1-2001, +diff --git a/man-pages/man3/wcscat.3 b/man-pages/man3/wcscat.3 +index 2e40bb8..0055220 100644 +--- a/man-pages/man3/wcscat.3 ++++ b/man-pages/man3/wcscat.3 +@@ -45,6 +45,18 @@ wide characters at + .BR wcscat () + returns + .IR dest . ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR wcscat () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99. + .SH SEE ALSO +diff --git a/man-pages/man3/wcschr.3 b/man-pages/man3/wcschr.3 +index 93711c4..1c5af8c 100644 +--- a/man-pages/man3/wcschr.3 ++++ b/man-pages/man3/wcschr.3 +@@ -44,6 +44,18 @@ in the wide-character string pointed to by + or NULL if + .I wc + does not occur in the string. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR wcschr () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99. + .SH SEE ALSO +diff --git a/man-pages/man3/wcscmp.3 b/man-pages/man3/wcscmp.3 +index 5ba42f4..ec7fc51 100644 +--- a/man-pages/man3/wcscmp.3 ++++ b/man-pages/man3/wcscmp.3 +@@ -56,6 +56,18 @@ the corresponding wide-character + .I s1[i] + is less than + .IR s2[i] . ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR wcscmp () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99. + .SH SEE ALSO +diff --git a/man-pages/man3/wcscpy.3 b/man-pages/man3/wcscpy.3 +index 0b33a32..d4705b8 100644 +--- a/man-pages/man3/wcscpy.3 ++++ b/man-pages/man3/wcscpy.3 +@@ -46,6 +46,18 @@ wide characters at + .BR wcscpy () + returns + .IR dest . ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR wcscpy () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99. + .SH SEE ALSO +diff --git a/man-pages/man3/wcscspn.3 b/man-pages/man3/wcscspn.3 +index 598e400..fbd1122 100644 +--- a/man-pages/man3/wcscspn.3 ++++ b/man-pages/man3/wcscspn.3 +@@ -58,6 +58,18 @@ the wide-character string + or + .IR wcslen(wcs) + if there is none. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR wcscspn () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99. + .SH SEE ALSO +diff --git a/man-pages/man3/wcsdup.3 b/man-pages/man3/wcsdup.3 +index f522174..80ab229 100644 +--- a/man-pages/man3/wcsdup.3 ++++ b/man-pages/man3/wcsdup.3 +@@ -67,6 +67,19 @@ set to indicate the cause of the error. + .TP + .B ENOMEM + Insufficient memory available to allocate duplicate string. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR wcsdup () ++T} Thread safety MT-Safe ++.TE ++ + .SH CONFORMING TO + POSIX.1-2008. + This function is not specified in POSIX.1-2001, +diff --git a/man-pages/man3/wcslen.3 b/man-pages/man3/wcslen.3 +index f58a4d5..e20788e 100644 +--- a/man-pages/man3/wcslen.3 ++++ b/man-pages/man3/wcslen.3 +@@ -39,6 +39,18 @@ The + function returns the + number of wide characters in + .IR s . ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR wcslen () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99. + .SH SEE ALSO +diff --git a/man-pages/man3/wcsncasecmp.3 b/man-pages/man3/wcsncasecmp.3 +index b816527..c1800bb 100644 +--- a/man-pages/man3/wcsncasecmp.3 ++++ b/man-pages/man3/wcsncasecmp.3 +@@ -85,6 +85,18 @@ ignoring case. + The + .BR wcsncasecmp () + function is provided in glibc since version 2.1. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR wcsncasecmp () ++T} Thread safety MT-Safe locale ++.TE + .SH CONFORMING TO + POSIX.1-2008. + This function is not specified in POSIX.1-2001, +diff --git a/man-pages/man3/wcsncat.3 b/man-pages/man3/wcsncat.3 +index 395b4d7..5482fb3 100644 +--- a/man-pages/man3/wcsncat.3 ++++ b/man-pages/man3/wcsncat.3 +@@ -48,6 +48,18 @@ wide characters at + .BR wcsncat () + returns + .IR dest . ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR wcsncat () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99. + .SH SEE ALSO +diff --git a/man-pages/man3/wcsncmp.3 b/man-pages/man3/wcsncmp.3 +index e89bbd5..8ce31e9 100644 +--- a/man-pages/man3/wcsncmp.3 ++++ b/man-pages/man3/wcsncmp.3 +@@ -70,6 +70,18 @@ wide-character + .I s1[i] + is less than + .IR s2[i] . ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR wcsncmp () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99. + .SH SEE ALSO +diff --git a/man-pages/man3/wcsncpy.3 b/man-pages/man3/wcsncpy.3 +index ac35b5d..f3f2482 100644 +--- a/man-pages/man3/wcsncpy.3 ++++ b/man-pages/man3/wcsncpy.3 +@@ -66,6 +66,18 @@ characters at + .BR wcsncpy () + returns + .IR dest . ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR wcsncpy () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99. + .SH SEE ALSO +diff --git a/man-pages/man3/wcsnlen.3 b/man-pages/man3/wcsnlen.3 +index 5957dfa..f64b906 100644 +--- a/man-pages/man3/wcsnlen.3 ++++ b/man-pages/man3/wcsnlen.3 +@@ -79,6 +79,18 @@ wide characters pointed to by + The + .BR wcsnlen () + function is provided in glibc since version 2.1. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR wcsnlen () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + POSIX.1-2008. + .SH SEE ALSO +diff --git a/man-pages/man3/wcspbrk.3 b/man-pages/man3/wcspbrk.3 +index 87a1e86..6c66d69 100644 +--- a/man-pages/man3/wcspbrk.3 ++++ b/man-pages/man3/wcspbrk.3 +@@ -46,6 +46,18 @@ of any of the characters listed in + If + .I wcs + contains none of these characters, NULL is returned. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR wcspbrk () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99. + .SH SEE ALSO +diff --git a/man-pages/man3/wcsrchr.3 b/man-pages/man3/wcsrchr.3 +index 96e51c1..1d4d752 100644 +--- a/man-pages/man3/wcsrchr.3 ++++ b/man-pages/man3/wcsrchr.3 +@@ -44,6 +44,18 @@ in the wide-character string pointed to by + or NULL if + .I wc + does not occur in the string. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR wcsrchr () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99. + .SH SEE ALSO +diff --git a/man-pages/man3/wcsspn.3 b/man-pages/man3/wcsspn.3 +index d410b0f..5540d45 100644 +--- a/man-pages/man3/wcsspn.3 ++++ b/man-pages/man3/wcsspn.3 +@@ -57,6 +57,18 @@ contained in the wide-character string + or + .I wcslen(wcs) + if there is none. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR wcsspn () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99. + .SH SEE ALSO +diff --git a/man-pages/man3/wcsstr.3 b/man-pages/man3/wcsstr.3 +index 1e81324..ecd42ac 100644 +--- a/man-pages/man3/wcsstr.3 ++++ b/man-pages/man3/wcsstr.3 +@@ -53,6 +53,18 @@ is the empty wide-character string, + the return value is always + .I haystack + itself. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR wcsstr () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99. + .SH SEE ALSO +diff --git a/man-pages/man3/wcstoimax.3 b/man-pages/man3/wcstoimax.3 +index c72ca1a..da4e45c 100644 +--- a/man-pages/man3/wcstoimax.3 ++++ b/man-pages/man3/wcstoimax.3 +@@ -46,6 +46,19 @@ except that they return a value of type + and + .IR uintmax_t , + respectively. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lbw24 lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR wcstoimax (), ++.BR wcstoumax () ++T} Thread safety MT-Safe locale ++.TE + .SH CONFORMING TO + C99. + .SH SEE ALSO +diff --git a/man-pages/man3/wcstok.3 b/man-pages/man3/wcstok.3 +index 649b95b..1cde35a 100644 +--- a/man-pages/man3/wcstok.3 ++++ b/man-pages/man3/wcstok.3 +@@ -76,6 +76,18 @@ The + .BR wcstok () + function returns a pointer to the next token, + or NULL if no further token was found. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR wcstok () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99. + .SH NOTES +diff --git a/man-pages/man3/wcswidth.3 b/man-pages/man3/wcswidth.3 +index c997ab8..fc56adb 100644 +--- a/man-pages/man3/wcswidth.3 ++++ b/man-pages/man3/wcswidth.3 +@@ -44,6 +44,18 @@ wide-character string + .IR s , + truncated to at most length + .IR n . ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR wcswidth () ++T} Thread safety MT-Safe locale ++.TE + .SH CONFORMING TO + POSIX.1-2001. + .SH NOTES +diff --git a/man-pages/man3/wctomb.3 b/man-pages/man3/wctomb.3 +index 69fd5a5..ebd126f 100644 +--- a/man-pages/man3/wctomb.3 ++++ b/man-pages/man3/wctomb.3 +@@ -81,6 +81,18 @@ is NULL, the + .BR wctomb () + function returns nonzero if the + encoding has nontrivial shift state, or zero if the encoding is stateless. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR wctomb () ++T} Thread safety MT-Unsafe race ++.TE + .SH CONFORMING TO + C99. + .SH NOTES +diff --git a/man-pages/man3/wctrans.3 b/man-pages/man3/wctrans.3 +index a335532..4637565 100644 +--- a/man-pages/man3/wctrans.3 ++++ b/man-pages/man3/wctrans.3 +@@ -59,6 +59,18 @@ function returns a mapping descriptor if the + is valid. + Otherwise it returns + .IR "(wctrans_t)\ 0" . ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR wctrans () ++T} Thread safety MT-Safe locale ++.TE + .SH CONFORMING TO + C99. + .SH NOTES +diff --git a/man-pages/man3/wctype.3 b/man-pages/man3/wctype.3 +index 220c452..f5fc559 100644 +--- a/man-pages/man3/wctype.3 ++++ b/man-pages/man3/wctype.3 +@@ -71,6 +71,18 @@ if the + is valid. + Otherwise it returns + .IR "(wctype_t) 0" . ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR wctype () ++T} Thread safety MT-Safe locale ++.TE + .SH CONFORMING TO + C99. + .SH NOTES +diff --git a/man-pages/man3/wcwidth.3 b/man-pages/man3/wcwidth.3 +index 70999b5..acad502 100644 +--- a/man-pages/man3/wcwidth.3 ++++ b/man-pages/man3/wcwidth.3 +@@ -42,6 +42,18 @@ The + function returns the number of + column positions for + .IR c . ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR wcwidth () ++T} Thread safety MT-Safe locale ++.TE + .SH CONFORMING TO + POSIX.1-2001. + +diff --git a/man-pages/man3/wmemchr.3 b/man-pages/man3/wmemchr.3 +index b594a8d..93e777e 100644 +--- a/man-pages/man3/wmemchr.3 ++++ b/man-pages/man3/wmemchr.3 +@@ -48,6 +48,18 @@ or NULL if + .I c + does + not occur among these. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR wmemchr () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99. + .SH SEE ALSO +diff --git a/man-pages/man3/wmemcmp.3 b/man-pages/man3/wmemcmp.3 +index 7f6bd36..04bc807 100644 +--- a/man-pages/man3/wmemcmp.3 ++++ b/man-pages/man3/wmemcmp.3 +@@ -67,6 +67,18 @@ wide-character + .I s1[i] + is less than + .IR s2[i] . ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR wmemcmp () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99. + .SH SEE ALSO +diff --git a/man-pages/man3/wmemcpy.3 b/man-pages/man3/wmemcpy.3 +index 1ba9c49..2720d44 100644 +--- a/man-pages/man3/wmemcpy.3 ++++ b/man-pages/man3/wmemcpy.3 +@@ -49,6 +49,18 @@ characters at + .BR wmemcpy () + returns + .IR dest . ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR wmemcpy () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99. + .SH SEE ALSO +diff --git a/man-pages/man3/wmemmove.3 b/man-pages/man3/wmemmove.3 +index 9acb453..0331a02 100644 +--- a/man-pages/man3/wmemmove.3 ++++ b/man-pages/man3/wmemmove.3 +@@ -47,6 +47,18 @@ characters at + .BR wmemmove () + returns + .IR dest . ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR wmemmove () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99. + .SH SEE ALSO +diff --git a/man-pages/man3/wmemset.3 b/man-pages/man3/wmemset.3 +index c19dd0e..eef455e 100644 +--- a/man-pages/man3/wmemset.3 ++++ b/man-pages/man3/wmemset.3 +@@ -40,6 +40,18 @@ copies of the wide character + .BR wmemset () + returns + .IR wcs . ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR wmemset () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + C99. + .SH SEE ALSO +diff --git a/man-pages/man3/y0.3 b/man-pages/man3/y0.3 +index 2afebef..4a67581 100644 +--- a/man-pages/man3/y0.3 ++++ b/man-pages/man3/y0.3 +@@ -220,6 +220,30 @@ is not set for this case. + An overflow floating-point exception + .RB ( FE_OVERFLOW ) + is raised. ++.SH ATTRIBUTES ++For an explanation of the terms used in this section, see ++.BR attributes (7). ++.TS ++allbox; ++lb lb lb ++l l l. ++Interface Attribute Value ++T{ ++.BR y0 (), ++.BR y0f (), ++.BR y0l () ++T} Thread safety MT-Safe ++T{ ++.BR y1 (), ++.BR y1f (), ++.BR y1l () ++T} Thread safety MT-Safe ++T{ ++.BR yn (), ++.BR ynf (), ++.BR ynl () ++T} Thread safety MT-Safe ++.TE + .SH CONFORMING TO + The functions returning + .I double +diff --git a/man-pages/man7/man-pages.7 b/man-pages/man7/man-pages.7 +index a74466d..012fe4a 100644 +--- a/man-pages/man7/man-pages.7 ++++ b/man-pages/man7/man-pages.7 +@@ -614,6 +614,7 @@ and + .SH SEE ALSO + .BR man (1), + .BR man2html (1), ++.BR attributes (7), + .BR groff (7), + .BR groff_man (7), + .BR man (7), +diff --git a/man-pages/man7/pthreads.7 b/man-pages/man7/pthreads.7 +index 71b04e0..a993c0e 100644 +--- a/man-pages/man7/pthreads.7 ++++ b/man-pages/man7/pthreads.7 +@@ -899,6 +899,7 @@ bash$ $( LD_ASSUME_KERNEL=2.2.5 ldd /bin/ls | grep libc.so | \\ + .BR futex (2), + .BR gettid (2), + .BR proc (5), ++.BR attributes (7), + .BR futex (7), + .BR sigevent (7), + .BR signal (7), +diff --git a/man-pages/man7/standards.7 b/man-pages/man7/standards.7 +index af62d66..48f5b38 100644 +--- a/man-pages/man7/standards.7 ++++ b/man-pages/man7/standards.7 +@@ -265,6 +265,7 @@ Further information can be found on the Austin group web site, + .UR http://www.opengroup.org\:/austin/ + .UE . + .SH SEE ALSO ++.BR attributes (7) + .BR feature_test_macros (7), + .BR libc (7), + .BR posixoptions (7) +-- +1.9.3 + diff --git a/SOURCES/1222720-mpo-7.2.0-rtld-audit.7.patch b/SOURCES/1222720-mpo-7.2.0-rtld-audit.7.patch new file mode 100644 index 0000000..2f10c90 --- /dev/null +++ b/SOURCES/1222720-mpo-7.2.0-rtld-audit.7.patch @@ -0,0 +1,79 @@ +From 05ad00eeb2014e5b880e243e5e58ea477dde43aa Mon Sep 17 00:00:00 2001 +From: Jan Chaloupka +Date: Tue, 26 May 2015 15:38:51 +0200 +Subject: [PATCH] rtld-audit.7: fix correct format for cookies + +--- + man-pages/man7/rtld-audit.7 | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +diff --git a/man-pages/man7/rtld-audit.7 b/man-pages/man7/rtld-audit.7 +index bf28a03..52e2c6d 100644 +--- a/man-pages/man7/rtld-audit.7 ++++ b/man-pages/man7/rtld-audit.7 +@@ -515,7 +515,7 @@ la_version(unsigned int version) + char * + la_objsearch(const char *name, uintptr_t *cookie, unsigned int flag) + { +- printf("la_objsearch(): name = %s; cookie = %x", name, cookie); ++ printf("la_objsearch(): name = %s; cookie = %p", name, cookie); + printf("; flag = %s\\n", + (flag == LA_SER_ORIG) ? "LA_SER_ORIG" : + (flag == LA_SER_LIBPATH) ? "LA_SER_LIBPATH" : +@@ -531,7 +531,7 @@ la_objsearch(const char *name, uintptr_t *cookie, unsigned int flag) + void + la_activity (uintptr_t *cookie, unsigned int flag) + { +- printf("la_activity(): cookie = %x; flag = %s\\n", cookie, ++ printf("la_activity(): cookie = %p; flag = %s\\n", cookie, + (flag == LA_ACT_CONSISTENT) ? "LA_ACT_CONSISTENT" : + (flag == LA_ACT_ADD) ? "LA_ACT_ADD" : + (flag == LA_ACT_DELETE) ? "LA_ACT_DELETE" : +@@ -541,7 +541,7 @@ la_activity (uintptr_t *cookie, unsigned int flag) + unsigned int + la_objopen(struct link_map *map, Lmid_t lmid, uintptr_t *cookie) + { +- printf("la_objopen(): loading \\"%s\\"; lmid = %s; cookie=%x\\n", ++ printf("la_objopen(): loading \\"%s\\"; lmid = %s; cookie=%p\\n", + map\->l_name, + (lmid == LM_ID_BASE) ? "LM_ID_BASE" : + (lmid == LM_ID_NEWLM) ? "LM_ID_NEWLM" : +@@ -554,7 +554,7 @@ la_objopen(struct link_map *map, Lmid_t lmid, uintptr_t *cookie) + unsigned int + la_objclose (uintptr_t *cookie) + { +- printf("la_objclose(): %x\\n", cookie); ++ printf("la_objclose(): %p\\n", cookie); + + return 0; + } +@@ -562,7 +562,7 @@ la_objclose (uintptr_t *cookie) + void + la_preinit(uintptr_t *cookie) + { +- printf("la_preinit(): %x\\n", cookie); ++ printf("la_preinit(): %p\\n", cookie); + } + + uintptr_t +@@ -572,7 +572,7 @@ la_symbind32(Elf32_Sym *sym, unsigned int ndx, uintptr_t *refcook, + printf("la_symbind32(): symname = %s; sym\->st_value = %p\\n", + symname, sym\->st_value); + printf(" ndx = %d; flags = 0x%x", ndx, *flags); +- printf("; refcook = %x; defcook = %x\\n", refcook, defcook); ++ printf("; refcook = %p; defcook = %p\\n", refcook, defcook); + + return sym\->st_value; + } +@@ -584,7 +584,7 @@ la_symbind64(Elf64_Sym *sym, unsigned int ndx, uintptr_t *refcook, + printf("la_symbind64(): symname = %s; sym\->st_value = %p\\n", + symname, sym\->st_value); + printf(" ndx = %d; flags = 0x%x", ndx, *flags); +- printf("; refcook = %x; defcook = %x\\n", refcook, defcook); ++ printf("; refcook = %p; defcook = %p\\n", refcook, defcook); + + return sym\->st_value; + } +-- +1.9.3 + diff --git a/SOURCES/1255283-mpo-7.3.0-captest.8.patch b/SOURCES/1255283-mpo-7.3.0-captest.8.patch new file mode 100644 index 0000000..425d9f9 --- /dev/null +++ b/SOURCES/1255283-mpo-7.3.0-captest.8.patch @@ -0,0 +1,35 @@ +From 720dec93c72d9a493ee768e9d892c19d5485a19a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Nikola=20Forr=C3=B3?= +Date: Tue, 28 Jun 2016 11:32:03 +0200 +Subject: [PATCH 03/17] captest.8: describe --init-grp option + +--- + libcap-ng/man8/captest.8 | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/libcap-ng/man8/captest.8 b/libcap-ng/man8/captest.8 +index b7a89f4..e6351a4 100644 +--- a/libcap-ng/man8/captest.8 ++++ b/libcap-ng/man8/captest.8 +@@ -2,7 +2,7 @@ + .SH NAME + captest \- a program to demonstrate capabilities + .SH SYNOPSIS +-.B captest [ \-\-drop-all | \-\-drop-caps | \-\-id ] [ \-\-lock ] [ \-\-text ] ++.B captest [ \-\-drop-all | \-\-drop-caps | \-\-id ] [ \-\-init-grp ] [ \-\-lock ] [ \-\-text ] + .SH DESCRIPTION + \fBcaptest\fP is a program that demonstrates and prints out the current process capabilities. Each option prints the same report. It will output current capabilities. then it will try to access /etc/shadow directly to show if that can be done. Then it creates a child process that attempts to read /etc/shadow and outputs the results of that. Then it outputs the capabilities that a child process would have. + +@@ -19,6 +19,9 @@ This drops just traditional capabilities. + .B \-\-id + This changes to uid and gid 99, drops supplemental groups, and clears the bounding set. + .TP ++.B \-\-init-grp ++This changes to uid and gid 99 and then adds any supplemental groups that comes with that account. You would have add them prior to testing because by default there are no supplemental groups on account 99. ++.TP + .B \-\-text + This option outputs the effective capabilities in text rather than numerically. + .TP +-- +2.7.4 + diff --git a/SOURCES/1263575-mpo-7.3.1-libpng.3-png.5.patch b/SOURCES/1263575-mpo-7.3.1-libpng.3-png.5.patch new file mode 100644 index 0000000..0eb34ad --- /dev/null +++ b/SOURCES/1263575-mpo-7.3.1-libpng.3-png.5.patch @@ -0,0 +1,39 @@ +From 0fef929fe46265410a489ef1045295ceb21028e2 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Nikola=20Forr=C3=B3?= +Date: Tue, 28 Jun 2016 12:11:10 +0200 +Subject: [PATCH 04/19] libpng.3, png.5: fix invalid RFC URL + +--- + libpng/man3/libpng.3 | 2 +- + libpng/man5/png.5 | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/libpng/man3/libpng.3 b/libpng/man3/libpng.3 +index 6cfd7c6..cc081cd 100644 +--- a/libpng/man3/libpng.3 ++++ b/libpng/man3/libpng.3 +@@ -5848,7 +5848,7 @@ ftp://ftp.info-zip.org/pub/infozip/zlib + .I libpng + or at + .br +-ftp://ds.internic.net/rfc/rfc2083.txt ++ftp://ftp.rfc-editor.org:/in-notes/rfc2083.txt + .br + or (as a W3C Recommendation) at + .br +diff --git a/libpng/man5/png.5 b/libpng/man5/png.5 +index 8898820..fa18342 100644 +--- a/libpng/man5/png.5 ++++ b/libpng/man5/png.5 +@@ -35,7 +35,7 @@ PNG 1.0 specification, October 1996: + RFC 2083 + .IP + .br +-ftp://ds.internic.net/rfc/rfc2083.txt ++http://www.ietf.org/rfc/rfc2083.txt + .br + or (as a W3C Recommendation) at + .br +-- +2.7.4 + diff --git a/SOURCES/1263629-mpo-7.3.0-cp.1-install.1-mkdir.1-mkfifo.1-mknod.1.patch b/SOURCES/1263629-mpo-7.3.0-cp.1-install.1-mkdir.1-mkfifo.1-mknod.1.patch new file mode 100644 index 0000000..f97440c --- /dev/null +++ b/SOURCES/1263629-mpo-7.3.0-cp.1-install.1-mkdir.1-mkfifo.1-mknod.1.patch @@ -0,0 +1,112 @@ +From 1700005f9f6c090e6f0e2cfab1ed7c2f9e7e5203 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Nikola=20Forr=C3=B3?= +Date: Tue, 28 Jun 2016 12:39:50 +0200 +Subject: [PATCH 05/17] cp.1, install.1, mkdir.1, mkfifo.1, mknod.1: update + security context options to reflect coreutils change + +--- + man-pages-cs/cs/man1/cp.1 | 7 +++++++ + man-pages-cs/cs/man1/install.1 | 7 ++++++- + man-pages-cs/cs/man1/mkdir.1 | 8 ++++++-- + man-pages-cs/cs/man1/mkfifo.1 | 8 ++++++-- + man-pages-cs/cs/man1/mknod.1 | 8 ++++++-- + 5 files changed, 31 insertions(+), 7 deletions(-) + +diff --git a/man-pages-cs/cs/man1/cp.1 b/man-pages-cs/cs/man1/cp.1 +index 3ab7199..c6abe6d 100644 +--- a/man-pages-cs/cs/man1/cp.1 ++++ b/man-pages-cs/cs/man1/cp.1 +@@ -105,6 +105,13 @@ vypisuje prováděné operace + nebude kopírovat podadresáře z jiného svazku než + na kterém kopírování začalo + .TP ++\fB\-Z\fP ++nastaví cílovému souboru bezpečnostní kontext SELinuxu na výchozí ++.TP ++\fB\-\-context\fP[=\fIKONTEXT\fP] ++jako \fB\-Z\fP; pokud je udán KONTEXT, nastaví ++bezpečnostní kontext SELinuxu nebo SMACKu na KONTEXT ++.TP + \fB\-\-help\fP + vypíše tuto nápovědu a skončí + .TP +diff --git a/man-pages-cs/cs/man1/install.1 b/man-pages-cs/cs/man1/install.1 +index 2bf1d69..ea6a31d 100644 +--- a/man-pages-cs/cs/man1/install.1 ++++ b/man-pages-cs/cs/man1/install.1 +@@ -76,8 +76,13 @@ vypisuje název každáho vytvářeného adresáře + \fB\-\-preserve\-context\fP + zachová bezpečnostní kontext SELinuxu + .TP +-\fB\-Z\fP, \fB\-\-context\fP=\fIKONTEXT\fP ++\fB\-Z\fP + nastaví souborům a adresářům bezpečnostní kontext SELinuxu ++na výchozí ++.TP ++\fB\-\-context\fP[=\fIKONTEXT\fP] ++jako \fB\-Z\fP; pokud je udán KONTEXT, nastaví ++bezpečnostní kontext SELinuxu nebo SMACKu na KONTEXT + .TP + \fB\-\-help\fP + vypíše tuto nápovědu a skončí +diff --git a/man-pages-cs/cs/man1/mkdir.1 b/man-pages-cs/cs/man1/mkdir.1 +index 262adf9..9f38116 100644 +--- a/man-pages-cs/cs/man1/mkdir.1 ++++ b/man-pages-cs/cs/man1/mkdir.1 +@@ -26,9 +26,13 @@ nadřazené adresáře + \fB\-v\fP, \fB\-\-verbose\fP + s každým vytvořeným adresářem vytiskne zprávu + .TP +-\fB\-Z\fP, \fB\-\-context\fP=\fIKONTEXT\fP ++\fB\-Z\fP + nastaví každému vytvořenému adresáři bezpečnostní kontext SELinuxu +-na KONTEXT ++na výchozí ++.TP ++\fB\-\-context\fP[=\fIKONTEXT\fP] ++jako \fB\-Z\fP; pokud je udán KONTEXT, nastaví ++bezpečnostní kontext SELinuxu nebo SMACKu na KONTEXT + .TP + \fB\-\-help\fP + vypíše tuto nápovědu a skončí +diff --git a/man-pages-cs/cs/man1/mkfifo.1 b/man-pages-cs/cs/man1/mkfifo.1 +index 4c92fd5..e83579c 100644 +--- a/man-pages-cs/cs/man1/mkfifo.1 ++++ b/man-pages-cs/cs/man1/mkfifo.1 +@@ -19,8 +19,12 @@ Argumenty povinné pro dlouhé volby jsou pro krátké volby také povinné. + \fB\-m\fP, \fB\-\-mode\fP=\fIPRÁVA\fP + nastaví přístupová PRÁVA, namísto umask a=rw + .TP +-\fB\-Z\fP, \fB\-\-context\fP=\fIKONTEXT\fP +-nastaví každému JMÉNU bezpečnostní kontext SELinuxu na KONTEXT ++\fB\-Z\fP ++nastaví každému JMÉNU bezpečnostní kontext SELinuxu na výchozí ++.TP ++\fB\-\-context\fP[=\fIKONTEXT\fP] ++jako \fB\-Z\fP; pokud je udán KONTEXT, nastaví ++bezpečnostní kontext SELinuxu nebo SMACKu na KONTEXT + .TP + \fB\-\-help\fP + vypíše tuto nápovědu a skončí +diff --git a/man-pages-cs/cs/man1/mknod.1 b/man-pages-cs/cs/man1/mknod.1 +index dbde08f..8e27d8f 100644 +--- a/man-pages-cs/cs/man1/mknod.1 ++++ b/man-pages-cs/cs/man1/mknod.1 +@@ -19,8 +19,12 @@ Argumenty povinné pro dlouhé volby jsou pro krátké volby také povinné. + \fB\-m\fP, \fB\-\-mode\fP=\fIPRÁVA\fP + nastaví přístupová PRÁVA, namísto umask a=rw + .TP +-\fB\-Z\fP, \fB\-\-context\fP=\fIKONTEXT\fP +-nastaví JMÉNU bezpečnostní kontext SELinuxu na KONTEXT ++\fB\-Z\fP ++nastaví JMÉNU bezpečnostní kontext SELinuxu na výchozí ++.TP ++\fB\-\-context\fP[=\fIKONTEXT\fP] ++jako \fB\-Z\fP; pokud je udán KONTEXT, nastaví ++bezpečnostní kontext SELinuxu nebo SMACKu na KONTEXT + .TP + \fB\-\-help\fP + vypíše tuto nápovědu a skončí +-- +2.7.4 + diff --git a/SOURCES/1263632-mpo-7.3.0-cp.1-install.1-mkdir.1-mkfifo.1-mknod.1.patch b/SOURCES/1263632-mpo-7.3.0-cp.1-install.1-mkdir.1-mkfifo.1-mknod.1.patch new file mode 100644 index 0000000..ab7f946 --- /dev/null +++ b/SOURCES/1263632-mpo-7.3.0-cp.1-install.1-mkdir.1-mkfifo.1-mknod.1.patch @@ -0,0 +1,113 @@ +From d5df946c7c46ac5474e7ceff6188a95bf1fc0426 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Nikola=20Forr=C3=B3?= +Date: Tue, 28 Jun 2016 12:51:21 +0200 +Subject: [PATCH 06/17] cp.1, install.1, mkdir.1, mkfifo.1, mknod.1: update + security context options to reflect coreutils change + +--- + man-pages-pl/pl/man1/cp.1 | 7 +++++++ + man-pages-pl/pl/man1/install.1 | 8 ++++++-- + man-pages-pl/pl/man1/mkdir.1 | 8 ++++++-- + man-pages-pl/pl/man1/mkfifo.1 | 9 ++++++--- + man-pages-pl/pl/man1/mknod.1 | 8 ++++++-- + 5 files changed, 31 insertions(+), 9 deletions(-) + +diff --git a/man-pages-pl/pl/man1/cp.1 b/man-pages-pl/pl/man1/cp.1 +index 24392f4..82af3a3 100644 +--- a/man-pages-pl/pl/man1/cp.1 ++++ b/man-pages-pl/pl/man1/cp.1 +@@ -122,6 +122,13 @@ wypisuje bieżące działania + \fB\-x\fP, \fB\-\-one\-file\-system\fP + pozostaje na tym systemie plików + .TP ++\fB\-Z\fP ++ustawia kontekst bezpieczeństwa SELinux pliku docelowego na domyślny ++.TP ++\fB\-\-context\fP=\fIKONTEKST\fP ++jak \fB\-Z\fP lub jeśli poda się \fIKONTEKST\fP \- ustawia kontekst bezpieczeństwa ++SELinux lub SMACK na \fIKONTEKST\fP ++.TP + \fB\-\-help\fP + wyświetla ten tekst i kończy pracę + .TP +diff --git a/man-pages-pl/pl/man1/install.1 b/man-pages-pl/pl/man1/install.1 +index 389b275..37d3c52 100644 +--- a/man-pages-pl/pl/man1/install.1 ++++ b/man-pages-pl/pl/man1/install.1 +@@ -94,8 +94,12 @@ wyświetla nazwę każdego tworzonego katalogu + \fB\-\-preserve\-context\fP + zachowuje kontekst bezpieczeństwa SELinux + .TP +-\fB\-Z\fP, \fB\-\-context\fP=\fIKONTEKST\fP +-ustawia kontekst bezpieczeństwa SELinux plików i katalogów ++\fB\-Z\fP ++ustawia kontekst bezpieczeństwa SELinux pliku docelowego na domyślny ++.TP ++\fB\-\-context\fP=\fIKONTEKST\fP ++jak \fB\-Z\fP lub jeśli poda się \fIKONTEKST\fP \- ustawia kontekst bezpieczeństwa ++SELinux lub SMACK na \fIKONTEKST\fP + .TP + \fB\-\-help\fP + wyświetla ten tekst i kończy pracę +diff --git a/man-pages-pl/pl/man1/mkdir.1 b/man-pages-pl/pl/man1/mkdir.1 +index e8b43d4..9e84f1b 100644 +--- a/man-pages-pl/pl/man1/mkdir.1 ++++ b/man-pages-pl/pl/man1/mkdir.1 +@@ -35,9 +35,13 @@ nadrzędne + \fB\-v\fP, \fB\-\-verbose\fP + wyświetla komunikat o każdym utworzonym katalogu + .TP +-\fB\-Z\fP, \fB\-\-context\fP=\fIKONTEKST\fP ++\fB\-Z\fP + ustawia kontekst bezpieczeństwa SELinux każdego tworzonego katalogu na +-\fIKONTEKST\fP ++domyślny ++.TP ++\fB\-\-context\fP[=\fIKONTEKST\fP] ++jak \fB\-Z\fP lub jeśli poda się \fIKONTEKST\fP \- ustawia kontekst bezpieczeństwa ++SELinux lub SMACK na \fIKONTEKST\fP + .TP + \fB\-\-help\fP + wyświetla ten tekst i kończy pracę +diff --git a/man-pages-pl/pl/man1/mkfifo.1 b/man-pages-pl/pl/man1/mkfifo.1 +index 39cd379..97f07d5 100644 +--- a/man-pages-pl/pl/man1/mkfifo.1 ++++ b/man-pages-pl/pl/man1/mkfifo.1 +@@ -26,9 +26,12 @@ dla krótkich. + ustawia \fITRYB\fP uprawnień, zamiast domyślnego \fBa=rw\fP minus bity ustawione w + \fBumask\fP + .TP +-\fB\-Z\fP, \fB\-\-context\fP=\fIKONTEKST\fP +-ustawia kontekst bezpieczeństwa SELinux każdego tworzonego potoku nazwanego +-na \fIKONTEKST\fP ++\fB\-Z\fP ++ustawia kontekst bezpieczeństwa SELinux na domyślny ++.TP ++\fB\-\-context\fP[=\fIKONTEKST\fP] ++jak \fB\-Z\fP lub jeśli poda się \fIKONTEKST\fP \- ustawia kontekst bezpieczeństwa ++SELinux lub SMACK na \fIKONTEKST\fP + .TP + \fB\-\-help\fP + wyświetla ten tekst i kończy pracę +diff --git a/man-pages-pl/pl/man1/mknod.1 b/man-pages-pl/pl/man1/mknod.1 +index 986f6ad..f73ecf8 100644 +--- a/man-pages-pl/pl/man1/mknod.1 ++++ b/man-pages-pl/pl/man1/mknod.1 +@@ -28,8 +28,12 @@ dla krótkich. + ustawia \fITRYB\fP uprawnień, zamiast domyślnego \fBa=rw\fP minus bity ustawione w + \fBumask\fP + .TP +-\fB\-Z\fP, \fB\-\-context\fP=\fIKONTEKST\fP +-ustawia kontekst bezpieczeństwa SELinux \fINAZWY\fP na \fIKONTEKST\fP ++\fB\-Z\fP ++ustawia kontekst bezpieczeństwa SELinux na domyślny ++.TP ++\fB\-\-context\fP[=\fIKONTEKST\fP] ++jak \fB\-Z\fP lub jeśli poda się \fIKONTEKST\fP \- ustawia kontekst bezpieczeństwa ++SELinux lub SMACK na \fIKONTEKST\fP + .TP + \fB\-\-help\fP + wyświetla ten tekst i kończy pracę +-- +2.7.4 + diff --git a/SOURCES/1263635-mpo-7.3.0-cp.1-install.1-mkdir.1-mkfifo.1-mknod.1.patch b/SOURCES/1263635-mpo-7.3.0-cp.1-install.1-mkdir.1-mkfifo.1-mknod.1.patch new file mode 100644 index 0000000..ed2fd10 --- /dev/null +++ b/SOURCES/1263635-mpo-7.3.0-cp.1-install.1-mkdir.1-mkfifo.1-mknod.1.patch @@ -0,0 +1,155 @@ +From ccb6cba4970f6ed30a62e984fb8ed6ed2fe251a9 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Nikola=20Forr=C3=B3?= +Date: Thu, 30 Jun 2016 13:51:27 +0200 +Subject: [PATCH] cp.1, install.1, mkdir.1, mkfifo.1, mknod.1: update security + context options to reflect coreutils change + +bz1263635 +--- + man-pages-fr/fr/man1/cp.1 | 8 ++++++++ + man-pages-fr/fr/man1/install.1 | 8 ++++++++ + man-pages-fr/fr/man1/mkdir.1 | 12 ++++++++++-- + man-pages-fr/fr/man1/mkfifo.1 | 12 ++++++++++-- + man-pages-fr/fr/man1/mknod.1 | 16 ++++++++++++---- + 5 files changed, 48 insertions(+), 8 deletions(-) + +diff --git a/man-pages-fr/fr/man1/cp.1 b/man-pages-fr/fr/man1/cp.1 +index 251c87a..e450b2e 100644 +--- a/man-pages-fr/fr/man1/cp.1 ++++ b/man-pages-fr/fr/man1/cp.1 +@@ -330,6 +330,14 @@ Afficher le nom de chaque fichier avant de le copier. + .B "\-x, \-\-one-file-system" + Ignorer les sous-répertoires se trouvant sur un système de fichiers + différent de celui du départ de la copie. ++.TP ++.B "\-Z" ++Fixez le contexte de sécurité SELinux du fichier de destination ++au type par défaut. ++.TP ++.BI "\-\-context" "[=CTX]" ++Comme \fB\-Z\fR ou, si CTX est spécifié, fixez le contexte ++de sécurité SELinux ou SMACK à CTX. + .SH OPTIONS DE SAUVEGARDE GNU + Les versions GNU des programmes comme + .BR cp , +diff --git a/man-pages-fr/fr/man1/install.1 b/man-pages-fr/fr/man1/install.1 +index 0c80537..68c1b52 100644 +--- a/man-pages-fr/fr/man1/install.1 ++++ b/man-pages-fr/fr/man1/install.1 +@@ -125,6 +125,14 @@ peut être mentionné sous forme numérique ou par son nom. + .TP + .B "\-s, \-\-strip" + Réduire la table des symboles des exécutables binaires installés. ++.TP ++.B "\-Z" ++Fixez le contexte de sécurité SELinux du fichier de destination ++au type par défaut. ++.TP ++.BI "\-\-context" "[=CTX]" ++Comme \fB\-Z\fR ou, si CTX est spécifié, fixez le contexte ++de sécurité SELinux ou SMACK à CTX. + .SH OPTIONS DE SAUVEGARDE GNU + Les versions GNU des programmes comme + .BR cp , +diff --git a/man-pages-fr/fr/man1/mkdir.1 b/man-pages-fr/fr/man1/mkdir.1 +index 252449b..31b2f47 100644 +--- a/man-pages-fr/fr/man1/mkdir.1 ++++ b/man-pages-fr/fr/man1/mkdir.1 +@@ -52,8 +52,13 @@ Afficher un message pour chaque répertoire créé. Ceci est essentiellement + utile en conjonction avec l'option + .BR "\-\-parents" . + .TP +-.B "\-\-" +-Fin explicite de la liste des options. ++.B "\-Z" ++Fixez le contexte de sécurité SELinux de chaque répertoire créé ++au type par défaut. ++.TP ++.BI "\-\-context" "[=CTX]" ++Comme \fB\-Z\fR ou, si CTX est spécifié, fixez le contexte ++de sécurité SELinux ou SMACK à CTX. + .SH OPTIONS STANDARDS GNU + .TP + .B "\-\-help" +@@ -62,6 +67,9 @@ Afficher un message d'aide sur la sortie standard, et se terminer normalement. + .B "\-\-version" + Afficher un numéro de version sur la sortie standard, et se terminer + normalement. ++.TP ++.B "\-\-" ++Fin explicite de la liste des options. + .SH ENVIRONNEMENT + Les variables d'environnement LANG, LC_ALL, LC_CTYPE et LC_MESSAGES ont + leur signification habituelle. +diff --git a/man-pages-fr/fr/man1/mkfifo.1 b/man-pages-fr/fr/man1/mkfifo.1 +index 4be114e..b4916cf 100644 +--- a/man-pages-fr/fr/man1/mkfifo.1 ++++ b/man-pages-fr/fr/man1/mkfifo.1 +@@ -45,8 +45,13 @@ est fourni de manière symbolique, comme pour + en utilisant + l'autorisation par défaut comme valeur de départ. + .TP +-.B "\-\-" +-Fin explicite de la liste des options. ++.B "\-Z" ++Fixez le contexte de sécurité SELinux ++au type par défaut. ++.TP ++.BI "\-\-context" "[=CTX]" ++Comme \fB\-Z\fR ou, si CTX est spécifié, fixez le contexte ++de sécurité SELinux ou SMACK à CTX. + .SH OPTIONS STANDARDS GNU + .TP + .B "\-\-help" +@@ -54,6 +59,9 @@ Afficher un message d'aide sur la sortie standard, et se terminer normalement. + .TP + .B "\-\-version" + Afficher un numéro de version sur la sortie standard, et se terminer normalement. ++.TP ++.B "\-\-" ++Fin explicite de la liste des options. + .SH ENVIRONNEMENT + Les variables d'environnement LANG, LC_ALL, LC_TYPE et LC_MESSAGES ont leur + significations habituelles. +diff --git a/man-pages-fr/fr/man1/mknod.1 b/man-pages-fr/fr/man1/mknod.1 +index d46d0a4..dafb8a6 100644 +--- a/man-pages-fr/fr/man1/mknod.1 ++++ b/man-pages-fr/fr/man1/mknod.1 +@@ -82,22 +82,30 @@ Par défaut le mode de création est 0666 («\ a+rw\ ») moins les bits se trouv + dans le umask. + .SS OPTIONS + .TP +-.I "\-m, \-\-mode mode" ++.BI "\-m " mode ", \-\-mode=" mode + Indique les autorisations d'accès au fichier, + .I mode + étant fourni sous forme symbolique, comme pour + .BR chmod (1), + les permissions par défaut étant utilisées comme valeur de départ. ++.TP ++.B "\-Z" ++Fixez le contexte de sécurité SELinux ++au type par défaut. ++.TP ++.BI "\-\-context" "[=CTX]" ++Comme \fB\-Z\fR ou, si CTX est spécifié, fixez le contexte ++de sécurité SELinux ou SMACK à CTX. + .SH OPTIONS STANDARDS GNU + .TP +-.I "\-\-help" ++.B "\-\-help" + Afficher un message d'aide sur la sortie standard, et se terminer normalement. + .TP +-.I "\-\-version" ++.B "\-\-version" + Afficher un numéro de version sur la sortie standard, et se terminer + normalement. + .TP +-.I "\-\-" ++.B "\-\-" + Terminer la liste des options. + .SH CONFORMITÉ + POSIX ne décrit pas cette commande, considérée comme non portable, et +-- +2.7.4 + diff --git a/SOURCES/1263636-mpo-7.4.0-cp.1-install.1-mkdir.1-mkfifo.1-mknod.1.patch b/SOURCES/1263636-mpo-7.4.0-cp.1-install.1-mkdir.1-mkfifo.1-mknod.1.patch new file mode 100644 index 0000000..409efde --- /dev/null +++ b/SOURCES/1263636-mpo-7.4.0-cp.1-install.1-mkdir.1-mkfifo.1-mknod.1.patch @@ -0,0 +1,102 @@ +From 0c42bbdf642de9c11ada1fc371694c6488e71f1d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Nikola=20Forr=C3=B3?= +Date: Tue, 28 Mar 2017 14:54:02 +0200 +Subject: [PATCH 2/6] cp.1, install.1, mkdir.1, mkfifo.1, mknod.1: update + security context options to reflect coreutils change + +--- + man-pages-zh-CN/zh_CN/man1/cp.1 | 6 ++++++ + man-pages-zh-CN/zh_CN/man1/install.1 | 6 ++++++ + man-pages-zh-CN/zh_CN/man1/mkdir.1 | 6 ++++++ + man-pages-zh-CN/zh_CN/man1/mkfifo.1 | 6 ++++++ + man-pages-zh-CN/zh_CN/man1/mknod.1 | 6 ++++++ + 5 files changed, 30 insertions(+) + +diff --git a/man-pages-zh-CN/zh_CN/man1/cp.1 b/man-pages-zh-CN/zh_CN/man1/cp.1 +index be003c1..29217ba 100644 +--- a/man-pages-zh-CN/zh_CN/man1/cp.1 ++++ b/man-pages-zh-CN/zh_CN/man1/cp.1 +@@ -253,6 +253,12 @@ backups of the others. + 总作简单的备份. + .RE + .SH "GNU 标准选项" ++.TP ++\fB\-Z\fP ++将目标文件 SELinux 安全上下文设置为默认类型 ++.TP ++\fB\-\-context\fP[=\fI\,CTX\/\fP] ++类似 \fB\-Z\fP,或者如果给定了上下文(CTX)那么将 SELinux 或者 SMACK 安全上下文设置为给定值 + .TP + .B "\-\-help" + 印出用法并退出. +diff --git a/man-pages-zh-CN/zh_CN/man1/install.1 b/man-pages-zh-CN/zh_CN/man1/install.1 +index 0eede5c..fb396f3 100644 +--- a/man-pages-zh-CN/zh_CN/man1/install.1 ++++ b/man-pages-zh-CN/zh_CN/man1/install.1 +@@ -157,6 +157,12 @@ GNU版本的程序如 + 总作简单备份. + .RE + .SH "GNU STANDARD OPTIONS(GNU标准选项)" ++.TP ++\fB\-Z\fP ++将目标文件 SELinux 安全上下文设置为默认类型 ++.TP ++\fB\-\-context\fP[=\fI\,CTX\/\fP] ++类似 \fB\-Z\fP,或者如果给定了上下文(CTX)那么将 SELinux 或者 SMACK 安全上下文设置为给定值 + .TP + .B "\-\-help" + 在标准输出上打印一条用法信息,并以成功状态退出. +diff --git a/man-pages-zh-CN/zh_CN/man1/mkdir.1 b/man-pages-zh-CN/zh_CN/man1/mkdir.1 +index 20b358e..c2697eb 100644 +--- a/man-pages-zh-CN/zh_CN/man1/mkdir.1 ++++ b/man-pages-zh-CN/zh_CN/man1/mkdir.1 +@@ -33,6 +33,12 @@ mkdir 用指定的名字建立目录。 + .BI "--verbose" + 打印出新建立的每一个目录名。与--parents联合使用最有效。 + .SH GNU 标准选项 ++.TP ++\fB\-Z\fP ++将目标文件 SELinux 安全上下文设置为默认类型 ++.TP ++\fB\-\-context\fP[=\fI\,CTX\/\fP] ++类似 \fB\-Z\fP,或者如果给定了上下文(CTX)那么将 SELinux 或者 SMACK 安全上下文设置为给定值 + .TP + .BI "-help" + 在标准输出上显示使用信息并顺利退出。 +diff --git a/man-pages-zh-CN/zh_CN/man1/mkfifo.1 b/man-pages-zh-CN/zh_CN/man1/mkfifo.1 +index 98dbe4d..a2c5ba5 100644 +--- a/man-pages-zh-CN/zh_CN/man1/mkfifo.1 ++++ b/man-pages-zh-CN/zh_CN/man1/mkfifo.1 +@@ -32,6 +32,12 @@ GNU options(选项)(最短格式): + .BR chmod(1) + 中的符号模式,并使用默认模式作为起始点. + .SH "GNU STANDARD OPTIONS(GNU标准选项)" ++.TP ++\fB\-Z\fP ++将目标文件 SELinux 安全上下文设置为默认类型 ++.TP ++\fB\-\-context\fP[=\fI\,CTX\/\fP] ++类似 \fB\-Z\fP,或者如果给定了上下文(CTX)那么将 SELinux 或者 SMACK 安全上下文设置为给定值 + .TP + .B "\-\-help" + 在标准输出上打印一条用法信息,并以成功状态退出. +diff --git a/man-pages-zh-CN/zh_CN/man1/mknod.1 b/man-pages-zh-CN/zh_CN/man1/mknod.1 +index 24c5e51..3b26f89 100644 +--- a/man-pages-zh-CN/zh_CN/man1/mknod.1 ++++ b/man-pages-zh-CN/zh_CN/man1/mknod.1 +@@ -59,6 +59,12 @@ GNU版本还允许使用u('unbufferd'非缓冲化), + 用缺省模式建立新目录。 + + .SH GNU 标准选项 ++.TP ++\fB\-Z\fP ++将目标文件 SELinux 安全上下文设置为默认类型 ++.TP ++\fB\-\-context\fP[=\fI\,CTX\/\fP] ++类似 \fB\-Z\fP,或者如果给定了上下文(CTX)那么将 SELinux 或者 SMACK 安全上下文设置为给定值 + .TP + .B "\-\-help" + 在标准输出上显示使用信息并顺利退出。 +-- +2.7.4 + diff --git a/SOURCES/1263637-mpo-7.3.0-cp.1-install.1-mkdir.1-mkfifo.1-mknod.1.patch b/SOURCES/1263637-mpo-7.3.0-cp.1-install.1-mkdir.1-mkfifo.1-mknod.1.patch new file mode 100644 index 0000000..b3a573e --- /dev/null +++ b/SOURCES/1263637-mpo-7.3.0-cp.1-install.1-mkdir.1-mkfifo.1-mknod.1.patch @@ -0,0 +1,112 @@ +From 0c89a04f410b13e6bf1b67980cf37c82294a62e7 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Nikola=20Forr=C3=B3?= +Date: Wed, 29 Jun 2016 10:06:41 +0200 +Subject: [PATCH 20/20] cp.1, install.1, mkdir.1, mkfifo.1, mknod.1: update + security context options to reflect coreutils change + +--- + man-pages-es/es/man1/cp.1 | 8 ++++++++ + man-pages-es/es/man1/install.1 | 8 ++++++++ + man-pages-es/es/man1/mkdir.1 | 8 ++++++++ + man-pages-es/es/man1/mkfifo.1 | 8 ++++++++ + man-pages-es/es/man1/mknod.1 | 8 ++++++++ + 5 files changed, 40 insertions(+) + +diff --git a/man-pages-es/es/man1/cp.1 b/man-pages-es/es/man1/cp.1 +index d1bcb75..95a89aa 100644 +--- a/man-pages-es/es/man1/cp.1 ++++ b/man-pages-es/es/man1/cp.1 +@@ -230,6 +230,14 @@ Muestra el nombre de cada fichero antes de copiarlo. + .B "\-x, \-\-one\-file\-system" + Se salta subdirectorios que estén en sistemas de ficheros diferentes + de aquél en el que empezó la copia. ++.TP ++.B "\-Z" ++Establece el contexto de seguridad de SELinux del fichero de destino ++al tipo predeterminado. ++.TP ++.BI "\-\-context" "[=CTX]" ++Al igual que \fB\-Z\fR o, si se especifica CTX, ++establece el contexto de seguridad SELinux o SMACK a CTX. + .SH "OPCIONES DE RESPALDO DE GNU" + Las versiones de GNU de programas como + .BR cp , +diff --git a/man-pages-es/es/man1/install.1 b/man-pages-es/es/man1/install.1 +index 18a8acc..8e04ccc 100644 +--- a/man-pages-es/es/man1/install.1 ++++ b/man-pages-es/es/man1/install.1 +@@ -178,6 +178,14 @@ copias simples de los otros. + .BR never ", " simple + Siempre hace copias de respaldo simples. + .RE ++.TP ++.B "\-Z" ++Establece el contexto de seguridad de SELinux del fichero de destino ++al tipo predeterminado. ++.TP ++.BI "\-\-context" "[=CTX]" ++Al igual que \fB\-Z\fR o, si se especifica CTX, ++establece el contexto de seguridad SELinux o SMACK a CTX. + .SH "OPCIONES ESTÁNDARES DE GNU" + .TP + .B "\-\-help" +diff --git a/man-pages-es/es/man1/mkdir.1 b/man-pages-es/es/man1/mkdir.1 +index 9943b91..542c3fd 100644 +--- a/man-pages-es/es/man1/mkdir.1 ++++ b/man-pages-es/es/man1/mkdir.1 +@@ -47,6 +47,14 @@ un error, pero `mkdir \-p /a' no lo es.) + .B "\-\-verbose" + Muestra un mensaje para cada directorio creado. Esto es más útil con + .BR "\-\-parents" . ++.TP ++.B "\-Z" ++Establece el contexto de seguridad de SELinux de cada directorio creado ++al tipo predeterminado. ++.TP ++.BI "\-\-context" "[=CTX]" ++Al igual que \fB\-Z\fR o, si se especifica CTX, ++establece el contexto de seguridad SELinux o SMACK a CTX. + .SH "OPCIONES ESTÁNDARES DE GNU" + .TP + .B "\-\-help" +diff --git a/man-pages-es/es/man1/mkfifo.1 b/man-pages-es/es/man1/mkfifo.1 +index d1c5156..da7c659 100644 +--- a/man-pages-es/es/man1/mkfifo.1 ++++ b/man-pages-es/es/man1/mkfifo.1 +@@ -39,6 +39,14 @@ Establece los permisos de los FIFOs creados a + que puede ser simbólico como en + .BR chmod (1) + y emplea el modo predeterminado como punto de partida. ++.TP ++.B "\-Z" ++Establece el contexto de seguridad de SELinux ++al tipo predeterminado. ++.TP ++.BI "\-\-context" "[=CTX]" ++Al igual que \fB\-Z\fR o, si se especifica CTX, ++establece el contexto de seguridad SELinux o SMACK a CTX. + .SH "OPCIONES ESTÁNDARES DE GNU" + .TP + .B "\-\-help" +diff --git a/man-pages-es/es/man1/mknod.1 b/man-pages-es/es/man1/mknod.1 +index 3eaebd4..41bd090 100644 +--- a/man-pages-es/es/man1/mknod.1 ++++ b/man-pages-es/es/man1/mknod.1 +@@ -86,6 +86,14 @@ Establece los permisos de los ficheros creados a + que es simbólico como en + .BR chmod (1) + y emplea el modo predeterminado como punto de partida. ++.TP ++.B "\-Z" ++Establece el contexto de seguridad de SELinux ++al tipo predeterminado. ++.TP ++.BI "\-\-context" "[=CTX]" ++Al igual que \fB\-Z\fR o, si se especifica CTX, ++establece el contexto de seguridad SELinux o SMACK a CTX. + .SH "OPCIONES ESTÁNDARES DE GNU" + .TP + .B "\-\-help" +-- +2.7.4 + diff --git a/SOURCES/1269549-mpo-7.3.0-socket.7.patch b/SOURCES/1269549-mpo-7.3.0-socket.7.patch new file mode 100644 index 0000000..6108377 --- /dev/null +++ b/SOURCES/1269549-mpo-7.3.0-socket.7.patch @@ -0,0 +1,56 @@ +From 9dcfa5bda8c03d0acecd87953ebfc78372bb9755 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Nikola=20Forr=C3=B3?= +Date: Tue, 28 Jun 2016 13:02:45 +0200 +Subject: [PATCH 07/17] socket.7: document SO_REUSEPORT option + +--- + man-pages/man7/socket.7 | 33 +++++++++++++++++++++++++++++++++ + 1 file changed, 33 insertions(+) + +diff --git a/man-pages/man7/socket.7 b/man-pages/man7/socket.7 +index 17bd0c3..94c98b6 100644 +--- a/man-pages/man7/socket.7 ++++ b/man-pages/man7/socket.7 +@@ -649,6 +649,39 @@ with a specific port then it is not possible + to bind to this port for any local address. + Argument is an integer boolean flag. + .TP ++.BR SO_REUSEPORT ++Permits multiple ++.B AF_INET ++or ++.B AF_INET6 ++sockets to be bound to an identical socket address. ++This option must be set on each socket (including the first socket) ++prior to calling ++.BR bind (2) ++on the socket. ++To prevent port hijacking, ++all of the processes binding to the same address must have the same ++effective UID. ++This option can be employed with both TCP and UDP sockets. ++ ++For TCP sockets, this option allows ++.BR accept (2) ++load distribution in a multi-threaded server to be improved by ++using a distinct listener socket for each thread. ++This provides improved load distribution as compared ++to traditional techniques such using a single ++.BR accept (2)ing ++thread that distributes connections, ++or having multiple threads that compete to ++.BR accept (2) ++from the same socket. ++ ++For UDP sockets, ++the use of this option can provide better distribution ++of incoming datagrams to multiple processes (or threads) as compared ++to the traditional technique of having multiple processes ++compete to receive datagrams on the same socket. ++.TP + .B SO_SNDBUF + Sets or gets the maximum socket send buffer in bytes. + The kernel doubles this value (to allow space for bookkeeping overhead) +-- +2.7.4 + diff --git a/SOURCES/1278492-mpo-7.3.1-recv.2.patch b/SOURCES/1278492-mpo-7.3.1-recv.2.patch new file mode 100644 index 0000000..b5ae5f1 --- /dev/null +++ b/SOURCES/1278492-mpo-7.3.1-recv.2.patch @@ -0,0 +1,44 @@ +From cabfb553c7a039af44d976585266022c6210b7c4 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Nikola=20Forr=C3=B3?= +Date: Tue, 28 Jun 2016 13:15:18 +0200 +Subject: [PATCH 07/19] recv.2: change description of flags argument to apply + also to recvfrom and recvmsg + +--- + man-pages/man2/____recv.2 | 4 +--- + man-pages/man2/recv.2 | 4 +--- + 2 files changed, 2 insertions(+), 6 deletions(-) + +diff --git a/man-pages/man2/____recv.2 b/man-pages/man2/____recv.2 +index 7b93c09..3ac8ef4 100644 +--- a/man-pages/man2/____recv.2 ++++ b/man-pages/man2/____recv.2 +@@ -129,9 +129,7 @@ call may be used to determine when more data arrives. + .PP + The + .I flags +-argument to a +-.BR recv () +-call is formed by ORing one or more of the following values: ++argument is formed by ORing one or more of the following values: + .TP + .BR MSG_CMSG_CLOEXEC " (" recvmsg "() only; since Linux 2.6.23)" + Set the close-on-exec flag for the file descriptor received +diff --git a/man-pages/man2/recv.2 b/man-pages/man2/recv.2 +index 7b93c09..3ac8ef4 100644 +--- a/man-pages/man2/recv.2 ++++ b/man-pages/man2/recv.2 +@@ -129,9 +129,7 @@ call may be used to determine when more data arrives. + .PP + The + .I flags +-argument to a +-.BR recv () +-call is formed by ORing one or more of the following values: ++argument is formed by ORing one or more of the following values: + .TP + .BR MSG_CMSG_CLOEXEC " (" recvmsg "() only; since Linux 2.6.23)" + Set the close-on-exec flag for the file descriptor received +-- +2.7.4 + diff --git a/SOURCES/1289915-mpo-7.3.0-nsswitch.conf.5.patch b/SOURCES/1289915-mpo-7.3.0-nsswitch.conf.5.patch new file mode 100644 index 0000000..a9b7ce1 --- /dev/null +++ b/SOURCES/1289915-mpo-7.3.0-nsswitch.conf.5.patch @@ -0,0 +1,70 @@ +From b6c1528d166cee848f226b0e85c8a9583c2a269d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Nikola=20Forr=C3=B3?= +Date: Tue, 28 Jun 2016 13:24:03 +0200 +Subject: [PATCH 10/17] nsswitch.conf.5: add list of files being read when + "files" service is used + +--- + man-pages/man5/nsswitch.conf.5 | 46 ++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 46 insertions(+) + +diff --git a/man-pages/man5/nsswitch.conf.5 b/man-pages/man5/nsswitch.conf.5 +index 72c459e..f808874 100644 +--- a/man-pages/man5/nsswitch.conf.5 ++++ b/man-pages/man5/nsswitch.conf.5 +@@ -330,6 +330,52 @@ implements "nis" source. + implements "nisplus" source. + .PD + .RE ++.LP ++The following files are read when "files" source is specified ++for respective databases: ++.RS 4 ++.TP 12 ++.PD 0 ++.B aliases ++.I /etc/aliases ++.TP ++.B ethers ++.I /etc/ethers ++.TP ++.B group ++.I /etc/group ++.TP ++.B hosts ++.I /etc/hosts ++.TP ++.B initgroups ++.I /etc/group ++.TP ++.B netgroup ++.I /etc/netgroup ++.TP ++.B networks ++.I /etc/networks ++.TP ++.B passwd ++.I /etc/passwd ++.TP ++.B protocols ++.I /etc/protocols ++.TP ++.B publickey ++.I /etc/publickey ++.TP ++.B rpc ++.I /etc/rpc ++.TP ++.B services ++.I /etc/services ++.TP ++.B shadow ++.I /etc/shadow ++.PD ++.RE + .SH NOTES + Within each process that uses + .BR nsswitch.conf , +-- +2.7.4 + diff --git a/SOURCES/1297898-mpo-7.3.0-prctl.2.patch b/SOURCES/1297898-mpo-7.3.0-prctl.2.patch new file mode 100644 index 0000000..9d06c9d --- /dev/null +++ b/SOURCES/1297898-mpo-7.3.0-prctl.2.patch @@ -0,0 +1,118 @@ +From 26057cba30205ed659094a2816557b439c651286 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Nikola=20Forr=C3=B3?= +Date: Tue, 28 Jun 2016 13:28:29 +0200 +Subject: [PATCH 11/17] prctl.2: add description of Intel MPX calls + +--- + man-pages/man2/prctl.2 | 81 ++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 81 insertions(+) + +diff --git a/man-pages/man2/prctl.2 b/man-pages/man2/prctl.2 +index 24e56d2..92eecf9 100644 +--- a/man-pages/man2/prctl.2 ++++ b/man-pages/man2/prctl.2 +@@ -47,6 +47,7 @@ + .\" PR_GET_TIMERSLACK + .\" 2013-01-10 Kees Cook, document PR_SET_PTRACER + .\" 2012-02-04 Michael kerrisk, document PR_{SET,GET}_CHILD_SUBREAPER ++.\" 2014-11-10 Dave Hansen, document PR_MPX_{EN,DIS}ABLE_MANAGEMENT + .\" + .\" + .TH PRCTL 2 2013-05-21 "Linux" "Linux Programmer's Manual" +@@ -771,6 +772,77 @@ option. + .\" symbolic-link transitions over all process running in a system. + .\" ========== END FIXME + .RE ++.TP ++.BR PR_MPX_ENABLE_MANAGEMENT ", " PR_MPX_DISABLE_MANAGEMENT " (since Linux 3.19) " ++.\" commit fe3d197f84319d3bce379a9c0dc17b1f48ad358c ++.\" See also http://lwn.net/Articles/582712/ ++.\" See also https://gcc.gnu.org/wiki/Intel%20MPX%20support%20in%20the%20GCC%20compiler ++Enable or disable kernel management of Memory Protection eXtensions (MPX) ++bounds tables. ++The ++.IR arg2 , ++.IR arg3 , ++.IR arg4 , ++and ++.IR arg5 ++.\" commit e9d1b4f3c60997fe197bf0243cb4a41a44387a88 ++arguments must be zero. ++ ++MPX is a hardware-assisted mechanism for performing bounds checking on ++pointers. ++It consists of a set of registers storing bounds information ++and a set of special instruction prefixes that tell the CPU on which ++instructions it should do bounds enforcement. ++There is a limited number of these registers and ++when there are more pointers than registers, ++their contents must be "spilled" into a set of tables. ++These tables are called "bounds tables" and the MPX ++.BR prctl () ++operations control ++whether the kernel manages their allocation and freeing. ++ ++When management is enabled, the kernel will take over allocation ++and freeing of the bounds tables. ++It does this by trapping the #BR exceptions that result ++at first use of missing bounds tables and ++instead of delivering the exception to user space, ++it allocates the table and populates the bounds directory ++with the location of the new table. ++For freeing, the kernel checks to see if bounds tables are ++present for memory which is not allocated, and frees them if so. ++ ++Before enabling MPX management using ++.BR PR_MPX_ENABLE_MANAGEMENT , ++the application must first have allocated a user-space buffer for ++the bounds directory and placed the location of that directory in the ++.I bndcfgu ++register. ++ ++These calls will fail if the CPU or kernel does not support MPX. ++Kernel support for MPX is enabled via the ++.BR CONFIG_X86_INTEL_MPX ++configuration option. ++You can check whether the CPU supports MPX by looking for the 'mpx' ++CPUID bit, like with the following command: ++ ++ cat /proc/cpuinfo | grep ' mpx ' ++ ++A thread may not switch in or out of long (64-bit) mode while MPX is ++enabled. ++ ++All threads in a process are affected by these calls. ++ ++The child of a ++.BR fork (2) ++inherits the state of MPX management. ++During ++.BR execve (2), ++MPX management is reset to a state as if ++.BR PR_MPX_DISABLE_MANAGEMENT ++had been called. ++ ++For further information on Intel MPX, see the kernel source file ++.IR Documentation/x86/intel_mpx.txt . + .\" + .SH RETURN VALUE + On success, +@@ -957,6 +1029,15 @@ capability. + .\" is + .\" .BR PR_SET_SECCOMP , + .\" and secure computing mode is already 1. ++.TP ++.B ENXIO ++.I option ++was ++.BR PR_MPX_ENABLE_MANAGEMENT ++or ++.BR PR_MPX_DISABLE_MANAGEMENT ++and the kernel or the CPU does not support MPX management. ++Check that the kernel and processor have MPX support. + .SH VERSIONS + The + .BR prctl () +-- +2.7.4 + diff --git a/SOURCES/1312875-mpo-7.3.0-tcp.7.patch b/SOURCES/1312875-mpo-7.3.0-tcp.7.patch new file mode 100644 index 0000000..b4208a7 --- /dev/null +++ b/SOURCES/1312875-mpo-7.3.0-tcp.7.patch @@ -0,0 +1,78 @@ +From 14336b7b4c70b3def333ae78e654e8919107176b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Nikola=20Forr=C3=B3?= +Date: Tue, 28 Jun 2016 13:50:57 +0200 +Subject: [PATCH 13/17] tcp.7: document TCP_USER_TIMEOUT + +--- + man-pages/man7/tcp.7 | 48 +++++++++++++++++++++++++++++++++++++++++++++--- + 1 file changed, 45 insertions(+), 3 deletions(-) + +diff --git a/man-pages/man7/tcp.7 b/man-pages/man7/tcp.7 +index 93b4148..98ccf27 100644 +--- a/man-pages/man7/tcp.7 ++++ b/man-pages/man7/tcp.7 +@@ -46,9 +46,6 @@ + .\" TCP_THIN_DUPACK (2..6.34) + .\" commit 7e38017557bc0b87434d184f8804cadb102bb903 + .\" Author: Andreas Petlund +-.\" TCP_USER_TIMEOUT (new in 2.6.37) +-.\" Author: Jerry Chu +-.\" commit dca43c75e7e545694a9dd6288553f55c53e2a3a3 + .\" TCP_REPAIR (3.5) + .\" commit ee9952831cfd0bbe834f4a26489d7dce74582e37 + .\" Author: Pavel Emelyanov +@@ -1038,6 +1035,51 @@ aborting the attempt to connect. + It cannot exceed 255. + This option should not be used in code intended to be portable. + .TP ++.BR TCP_USER_TIMEOUT " (since Linux 2.6.37)" ++.\" commit dca43c75e7e545694a9dd6288553f55c53e2a3a3 ++.\" Author: Jerry Chu ++.\" The following text taken nearly verbatim from Jerry Chu's (excellent) ++.\" commit message. ++.\" ++This option takes an ++.IR "unsigned int" ++as an argument. ++When the value is greater than 0, ++it specifies the maximum amount of time in milliseconds that transmitted ++data may remain unacknowledged before TCP will forcibly close the ++corresponding connection and return ++.B ETIMEDOUT ++to the application. ++If the option value is specified as 0, ++TCP will to use the system default. ++ ++Increasing user timeouts allows a TCP connection to survive extended ++periods without end-to-end connectivity. ++Decreasing user timeouts ++allows applications to "fail fast", if so desired. ++Otherwise, failure may take up to 20 minutes with ++the current system defaults in a normal WAN environment. ++ ++This option can be set during any state of a TCP connection, ++but is effective only during the synchronized states of a connection ++(ESTABLISHED, FIN-WAIT-1, FIN-WAIT-2, CLOSE-WAIT, CLOSING, and LAST-ACK). ++Moreover, when used with the TCP keepalive ++.RB ( SO_KEEPALIVE ) ++option, ++.B TCP_USER_TIMEOUT ++will override keepalive to determine when to close a ++connection due to keepalive failure. ++ ++The option has no effect on when TCP retransmits a packet, ++nor when a keepalive probe is sent. ++ ++This option, like many others, will be inherited by the socket returned by ++.BR accept (2), ++if it was set on the listening socket. ++ ++Further details on the user timeout feature can be found in ++RFC\ 793 and RFC\ 5482 ("TCP User Timeout Option"). ++.TP + .BR TCP_WINDOW_CLAMP " (since Linux 2.4)" + .\" Precisely: since 2.3.41 + Bound the size of the advertised window to this value. +-- +2.7.4 + diff --git a/SOURCES/1315605-mpo-7.3.1-recv.2-cmsg.3.patch b/SOURCES/1315605-mpo-7.3.1-recv.2-cmsg.3.patch new file mode 100644 index 0000000..80f7752 --- /dev/null +++ b/SOURCES/1315605-mpo-7.3.1-recv.2-cmsg.3.patch @@ -0,0 +1,72 @@ +From 111803a7b99abd01d487b00f7cce5b6d142a755c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Nikola=20Forr=C3=B3?= +Date: Tue, 28 Jun 2016 14:00:16 +0200 +Subject: [PATCH 11/19] recv.2, cmsg.3: fix type of cmsg_len member of cmsghdr + structure + +--- + man-pages/man2/____recv.2 | 7 ++++--- + man-pages/man2/recv.2 | 7 ++++--- + man-pages/man3/cmsg.3 | 10 ++++++---- + 3 files changed, 14 insertions(+), 10 deletions(-) + +diff --git a/man-pages/man2/____recv.2 b/man-pages/man2/____recv.2 +index 3ac8ef4..7056eb2 100644 +--- a/man-pages/man2/____recv.2 ++++ b/man-pages/man2/____recv.2 +@@ -341,9 +341,10 @@ The messages are of the form: + .nf + + struct cmsghdr { +- socklen_t cmsg_len; /* data byte count, including hdr */ +- int cmsg_level; /* originating protocol */ +- int cmsg_type; /* protocol-specific type */ ++ size_t cmsg_len; /* Data byte count, including header ++ (type is socklen_t in POSIX) */ ++ int cmsg_level; /* Originating protocol */ ++ int cmsg_type; /* Protocol-specific type */ + /* followed by + unsigned char cmsg_data[]; */ + }; +diff --git a/man-pages/man2/recv.2 b/man-pages/man2/recv.2 +index 3ac8ef4..7056eb2 100644 +--- a/man-pages/man2/recv.2 ++++ b/man-pages/man2/recv.2 +@@ -341,9 +341,10 @@ The messages are of the form: + .nf + + struct cmsghdr { +- socklen_t cmsg_len; /* data byte count, including hdr */ +- int cmsg_level; /* originating protocol */ +- int cmsg_type; /* protocol-specific type */ ++ size_t cmsg_len; /* Data byte count, including header ++ (type is socklen_t in POSIX) */ ++ int cmsg_level; /* Originating protocol */ ++ int cmsg_type; /* Protocol-specific type */ + /* followed by + unsigned char cmsg_data[]; */ + }; +diff --git a/man-pages/man3/cmsg.3 b/man-pages/man3/cmsg.3 +index 2713c09..8fe3d5d 100644 +--- a/man-pages/man3/cmsg.3 ++++ b/man-pages/man3/cmsg.3 +@@ -28,10 +28,12 @@ CMSG_ALIGN, CMSG_SPACE, CMSG_NXTHDR, CMSG_FIRSTHDR \- access ancillary data + .sp + .nf + struct cmsghdr { +- socklen_t cmsg_len; /* data byte count, including header */ +- int cmsg_level; /* originating protocol */ +- int cmsg_type; /* protocol-specific type */ +- /* followed by unsigned char cmsg_data[]; */ ++ size_t cmsg_len; /* Data byte count, including header ++ (type is socklen_t in POSIX) */ ++ int cmsg_level; /* Originating protocol */ ++ int cmsg_type; /* Protocol-specific type */ ++/* followed by ++ unsigned char cmsg_data[]; */ + }; + .fi + .SH DESCRIPTION +-- +2.7.4 + diff --git a/SOURCES/1316009-mpo-7.4.0-mcstransd.8.patch b/SOURCES/1316009-mpo-7.4.0-mcstransd.8.patch new file mode 100644 index 0000000..8d852fb --- /dev/null +++ b/SOURCES/1316009-mpo-7.4.0-mcstransd.8.patch @@ -0,0 +1,32 @@ +From f8a1f766c22973c136b3e803280f76051dd318cb Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Nikola=20Forr=C3=B3?= +Date: Tue, 28 Mar 2017 14:57:55 +0200 +Subject: [PATCH 3/6] mcstransd.8: fix typos + +--- + mcstrans/man8/mcstransd.8 | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/mcstrans/man8/mcstransd.8 b/mcstrans/man8/mcstransd.8 +index f92a572..af2390e 100644 +--- a/mcstrans/man8/mcstransd.8 ++++ b/mcstrans/man8/mcstransd.8 +@@ -11,13 +11,13 @@ This manual page describes the + .BR mcstransd + program. + .P +-This daemon reads /etc/selinux/{SELINUXTYPE}/setrans.conf and /etc/selinux/{SELINUXTYPE}/secolors.conf configuration files, and communicates with libselinux via a socket in /var/run/setrans. ++This daemon reads /etc/selinux/{SELINUXTYPE}/setrans.conf and /etc/selinux/{SELINUXTYPE}/secolor.conf configuration files, and communicates with libselinux via a socket in /var/run/setrans. + It also watches for files created in /var/run/setrans and uses the contents of these files to generate translations to the names. For example writing a file /var/run/setrans/mydomain with content of s0:c1,c2 will cause mcstrans to translate s0:c1,c2 to mydomain. + + .SH "AUTHOR" + This man page was written by Dan Walsh . + The program was originally written by Dan Walsh . +-The program was enhanced/rwwritten by Joe Nall . ++The program was enhanced/rewritten by Joe Nall . + + .SH "FILES" + /etc/selinux/{SELINUXTYPE}/setrans.conf +-- +2.7.4 + diff --git a/SOURCES/1330661-mpo-7.3.1-clone.2-fork.2.patch b/SOURCES/1330661-mpo-7.3.1-clone.2-fork.2.patch new file mode 100644 index 0000000..2ae0b53 --- /dev/null +++ b/SOURCES/1330661-mpo-7.3.1-clone.2-fork.2.patch @@ -0,0 +1,59 @@ +From 97978b3f5eae5700a12cdfc1fb37e55a7460e1f1 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Nikola=20Forr=C3=B3?= +Date: Tue, 28 Jun 2016 14:13:48 +0200 +Subject: [PATCH 12/19] clone.2, fork.2: document ERESTARTNOINTR error code + +--- + man-pages/man2/____clone.2 | 4 ++++ + man-pages/man2/clone.2 | 4 ++++ + man-pages/man2/fork.2 | 4 ++++ + 3 files changed, 12 insertions(+) + +diff --git a/man-pages/man2/____clone.2 b/man-pages/man2/____clone.2 +index 1baad11..d9ffe3e 100644 +--- a/man-pages/man2/____clone.2 ++++ b/man-pages/man2/____clone.2 +@@ -988,6 +988,10 @@ was specified by an unprivileged process (process without \fBCAP_SYS_ADMIN\fP). + .B EPERM + .B CLONE_PID + was specified by a process other than process 0. ++.TP ++.BR ERESTARTNOINTR " (since Linux 2.6.17)" ++System call was interrupted by a signal and will be restarted. ++(This can be seen only during a trace.) + .SH VERSIONS + There is no entry for + .BR clone () +diff --git a/man-pages/man2/clone.2 b/man-pages/man2/clone.2 +index 1baad11..d9ffe3e 100644 +--- a/man-pages/man2/clone.2 ++++ b/man-pages/man2/clone.2 +@@ -988,6 +988,10 @@ was specified by an unprivileged process (process without \fBCAP_SYS_ADMIN\fP). + .B EPERM + .B CLONE_PID + was specified by a process other than process 0. ++.TP ++.BR ERESTARTNOINTR " (since Linux 2.6.17)" ++System call was interrupted by a signal and will be restarted. ++(This can be seen only during a trace.) + .SH VERSIONS + There is no entry for + .BR clone () +diff --git a/man-pages/man2/fork.2 b/man-pages/man2/fork.2 +index 6a327a3..a1664e4 100644 +--- a/man-pages/man2/fork.2 ++++ b/man-pages/man2/fork.2 +@@ -203,6 +203,10 @@ failed to allocate the necessary kernel structures because memory is tight. + is not supported on this platform (for example, + .\" e.g., arm (optionally), blackfin, c6x, frv, h8300, microblaze, xtensa + hardware without a Memory-Management Unit). ++.TP ++.BR ERESTARTNOINTR " (since Linux 2.6.17)" ++System call was interrupted by a signal and will be restarted. ++(This can be seen only during a trace.) + .SH CONFORMING TO + SVr4, 4.3BSD, POSIX.1-2001. + .SH NOTES +-- +2.7.4 + diff --git a/SOURCES/1360898-mpo-7.3.2-prctl.2-capabilities.7.patch b/SOURCES/1360898-mpo-7.3.2-prctl.2-capabilities.7.patch new file mode 100644 index 0000000..b029a65 --- /dev/null +++ b/SOURCES/1360898-mpo-7.3.2-prctl.2-capabilities.7.patch @@ -0,0 +1,219 @@ +From 7a536207483e677f1075e529cbd396dd649b2cdc Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Nikola=20Forr=C3=B3?= +Date: Wed, 3 Aug 2016 12:58:59 +0200 +Subject: [PATCH] prctl.2, capabilities.7: document ambient capabilities + +--- + man-pages/man2/prctl.2 | 77 +++++++++++++++++++++++++++++++++++++++++++ + man-pages/man7/capabilities.7 | 51 ++++++++++++++++++++++++---- + 2 files changed, 122 insertions(+), 6 deletions(-) + +diff --git a/man-pages/man2/prctl.2 b/man-pages/man2/prctl.2 +index 92eecf9..cd6daef 100644 +--- a/man-pages/man2/prctl.2 ++++ b/man-pages/man2/prctl.2 +@@ -844,6 +844,42 @@ had been called. + For further information on Intel MPX, see the kernel source file + .IR Documentation/x86/intel_mpx.txt . + .\" ++.TP ++.BR PR_CAP_AMBIENT " (since Linux 4.3)" ++.\" commit 58319057b7847667f0c9585b9de0e8932b0fdb08 ++Reads or changes the ambient capability set, according to the value of ++.IR arg2 , ++which must be one of the following: ++.RS ++.TP ++.B PR_CAP_AMBIENT_RAISE ++The capability specified in ++.I arg3 ++is added to the ambient set. ++The specified capability must already be present in ++both the permitted and the inheritable sets of the process. ++This operation is not permitted if the ++.B SECBIT_NO_CAP_AMBIENT_RAISE ++securebit is set. ++.TP ++.B PR_CAP_AMBIENT_LOWER ++The capability specified in ++.I arg3 ++is removed from the ambient set. ++.TP ++.B PR_CAP_AMBIENT_IS_SET ++The ++.BR prctl (2) ++call returns 1 if the capability in ++.I arg3 ++is in the ambient set and 0 if it is not. ++.TP ++.BR PR_CAP_AMBIENT_CLEAR_ALL ++All capabilities will be removed from the ambient set. ++This operation requires setting ++.I arg3 ++to zero. ++.RE + .SH RETURN VALUE + On success, + .BR PR_GET_DUMPABLE , +@@ -853,6 +889,7 @@ On success, + .BR PR_GET_TIMING , + .BR PR_GET_SECUREBITS , + .BR PR_MCE_KILL_GET , ++.BR PR_CAP_AMBIENT + PR_CAP_AMBIENT_IS_SET , + and (if it returns) + .BR PR_GET_SECCOMP + return the nonnegative values described above. +@@ -949,6 +986,31 @@ is not 0, + .BR PR_SET_PTRACER_ANY , + or the PID of an existing process. + .TP ++.B EINVAL ++.I option ++is ++.B PR_CAP_AMBIENT ++and an unused argument ++.RI ( arg4 , ++.IR arg5 , ++or, ++in the case of ++.BR PR_CAP_AMBIENT_CLEAR_ALL , ++.IR arg3 ) ++is nonzero; or ++.IR arg2 ++has an invalid value; ++or ++.IR arg2 ++is ++.BR PR_CAP_AMBIENT_LOWER , ++.BR PR_CAP_AMBIENT_RAISE , ++or ++.BR PR_CAP_AMBIENT_IS_SET ++and ++.IR arg3 ++does not specify a valid capability. ++.TP + .B EPERM + .I option + is +@@ -1030,6 +1092,21 @@ capability. + .\" .BR PR_SET_SECCOMP , + .\" and secure computing mode is already 1. + .TP ++.B EPERM ++.IR option ++is ++.BR PR_CAP_AMBIENT ++and ++.IR arg2 ++is ++.BR PR_CAP_AMBIENT_RAISE , ++but either the capability specified in ++.IR arg3 ++is not present in the process's permitted and inheritable capability sets, ++or the ++.B PR_CAP_AMBIENT_LOWER ++securebit has been set. ++.TP + .B ENXIO + .I option + was +diff --git a/man-pages/man7/capabilities.7 b/man-pages/man7/capabilities.7 +index 2c3377e..c340245 100644 +--- a/man-pages/man7/capabilities.7 ++++ b/man-pages/man7/capabilities.7 +@@ -659,13 +659,40 @@ a program whose associated file capabilities grant that capability). + .IR Inheritable : + This is a set of capabilities preserved across an + .BR execve (2). +-It provides a mechanism for a process to assign capabilities +-to the permitted set of the new program during an +-.BR execve (2). ++Inheritable capabilities remain inheritable when executing any program, ++and inheritable capabilities are added to the permitted set when executing ++a program that has the corresponding bits set in the file inheritable set. ++.IP ++Because inheritable capabilities are not generally preserved across ++.BR execve (2) ++when running as a non-root user, applications that wish to run helper ++programs with elevated capabilities should consider using ++ambient capabilities, described below. + .TP + .IR Effective : + This is the set of capabilities used by the kernel to + perform permission checks for the thread. ++.TP ++.IR Ambient " (since Linux 4.3):" ++.\" commit 58319057b7847667f0c9585b9de0e8932b0fdb08 ++This is a set of capabilities that are preserved across an ++.BR execve (2) ++of a program that is not privileged. ++The ambient capability set obeys the invariant that no capability ++can ever be ambient if it is not both permitted and inheritable. ++ ++The ambient capability set can be directly modified using ++.BR prctl (2). ++Ambient capabilities are automatically lowered if either of ++the corresponding permitted or inheritable capabilities is lowered. ++ ++Executing a program that changes UID or GID due to the ++set-user-ID or set-group-ID bits or executing a program that has ++any file capabilities set will clear the ambient set. ++Ambient capabilities are added to the permitted set and ++assigned to the effective set when ++.BR execve (2) ++is called. + .PP + A child created via + .BR fork (2) +@@ -747,10 +774,12 @@ the process using the following algorithm: + .in +4n + .nf + ++P'(ambient) = (file is privileged) ? 0 : P(ambient) ++ + P'(permitted) = (P(inheritable) & F(inheritable)) | +- (F(permitted) & cap_bset) ++ (F(permitted) & cap_bset) | P'(ambient) + +-P'(effective) = F(effective) ? P'(permitted) : 0 ++P'(effective) = F(effective) ? P'(permitted) : P'(ambient) + + P'(inheritable) = P(inheritable) [i.e., unchanged] + +@@ -769,6 +798,9 @@ denotes a file capability set + .IP cap_bset + is the value of the capability bounding set (described below). + .RE ++.PP ++A privileged file is one that has capabilities or ++has the set-user-ID or set-group-ID bit set. + .\" + .SS Capabilities and execution of programs by root + In order to provide an all-powerful +@@ -1029,6 +1061,12 @@ an effective or real UID of 0 calls + .BR execve (2). + (See the subsection + .IR "Capabilities and execution of programs by root" .) ++.TP ++.B SECBIT_NO_CAP_AMBIENT_RAISE ++Setting this flag disallows raising ambient capabilities via the ++.BR prctl (2) ++.BR PR_CAP_AMBIENT_RAISE ++operation. + .PP + Each of the above "base" flags has a companion "locked" flag. + Setting any of the "locked" flags is irreversible, +@@ -1037,8 +1075,9 @@ corresponding "base" flag. + The locked flags are: + .BR SECBIT_KEEP_CAPS_LOCKED , + .BR SECBIT_NO_SETUID_FIXUP_LOCKED , ++.BR SECBIT_NOROOT_LOCKED , + and +-.BR SECBIT_NOROOT_LOCKED . ++.BR SECBIT_NO_CAP_AMBIENT_RAISE . + .PP + The + .I securebits +-- +2.7.4 + diff --git a/SOURCES/1361588-recv-for-aarch64.patch b/SOURCES/1361588-recv-for-aarch64.patch new file mode 100644 index 0000000..a11c121 --- /dev/null +++ b/SOURCES/1361588-recv-for-aarch64.patch @@ -0,0 +1,30 @@ +From 8777be0e850672270d50d31ab8d417c27af71389 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Nikola=20Forr=C3=B3?= +Date: Fri, 29 Jul 2016 15:34:53 +0200 +Subject: [PATCH 19/19] recv.2: add deprecation note about recv() syscall + +--- + man-pages/man2/____recv.2 | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/man-pages/man2/____recv.2 b/man-pages/man2/____recv.2 +index 7056eb2..8a948ab 100644 +--- a/man-pages/man2/____recv.2 ++++ b/man-pages/man2/____recv.2 +@@ -57,6 +57,13 @@ recv, recvfrom, recvmsg \- receive a message from a socket + .BI "ssize_t recvmsg(int " sockfd ", struct msghdr *" msg ", int " flags ); + .fi + .SH DESCRIPTION ++.BR recv () ++system call is DEPRECATED, use ++.BR recvfrom () ++with a NULL ++.I src_addr ++argument! ++.PP + The + .BR recvfrom () + and +-- +2.7.4 + diff --git a/SOURCES/1390935-mpo-7.4.0-nsswitch.conf.5.patch b/SOURCES/1390935-mpo-7.4.0-nsswitch.conf.5.patch new file mode 100644 index 0000000..724ea87 --- /dev/null +++ b/SOURCES/1390935-mpo-7.4.0-nsswitch.conf.5.patch @@ -0,0 +1,50 @@ +From 02dc2c2f14a67b719ba0eae06695a468fbb11d61 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Nikola=20Forr=C3=B3?= +Date: Tue, 28 Mar 2017 15:02:09 +0200 +Subject: [PATCH 5/6] nsswitch.conf.5: add information about sss service + +--- + man-pages/man5/nsswitch.conf.5 | 16 +++++++++++++++- + 1 file changed, 15 insertions(+), 1 deletion(-) + +diff --git a/man-pages/man5/nsswitch.conf.5 b/man-pages/man5/nsswitch.conf.5 +index 72c459e..f234249 100644 +--- a/man-pages/man5/nsswitch.conf.5 ++++ b/man-pages/man5/nsswitch.conf.5 +@@ -175,6 +175,16 @@ may be 1 for glibc 2.0, or 2 for glibc 2.1 and later. + On systems with additional libraries installed, you may have access to + further services such as "hesiod", "ldap", "winbind" and "wins". + .LP ++If System Security Services Daemon (SSSD) ++is installed on your system, you can use ++this service with the "sss" keyword. ++SSSD supports the following databases: ++.BR passwd , ++.BR group , ++.BR services ++and ++.BR netgroup . ++.LP + An action may also be specified following a service specification. + The action modifies the behavior following a result obtained + from the preceding data source. +@@ -290,11 +300,15 @@ NIS passwd map. + .RE + .LP + By default the source is "nis", but this may be +-overridden by specifying "nisplus" as the source for the pseudo-databases ++overridden by specifying any NSS service except "compat" itself ++as the source for the pseudo-databases + .BR passwd_compat , + .BR group_compat , + and + .BR shadow_compat . ++.LP ++If SSSD is installed on your system, you can use "sss" as the source ++for these pseudo-databases. + .SH FILES + A service named + .I SERVICE +-- +2.7.4 + diff --git a/SOURCES/1404478-mpo-7.4.0-packet.7.patch b/SOURCES/1404478-mpo-7.4.0-packet.7.patch new file mode 100644 index 0000000..143b15e --- /dev/null +++ b/SOURCES/1404478-mpo-7.4.0-packet.7.patch @@ -0,0 +1,257 @@ +From ad7e94b35988c8cd03866d47aa6fb21841cfae7c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Nikola=20Forr=C3=B3?= +Date: Tue, 28 Mar 2017 15:04:36 +0200 +Subject: [PATCH 6/6] packet.7: add missing socket options + +--- + man-pages/man7/packet.7 | 218 ++++++++++++++++++++++++++++++++++++++++++++++-- + 1 file changed, 209 insertions(+), 9 deletions(-) + +diff --git a/man-pages/man7/packet.7 b/man-pages/man7/packet.7 +index f5d990b..b217e5e 100644 +--- a/man-pages/man7/packet.7 ++++ b/man-pages/man7/packet.7 +@@ -177,19 +177,24 @@ and + .I sll_ifindex + are used. + .SS Socket options ++Packet socket options are configured by calling ++.BR setsockopt (2) ++with level ++.BR SOL_PACKET . ++.TP ++.BR PACKET_ADD_MEMBERSHIP ++.PD 0 ++.TP ++.BR PACKET_DROP_MEMBERSHIP ++.PD + Packet sockets can be used to configure physical layer multicasting + and promiscuous mode. +-It works by calling +-.BR setsockopt (2) +-on a packet socket for +-.B SOL_PACKET +-and one of the options + .B PACKET_ADD_MEMBERSHIP +-to add a binding or ++adds a binding and + .B PACKET_DROP_MEMBERSHIP +-to drop it. ++drops it. + They both expect a +-.B packet_mreq ++.I packet_mreq + structure as argument: + + .in +4n +@@ -222,11 +227,206 @@ and + sets the socket up to receive all multicast packets arriving at + the interface. + +-In addition the traditional ioctls ++In addition, the traditional ioctls + .BR SIOCSIFFLAGS , + .BR SIOCADDMULTI , + .B SIOCDELMULTI + can be used for the same purpose. ++.TP ++.BR PACKET_AUXDATA " (since Linux 2.6.21)" ++.\" commit 8dc4194474159660d7f37c495e3fc3f10d0db8cc ++If this binary option is enabled, the packet socket passes a metadata ++structure along with each packet in the ++.BR recvmsg (2) ++control field. ++The structure can be read with ++.BR cmsg (3). ++It is defined as ++ ++.in +4n ++.nf ++struct tpacket_auxdata { ++ __u32 tp_status; ++ __u32 tp_len; /* packet length */ ++ __u32 tp_snaplen; /* captured length */ ++ __u16 tp_mac; ++ __u16 tp_net; ++ __u16 tp_vlan_tci; ++ __u16 tp_padding; ++}; ++.fi ++.in ++.TP ++.BR PACKET_FANOUT " (since Linux 3.1)" ++.\" commit dc99f600698dcac69b8f56dda9a8a00d645c5ffc ++To scale processing across threads, packet sockets can form a fanout ++group. ++In this mode, each matching packet is enqueued onto only one ++socket in the group. ++A socket joins a fanout group by calling ++.BR setsockopt (2) ++with level ++.B SOL_PACKET ++and option ++.BR PACKET_FANOUT . ++Each network namespace can have up to 65536 independent groups. ++A socket selects a group by encoding the ID in the first 16 bits of ++the integer option value. ++The first packet socket to join a group implicitly creates it. ++To successfully join an existing group, subsequent packet sockets ++must have the same protocol, device settings, fanout mode and ++flags (see below). ++Packet sockets can leave a fanout group only by closing the socket. ++The group is deleted when the last socket is closed. ++ ++Fanout supports multiple algorithms to spread traffic between sockets. ++The default mode, ++.BR PACKET_FANOUT_HASH , ++sends packets from the same flow to the same socket to maintain ++per-flow ordering. ++For each packet, it chooses a socket by taking the packet flow hash ++modulo the number of sockets in the group, where a flow hash is a hash ++over network-layer address and optional transport-layer port fields. ++The load-balance mode ++.BR PACKET_FANOUT_LB ++implements a round-robin algorithm. ++.BR PACKET_FANOUT_CPU ++selects the socket based on the CPU that the packet arrived on. ++.BR PACKET_FANOUT_ROLLOVER ++processes all data on a single socket, moves to the next when one ++becomes backlogged. ++.BR PACKET_FANOUT_RND ++selects the socket using a pseudo-random number generator. ++ ++Fanout modes can take additional options. ++IP fragmentation causes packets from the same flow to have different ++flow hashes. ++The flag ++.BR PACKET_FANOUT_FLAG_DEFRAG , ++if set, causes packet to be defragmented before fanout is applied, to ++preserve order even in this case. ++Fanout mode and options are communicated in the second 16 bits of the ++integer option value. ++The flag ++.BR PACKET_FANOUT_FLAG_ROLLOVER ++enables the roll over mechanism as a backup strategy: if the ++original fanout algorithm selects a backlogged socket, the packet ++rolls over to the next available one. ++.TP ++.BR PACKET_LOSS " (with " PACKET_TX_RING ) ++If set, do not silently drop a packet on transmission error, but ++return it with status set to ++.BR TP_STATUS_WRONG_FORMAT . ++.TP ++.BR PACKET_RESERVE " (with " PACKET_RX_RING ) ++By default, a packet receive ring writes packets immediately following the ++metadata structure and alignment padding. ++This integer option reserves additional headroom. ++.TP ++.BR PACKET_RX_RING ++Create a memory-mapped ring buffer for asynchronous packet reception. ++The packet socket reserves a contiguous region of application address ++space, lays it out into an array of packet slots and copies packets ++(up to ++.IR tp_snaplen ++) into subsequent slots. ++Each packet is preceded by a metadata structure similar to ++.IR tpacket_auxdata . ++The protocol fields encode the offset to the data ++from the start of the metadata header. ++.I tp_net ++stores the offset to the network layer. ++If the packet socket is of type ++.BR SOCK_DGRAM , ++then ++.I tp_mac ++is the same. ++If it is of type ++.BR SOCK_RAW , ++then that field stores the offset to the link-layer frame. ++Packet socket and application communicate the head and tail of the ring ++through the ++.I tp_status ++field. ++The packet socket owns all slots with status ++.BR TP_STATUS_KERNEL . ++After filling a slot, it changes the status of the slot to transfer ++ownership to the application. ++During normal operation, the new status is ++.BR TP_STATUS_USER , ++to signal that a correctly received packet has been stored. ++When the application has finished processing a packet, it transfers ++ownership of the slot back to the socket by setting the status to ++.BR TP_STATUS_KERNEL . ++Packet sockets implement multiple variants of the packet ring. ++The implementation details are described in ++.IR Documentation/networking/packet_mmap.txt ++in the Linux kernel source tree. ++.TP ++.BR PACKET_STATISTICS ++Retrieve packet socket statistics in the form of a structure ++ ++.in +4n ++.nf ++struct tpacket_stats { ++ unsigned int tp_packets; /* Total packet count */ ++ unsigned int tp_drops; /* Dropped packet count */ ++}; ++.fi ++.in ++ ++Receiving statistics resets the internal counters. ++The statistics structure differs when using a ring of variant ++.BR TPACKET_V3 . ++.TP ++.BR PACKET_TIMESTAMP " (with " PACKET_RX_RING "; since Linux 2.6.36)" ++.\" commit 614f60fa9d73a9e8fdff3df83381907fea7c5649 ++The packet receive ring always stores a timestamp in the metadata header. ++By default, this is a software generated timestamp generated when the ++packet is copied into the ring. ++This integer option selects the type of timestamp. ++Besides the default, it support the two hardware formats described in ++.IR Documentation/networking/timestamping.txt ++in the Linux kernel source tree. ++.TP ++.BR PACKET_TX_RING " (since Linux 2.6.31)" ++.\" commit 69e3c75f4d541a6eb151b3ef91f34033cb3ad6e1 ++Create a memory-mapped ring buffer for packet transmission. ++This option is similar to ++.BR PACKET_RX_RING ++and takes the same arguments. ++The application writes packets into slots with status ++.BR TP_STATUS_AVAILABLE ++and schedules them for transmission by changing the status to ++.BR TP_STATUS_SEND_REQUEST . ++When packets are ready to be transmitted, the application calls ++.BR send (2) ++or a variant thereof. ++The ++.I buf ++and ++.I len ++fields of this call are ignored. ++If an address is passed using ++.BR sendto (2) ++or ++.BR sendmsg (2) , ++then that overrides the socket default. ++On successful transmission, the socket resets the slot to ++.BR TP_STATUS_AVAILABLE . ++It discards packets silently on error unless ++.BR PACKET_LOSS ++is set. ++.TP ++.BR PACKET_VERSION " (with " PACKET_RX_RING "; since Linux 2.6.27)" ++.\" commit bbd6ef87c544d88c30e4b762b1b61ef267a7d279 ++By default, ++.BR PACKET_RX_RING ++creates a packet receive ring of variant ++.BR TPACKET_V1 . ++To create another variant, configure the desired variant by setting this ++integer option before creating the ring. ++ + .SS Ioctls + .B SIOCGSTAMP + can be used to receive the timestamp of the last received packet. +-- +2.7.4 + diff --git a/SOURCES/1411979-mpo-7.4.0-memparse.1.patch b/SOURCES/1411979-mpo-7.4.0-memparse.1.patch new file mode 100644 index 0000000..0751f3a --- /dev/null +++ b/SOURCES/1411979-mpo-7.4.0-memparse.1.patch @@ -0,0 +1,25 @@ +From 0672cb6c7a23e6a3a8bab9176279af6adc8407b7 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Nikola=20Forr=C3=B3?= +Date: Tue, 28 Mar 2017 14:59:49 +0200 +Subject: [PATCH 4/6] memparse.1: remove incorrect description + +--- + libmemcached/man1/memparse.1 | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/libmemcached/man1/memparse.1 b/libmemcached/man1/memparse.1 +index 1760a52..4ca35a8 100644 +--- a/libmemcached/man1/memparse.1 ++++ b/libmemcached/man1/memparse.1 +@@ -30,8 +30,6 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] + .. + .\" Man page generated from reStructuredText. + . +-.sp +-Copies files to a collection of memcached servers + .SH SYNOPSIS + .sp + memparse [options] "option string" +-- +2.7.4 + diff --git a/SOURCES/1422950-mpo-7.5.2-recvmmsg.2-sendmmsg.2.patch b/SOURCES/1422950-mpo-7.5.2-recvmmsg.2-sendmmsg.2.patch new file mode 100644 index 0000000..7704306 --- /dev/null +++ b/SOURCES/1422950-mpo-7.5.2-recvmmsg.2-sendmmsg.2.patch @@ -0,0 +1,69 @@ +From 8866991164690817cc1e3489b6f7aa615170935d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Nikola=20Forr=C3=B3?= +Date: Wed, 10 Jan 2018 11:38:35 +0100 +Subject: [PATCH] recvmmsg.2, sendmmsg.2: point out that error handling is + unreliable + +--- + man-pages/man2/recvmmsg.2 | 10 ++++++++++ + man-pages/man2/sendmmsg.2 | 9 +++++++++ + 2 files changed, 19 insertions(+) + +diff --git a/man-pages/man2/recvmmsg.2 b/man-pages/man2/recvmmsg.2 +index 4c00ebe..7fc4d5a 100644 +--- a/man-pages/man2/recvmmsg.2 ++++ b/man-pages/man2/recvmmsg.2 +@@ -162,6 +162,8 @@ In addition, the following error can occur: + .B EINVAL + .I timeout + is invalid. ++.PP ++See also BUGS. + .SH VERSIONS + The + .BR recvmmsg () +@@ -170,6 +172,14 @@ Support in glibc was added in version 2.12. + .SH CONFORMING TO + .BR recvmmsg () + is Linux-specific. ++.SH BUGS ++If an error occurs after at least one message has been received, ++the call succeeds, and returns the number of messages received. ++The error code is expected to be returned on a subsequent call to ++.BR recvmmsq (). ++In the current implementation, however, the error code can be overwritten ++in the meantime by an unrelated network event on a socket, ++for example an incoming ICMP packet. + .SH EXAMPLE + .PP + The following program uses +diff --git a/man-pages/man2/sendmmsg.2 b/man-pages/man2/sendmmsg.2 +index a646524..939ee3c 100644 +--- a/man-pages/man2/sendmmsg.2 ++++ b/man-pages/man2/sendmmsg.2 +@@ -134,6 +134,7 @@ is set to indicate the error. + Errors are as for + .BR sendmsg (2). + An error is returned only if no datagrams could be sent. ++See also BUGS. + .\" commit 728ffb86f10873aaf4abd26dde691ee40ae731fe + .\" ... only return an error if no datagrams could be sent. + .\" If less than the requested number of messages were sent, the application +@@ -165,6 +166,14 @@ is capped to + .\" For error handling an application using sendmmsg needs to retry at + .\" the first unsent message, so capping is simpler and requires less + .\" application logic than returning EINVAL. ++.SH BUGS ++If an error occurs after at least one message has been sent, ++the call succeeds, and returns the number of messages sent. ++The error code is lost. ++The caller can retry the transmission, ++starting at the first failed message, but there is no guarantee that, ++if an error is returned, it will be the same as the one that was lost ++on the previous call. + .SH EXAMPLE + The example below uses + .BR sendmmsg () +-- +2.13.6 + diff --git a/SOURCES/1437003-mpo-7.5.1-aide.1-aide.conf.5.patch b/SOURCES/1437003-mpo-7.5.1-aide.1-aide.conf.5.patch new file mode 100644 index 0000000..83f7d6b --- /dev/null +++ b/SOURCES/1437003-mpo-7.5.1-aide.1-aide.conf.5.patch @@ -0,0 +1,39 @@ +From b336952efa7002ad3c82941708e52e46fc50dfc0 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Nikola=20Forr=C3=B3?= +Date: Tue, 12 Dec 2017 12:36:46 +0100 +Subject: [PATCH] aide.1, aide.conf.5: fix upstream URL + +--- + aide/man1/aide.1 | 2 +- + aide/man5/aide.conf.5 | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/aide/man1/aide.1 b/aide/man1/aide.1 +index 9494210..19e2624 100644 +--- a/aide/man1/aide.1 ++++ b/aide/man1/aide.1 +@@ -82,7 +82,7 @@ Default aide database. + Default aide output database. + .SH SEE ALSO + .BR aide.conf (5) +-.BR http://www.cs.tut.fi/~rammer/aide/manual.html ++.BR http://aide.sourceforge.net/stable/manual.html + .SH BUGS + There are probably bugs in this release. Please report them + at http://sourceforge.net/projects/aide . Bug fixes are more than welcome. +diff --git a/aide/man5/aide.conf.5 b/aide/man5/aide.conf.5 +index ad01086..c68862f 100644 +--- a/aide/man5/aide.conf.5 ++++ b/aide/man5/aide.conf.5 +@@ -332,7 +332,7 @@ In the following, the first is not allowed in AIDE. Use the latter instead. + .PP + .SH "SEE ALSO" + .BR aide (1) +-.BR http://www.cs.tut.fi/~rammer/aide/manual.html ++.BR http://aide.sourceforge.net/stable/manual.html + .SH DISCLAIMER + All trademarks are the property of their respective owners. + No animals were harmed while making this webpage or this piece of +-- +2.13.6 + diff --git a/SOURCES/1452368-mpo-7.4.2-clone.2.patch b/SOURCES/1452368-mpo-7.4.2-clone.2.patch new file mode 100644 index 0000000..e8089e4 --- /dev/null +++ b/SOURCES/1452368-mpo-7.4.2-clone.2.patch @@ -0,0 +1,1763 @@ +From fb510f4e3dc6c13696bce6d3a79b8cea9b03b044 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Nikola=20Forr=C3=B3?= +Date: Mon, 22 May 2017 14:51:53 +0200 +Subject: [PATCH 1/2] clone.2: document features related to namespaces + +--- + man-pages/man2/____clone.2 | 524 ++++++++++++++++++++++++++++----------------- + man-pages/man2/clone.2 | 524 ++++++++++++++++++++++++++++----------------- + 2 files changed, 658 insertions(+), 390 deletions(-) + +diff --git a/man-pages/man2/____clone.2 b/man-pages/man2/____clone.2 +index 56d03cf..edf0994 100644 +--- a/man-pages/man2/____clone.2 ++++ b/man-pages/man2/____clone.2 +@@ -39,50 +39,23 @@ + .\" 2008-11-19, mtk, document CLONE_NEWIPC + .\" 2008-11-19, Jens Axboe, mtk, document CLONE_IO + .\" +-.\" FIXME Document CLONE_NEWUSER, which is new in 2.6.23 +-.\" (also supported for unshare()?) +-.\" +-.TH CLONE 2 2013-04-16 "Linux" "Linux Programmer's Manual" ++.TH CLONE 2 2016-12-12 "Linux" "Linux Programmer's Manual" + .SH NAME + clone, __clone2 \- create a child process + .SH SYNOPSIS + .nf + /* Prototype for the glibc wrapper function */ + ++.B #define _GNU_SOURCE + .B #include + + .BI "int clone(int (*" "fn" ")(void *), void *" child_stack , + .BI " int " flags ", void *" "arg" ", ... " +-.BI " /* pid_t *" ptid ", struct user_desc *" tls \ ++.BI " /* pid_t *" ptid ", void *" newtls \ + ", pid_t *" ctid " */ );" + +-/* Prototype for the raw system call */ +- +-.BI "long clone(unsigned long " flags ", void *" child_stack , +-.BI " void *" ptid ", void *" ctid , +-.BI " struct pt_regs *" regs ); ++/* For the prototype of the raw system call, see NOTES */ + .fi +-.sp +-.in -4n +-Feature Test Macro Requirements for glibc wrapper function (see +-.BR feature_test_macros (7)): +-.in +-.sp +-.BR clone (): +-.ad l +-.RS 4 +-.PD 0 +-.TP 4 +-Since glibc 2.14: +-_GNU_SOURCE +-.TP 4 +-.\" FIXME See http://sources.redhat.com/bugzilla/show_bug.cgi?id=4749 +-Before glibc 2.14: +-_BSD_SOURCE || _SVID_SOURCE +- /* _GNU_SOURCE also suffices */ +-.PD +-.RE +-.ad b + .SH DESCRIPTION + .BR clone () + creates a new process, in a manner similar to +@@ -107,7 +80,7 @@ But see the description of + .B CLONE_PARENT + below.) + +-The main use of ++One use of + .BR clone () + is to implement threads: multiple threads of control in a program that + run concurrently in a shared memory space. +@@ -180,7 +153,7 @@ in order to specify what is shared between the calling process + and the child process: + .TP + .BR CLONE_CHILD_CLEARTID " (since Linux 2.5.49)" +-Erase child thread ID at location ++Clear (zero) the child thread ID at the location + .I ctid + in child memory when the child exits, and do a wakeup on the futex + at that address. +@@ -190,9 +163,12 @@ system call. + This is used by threading libraries. + .TP + .BR CLONE_CHILD_SETTID " (since Linux 2.5.49)" +-Store child thread ID at location ++Store the child thread ID at the location + .I ctid +-in child memory. ++in the child's memory. ++The store operation completes before ++.BR clone () ++returns control to user space. + .TP + .BR CLONE_FILES " (since Linux 2.0)" + If +@@ -206,27 +182,31 @@ or changes its associated flags (using the + .BR fcntl (2) + .B F_SETFD + operation), the other process is also affected. ++If a process sharing a file descriptor table calls ++.BR execve (2), ++its file descriptor table is duplicated (unshared). + + If + .B CLONE_FILES + is not set, the child process inherits a copy of all file descriptors + opened in the calling process at the time of + .BR clone (). +-(The duplicated file descriptors in the child refer to the +-same open file descriptions (see +-.BR open (2)) +-as the corresponding file descriptors in the calling process.) + Subsequent operations that open or close file descriptors, + or change file descriptor flags, + performed by either the calling + process or the child process do not affect the other process. ++Note, however, ++that the duplicated file descriptors in the child refer to the same open file ++descriptions as the corresponding file descriptors in the calling process, ++and thus share file offsets and file status flags (see ++.BR open (2)). + .TP + .BR CLONE_FS " (since Linux 2.0)" + If + .B CLONE_FS +-is set, the caller and the child process share the same file system ++is set, the caller and the child process share the same filesystem + information. +-This includes the root of the file system, the current ++This includes the root of the filesystem, the current + working directory, and the umask. + Any call to + .BR chroot (2), +@@ -238,7 +218,7 @@ other process. + + If + .B CLONE_FS +-is not set, the child process works on a copy of the file system ++is not set, the child process works on a copy of the filesystem + information of the calling process at the time of the + .BR clone () + call. +@@ -258,7 +238,7 @@ If this flag is not set, then (as with + the new process has its own I/O context. + + .\" The following based on text from Jens Axboe +-The I/O context is the I/O scope of the disk scheduler (i.e, ++The I/O context is the I/O scope of the disk scheduler (i.e., + what the I/O scheduler uses to model scheduling of a process's I/O). + If processes share the same I/O context, + they are treated as one by the I/O scheduler. +@@ -288,7 +268,7 @@ the process is created in the same IPC namespace as + the calling process. + This flag is intended for the implementation of containers. + +-An IPC namespace provides an isolated view of System V IPC objects (see ++An IPC namespace provides an isolated view of System\ V IPC objects (see + .BR svipc (7)) + and (since Linux 2.6.30) + .\" commit 7eafd7c74c3f2e67c27621b987b28397110d643f +@@ -308,17 +288,17 @@ When an IPC namespace is destroyed + (i.e., when the last process that is a member of the namespace terminates), + all IPC objects in the namespace are automatically destroyed. + +-Use of this flag requires: a kernel configured with the +-.B CONFIG_SYSVIPC +-and +-.B CONFIG_IPC_NS +-options and that the process be privileged +-.RB ( CAP_SYS_ADMIN ). ++Only a privileged process ++.RB ( CAP_SYS_ADMIN ) ++can employ ++.BR CLONE_NEWIPC . + This flag can't be specified in conjunction with + .BR CLONE_SYSVSEM . ++ ++For further information on IPC namespaces, see ++.BR namespaces (7). + .TP + .BR CLONE_NEWNET " (since Linux 2.6.24)" +-.\" FIXME Check when the implementation was completed + (The implementation of this flag was completed only + by about kernel version 2.6.29.) + +@@ -326,7 +306,7 @@ If + .B CLONE_NEWNET + is set, then create the process in a new network namespace. + If this flag is not set, then (as with +-.BR fork (2)), ++.BR fork (2)) + the process is created in the same network namespace as + the calling process. + This flag is intended for the implementation of containers. +@@ -341,7 +321,7 @@ directory trees, sockets, etc.). + A physical network device can live in exactly one + network namespace. + A virtual network device ("veth") pair provides a pipe-like abstraction +-.\" FIXME Add pointer to veth(4) page when it is eventually completed ++.\" FIXME . Add pointer to veth(4) page when it is eventually completed + that can be used to create tunnels between network namespaces, + and can be used to create a bridge to a physical network device + in another namespace. +@@ -350,54 +330,41 @@ When a network namespace is freed + (i.e., when the last process in the namespace terminates), + its physical network devices are moved back to the + initial network namespace (not to the parent of the process). ++For further information on network namespaces, see ++.BR namespaces (7). + +-Use of this flag requires: a kernel configured with the +-.B CONFIG_NET_NS +-option and that the process be privileged +-.RB ( CAP_SYS_ADMIN ). ++Only a privileged process ++.RB ( CAP_SYS_ADMIN ) ++can employ ++.BR CLONE_NEWNET . + .TP + .BR CLONE_NEWNS " (since Linux 2.4.19)" +-Start the child in a new mount namespace. +- +-Every process lives in a mount namespace. +-The +-.I namespace +-of a process is the data (the set of mounts) describing the file hierarchy +-as seen by that process. +-After a +-.BR fork (2) +-or +-.BR clone () +-where the +-.B CLONE_NEWNS +-flag is not set, the child lives in the same mount +-namespace as the parent. +-The system calls +-.BR mount (2) +-and +-.BR umount (2) +-change the mount namespace of the calling process, and hence affect +-all processes that live in the same namespace, but do not affect +-processes in a different mount namespace. +- +-After a +-.BR clone () +-where the ++If + .B CLONE_NEWNS +-flag is set, the cloned child is started in a new mount namespace, ++is set, the cloned child is started in a new mount namespace, + initialized with a copy of the namespace of the parent. +- +-Only a privileged process (one having the \fBCAP_SYS_ADMIN\fP capability) +-may specify the ++If + .B CLONE_NEWNS +-flag. ++is not set, the child lives in the same mount ++namespace as the parent. ++ ++Only a privileged process ++.RB ( CAP_SYS_ADMIN ) ++can employ ++.BR CLONE_NEWNS . + It is not permitted to specify both + .B CLONE_NEWNS + and + .B CLONE_FS ++.\" See https://lwn.net/Articles/543273/ + in the same + .BR clone () + call. ++ ++For further information on mount namespaces, see ++.BR namespaces (7) ++and ++.BR mount_namespaces (7). + .TP + .BR CLONE_NEWPID " (since Linux 2.6.24)" + .\" This explanation draws a lot of details from +@@ -411,73 +378,74 @@ If + .B CLONE_NEWPID + is set, then create the process in a new PID namespace. + If this flag is not set, then (as with +-.BR fork (2)), ++.BR fork (2)) + the process is created in the same PID namespace as + the calling process. + This flag is intended for the implementation of containers. + +-A PID namespace provides an isolated environment for PIDs: +-PIDs in a new namespace start at 1, +-somewhat like a standalone system, and calls to +-.BR fork (2), +-.BR vfork (2), ++For further information on PID namespaces, see ++.BR namespaces (7) ++and ++.BR pid_namespaces (7). ++ ++Only a privileged process ++.RB ( CAP_SYS_ADMIN ) ++can employ ++.BR CLONE_NEWPID . ++This flag can't be specified in conjunction with ++.BR CLONE_THREAD + or ++.BR CLONE_PARENT . ++.TP ++.BR CLONE_NEWUSER ++(This flag first became meaningful for + .BR clone () +-will produce processes with PIDs that are unique within the namespace. ++in Linux 2.6.23, ++the current ++.BR clone () ++semantics were merged in Linux 3.5, ++and the final pieces to make the user namespaces completely usable were ++merged in Linux 3.8.) + +-The first process created in a new namespace +-(i.e., the process created using the +-.BR CLONE_NEWPID +-flag) has the PID 1, and is the "init" process for the namespace. +-Children that are orphaned within the namespace will be reparented +-to this process rather than +-.BR init (8). +-Unlike the traditional +-.B init +-process, the "init" process of a PID namespace can terminate, +-and if it does, all of the processes in the namespace are terminated. +- +-PID namespaces form a hierarchy. +-When a new PID namespace is created, +-the processes in that namespace are visible +-in the PID namespace of the process that created the new namespace; +-analogously, if the parent PID namespace is itself +-the child of another PID namespace, +-then processes in the child and parent PID namespaces will both be +-visible in the grandparent PID namespace. +-Conversely, the processes in the "child" PID namespace do not see +-the processes in the parent namespace. +-The existence of a namespace hierarchy means that each process +-may now have multiple PIDs: +-one for each namespace in which it is visible; +-each of these PIDs is unique within the corresponding namespace. +-(A call to +-.BR getpid (2) +-always returns the PID associated with the namespace in which +-the process lives.) +- +-After creating the new namespace, +-it is useful for the child to change its root directory +-and mount a new procfs instance at +-.I /proc +-so that tools such as +-.BR ps (1) +-work correctly. +-.\" mount -t proc proc /proc +-(If +-.BR CLONE_NEWNS +-is also included in +-.IR flags , +-then it isn't necessary to change the root directory: +-a new procfs instance can be mounted directly over +-.IR /proc .) ++If ++.B CLONE_NEWUSER ++is set, then create the process in a new user namespace. ++If this flag is not set, then (as with ++.BR fork (2)) ++the process is created in the same user namespace as the calling process. ++ ++For further information on user namespaces, see ++.BR namespaces (7) ++and ++.BR user_namespaces (7) ++ ++Before Linux 3.8, use of ++.BR CLONE_NEWUSER ++required that the caller have three capabilities: ++.BR CAP_SYS_ADMIN , ++.BR CAP_SETUID , ++and ++.BR CAP_SETGID . ++.\" Before Linux 2.6.29, it appears that only CAP_SYS_ADMIN was needed ++Starting with Linux 3.8, ++no privileges are needed to create a user namespace. + +-Use of this flag requires: a kernel configured with the +-.B CONFIG_PID_NS +-option and that the process be privileged +-.RB ( CAP_SYS_ADMIN ). + This flag can't be specified in conjunction with +-.BR CLONE_THREAD . ++.BR CLONE_THREAD ++or ++.BR CLONE_PARENT . ++For security reasons, ++.\" commit e66eded8309ebf679d3d3c1f5820d1f2ca332c71 ++.\" https://lwn.net/Articles/543273/ ++.\" The fix actually went into 3.9 and into 3.8.3. However, user namespaces ++.\" were, for practical purposes, unusable in earlier 3.8.x because of the ++.\" various filesystems that didn't support userns. ++.BR CLONE_NEWUSER ++cannot be specified in conjunction with ++.BR CLONE_FS . ++ ++For further information on user namespaces, see ++.BR user_namespaces (7). + .TP + .BR CLONE_NEWUTS " (since Linux 2.6.19)" + If +@@ -486,27 +454,29 @@ is set, then create the process in a new UTS namespace, + whose identifiers are initialized by duplicating the identifiers + from the UTS namespace of the calling process. + If this flag is not set, then (as with +-.BR fork (2)), ++.BR fork (2)) + the process is created in the same UTS namespace as + the calling process. + This flag is intended for the implementation of containers. + + A UTS namespace is the set of identifiers returned by + .BR uname (2); +-among these, the domain name and the host name can be modified by ++among these, the domain name and the hostname can be modified by + .BR setdomainname (2) + and +-.BR + .BR sethostname (2), + respectively. + Changes made to the identifiers in a UTS namespace + are visible to all other processes in the same namespace, + but are not visible to processes in other UTS namespaces. + +-Use of this flag requires: a kernel configured with the +-.B CONFIG_UTS_NS +-option and that the process be privileged +-.RB ( CAP_SYS_ADMIN ). ++Only a privileged process ++.RB ( CAP_SYS_ADMIN ) ++can employ ++.BR CLONE_NEWUTS . ++ ++For further information on UTS namespaces, see ++.BR namespaces (7). + .TP + .BR CLONE_PARENT " (since Linux 2.3.12)" + If +@@ -530,12 +500,15 @@ is set, then the parent of the calling process, rather than the + calling process itself, will be signaled. + .TP + .BR CLONE_PARENT_SETTID " (since Linux 2.5.49)" +-Store child thread ID at location ++Store the child thread ID at the location + .I ptid +-in parent and child memory. ++in the parent's memory. + (In Linux 2.5.32-2.5.48 there was a flag + .B CLONE_SETTID + that did this.) ++The store operation completes before ++.BR clone () ++returns control to user space. + .TP + .BR CLONE_PID " (obsolete)" + If +@@ -547,6 +520,7 @@ of not much use. + Since 2.3.21 this flag can be + specified only by the system boot process (PID 0). + It disappeared in Linux 2.5.16. ++Since then, the kernel silently ignores it without error. + .TP + .BR CLONE_PTRACE " (since Linux 2.2)" + If +@@ -556,11 +530,25 @@ then trace the child also (see + .BR ptrace (2)). + .TP + .BR CLONE_SETTLS " (since Linux 2.5.32)" +-The ++The TLS (Thread Local Storage) descriptor is set to ++.I newtls. ++ ++The interpretation of + .I newtls +-argument is the new TLS (Thread Local Storage) descriptor. ++and the resulting effect is architecture dependent. ++On x86, ++.I newtls ++is interpreted as a ++.IR "struct user_desc *" + (See +-.BR set_thread_area (2).) ++.BR set_thread_area (2)). ++On x86_64 it is the new value to be set for the %fs base register ++(See the ++.I ARCH_SET_FS ++argument to ++.BR arch_prctl (2)). ++On architectures with a dedicated TLS register, it is the new value ++of that register. + .TP + .BR CLONE_SIGHAND " (since Linux 2.0)" + If +@@ -612,16 +600,26 @@ from Linux 2.6.25 onward, + and was + .I removed + altogether in Linux 2.6.38. ++Since then, the kernel silently ignores it without error. + .\" glibc 2.8 removed this defn from bits/sched.h + .TP + .BR CLONE_SYSVSEM " (since Linux 2.5.10)" + If + .B CLONE_SYSVSEM + is set, then the child and the calling process share +-a single list of System V semaphore undo values (see ++a single list of System V semaphore adjustment ++.RI ( semadj ) ++values (see + .BR semop (2)). +-If this flag is not set, then the child has a separate undo list, +-which is initially empty. ++In this case, the shared list accumulates ++.I semadj ++values across all processes sharing the list, ++and semaphore adjustments are performed only when the last process ++that is sharing the list terminates (or ceases sharing the list using ++.BR unshare (2)). ++If this flag is not set, then the child has a separate ++.I semadj ++list that is initially empty. + .TP + .BR CLONE_THREAD " (since Linux 2.4.0-test8)" + If +@@ -703,7 +701,12 @@ must also include + .B CLONE_SIGHAND + if + .B CLONE_THREAD +-is specified. ++is specified ++(and note that, since Linux 2.6.0-test6, ++.BR CLONE_SIGHAND ++also requires ++.BR CLONE_VM ++to be included). + + Signals may be sent to a thread group as a whole (i.e., a TGID) using + .BR kill (2), +@@ -761,7 +764,7 @@ or + + If + .B CLONE_VFORK +-is not set then both the calling process and the child are schedulable ++is not set, then both the calling process and the child are schedulable + after the call, and an application should not rely on execution occurring + in any particular order. + .TP +@@ -786,7 +789,7 @@ space of the calling process at the time of + Memory writes or file mappings/unmappings performed by one of the + processes do not affect the other, as with + .BR fork (2). +-.SS The raw system call interface ++.SS C library/kernel differences + The raw + .BR clone () + system call corresponds more closely to +@@ -801,16 +804,58 @@ arguments of the + .BR clone () + wrapper function are omitted. + Furthermore, the argument order changes. +-The raw system call interface on x86 and many other architectures is roughly: ++In addition, there are variations across architectures. ++ ++The raw system call interface on x86-64 and some other architectures ++(including sh, tile, and alpha) is roughly: ++ + .in +4 + .nf ++.BI "long clone(unsigned long " flags ", void *" child_stack , ++.BI " int *" ptid ", int *" ctid , ++.BI " unsigned long " newtls ); ++.fi ++.in ++ ++On x86-32, and several other common architectures ++(including score, ARM, ARM 64, PA-RISC, arc, Power PC, xtensa, ++and MIPS), ++.\" CONFIG_CLONE_BACKWARDS ++the order of the last two arguments is reversed: + ++.in +4 ++.nf + .BI "long clone(unsigned long " flags ", void *" child_stack , +-.BI " void *" ptid ", void *" ctid , +-.BI " struct pt_regs *" regs ); ++.BI " int *" ptid ", unsigned long " newtls , ++.BI " int *" ctid ); ++.fi ++.in ++ ++On the cris and s390 architectures, ++.\" CONFIG_CLONE_BACKWARDS2 ++the order of the first two arguments is reversed: + ++.in +4 ++.nf ++.BI "long clone(void *" child_stack ", unsigned long " flags , ++.BI " int *" ptid ", int *" ctid , ++.BI " unsigned long " newtls ); ++.fi ++.in ++ ++On the microblaze architecture, ++.\" CONFIG_CLONE_BACKWARDS3 ++an additional argument is supplied: ++ ++.in +4 ++.nf ++.BI "long clone(unsigned long " flags ", void *" child_stack , ++.BI " int " stack_size , "\fR /* Size of stack */" ++.BI " int *" ptid ", int *" ctid , ++.BI " unsigned long " newtls ); + .fi + .in ++ + Another difference for the raw system call is that the + .I child_stack + argument may be zero, in which case copy-on-write semantics ensure that the +@@ -819,17 +864,13 @@ the stack. + In this case, for correct operation, the + .B CLONE_VM + option should not be specified. +- +-For some architectures, the order of the arguments for the system call +-differs from that shown above. +-On the score, microblaze, ARM, ARM 64, PA-RISC, arc, Power PC, xtensa, +-and MIPS architectures, +-the order of the fourth and fifth arguments is reversed. +-On the cris and s390 architectures, +-the order of the first and second arguments is reversed. ++.\" + .SS blackfin, m68k, and sparc ++.\" Mike Frysinger noted in a 2013 mail: ++.\" these arches don't define __ARCH_WANT_SYS_CLONE: ++.\" blackfin ia64 m68k sparc + The argument-passing conventions on +-blackfin, m68k, and sparc are different from descriptions above. ++blackfin, m68k, and sparc are different from the descriptions above. + For details, see the kernel (and glibc) source. + .SS ia64 + On ia64, a different interface is used: +@@ -883,7 +924,8 @@ will be set appropriately. + .SH ERRORS + .TP + .B EAGAIN +-Too many processes are already running. ++Too many processes are already running; see ++.BR fork (2). + .TP + .B EINVAL + .B CLONE_SIGHAND +@@ -908,6 +950,7 @@ was not. + .\" (Since Linux 2.6.0-test6.) + .TP + .B EINVAL ++.\" commit e66eded8309ebf679d3d3c1f5820d1f2ca332c71 + Both + .B CLONE_FS + and +@@ -915,6 +958,14 @@ and + were specified in + .IR flags . + .TP ++.BR EINVAL " (since Linux 3.9)" ++Both ++.B CLONE_NEWUSER ++and ++.B CLONE_FS ++were specified in ++.IR flags . ++.TP + .B EINVAL + Both + .B CLONE_NEWIPC +@@ -924,18 +975,25 @@ were specified in + .IR flags . + .TP + .B EINVAL +-Both ++One (or both) of + .BR CLONE_NEWPID +-and ++or ++.BR CLONE_NEWUSER ++and one (or both) of + .BR CLONE_THREAD ++or ++.BR CLONE_PARENT + were specified in + .IR flags . + .TP + .B EINVAL +-Returned by ++Returned by the glibc + .BR clone () +-when a zero value is specified for +-.IR child_stack . ++wrapper function when ++.IR fn ++or ++.IR child_stack ++is specified as NULL. + .TP + .B EINVAL + .BR CLONE_NEWIPC +@@ -971,11 +1029,48 @@ but the kernel was not configured with the + .B CONFIG_UTS + option. + .TP ++.B EINVAL ++.I child_stack ++is not aligned to a suitable boundary for this architecture. ++For example, on aarch64, ++.I child_stack ++must be a multiple of 16. ++.TP + .B ENOMEM + Cannot allocate sufficient memory to allocate a task structure for the + child, or to copy those parts of the caller's context that need to be + copied. + .TP ++.BR ENOSPC " (since Linux 3.7)" ++.\" commit f2302505775fd13ba93f034206f1e2a587017929 ++.B CLONE_NEWPID ++was specified in flags, ++but the limit on the nesting depth of PID namespaces ++would have been exceeded; see ++.BR pid_namespaces (7). ++.TP ++.BR ENOSPC " (since Linux 4.9; beforehand " EUSERS ) ++.B CLONE_NEWUSER ++was specified in ++.IR flags , ++and the call would cause the limit on the number of ++nested user namespaces to be exceeded. ++See ++.BR user_namespaces (7). ++ ++From Linux 3.11 to Linux 4.8, the error diagnosed in this case was ++.BR EUSERS . ++.TP ++.BR ENOSPC " (since Linux 4.9)" ++One of the values in ++.I flags ++specified the creation of a new user namespace, ++but doing so would have caused the limit defined by the corresponding file in ++.IR /proc/sys/user ++to be exceeded. ++For further details, see ++.BR namespaces (7). ++.TP + .B EPERM + .BR CLONE_NEWIPC , + .BR CLONE_NEWNET , +@@ -989,22 +1084,62 @@ was specified by an unprivileged process (process without \fBCAP_SYS_ADMIN\fP). + .B CLONE_PID + was specified by a process other than process 0. + .TP ++.B EPERM ++.BR CLONE_NEWUSER ++was specified in ++.IR flags , ++but either the effective user ID or the effective group ID of the caller ++does not have a mapping in the parent namespace (see ++.BR user_namespaces (7)). ++.TP ++.BR EPERM " (since Linux 3.9)" ++.\" commit 3151527ee007b73a0ebd296010f1c0454a919c7d ++.B CLONE_NEWUSER ++was specified in ++.I flags ++and the caller is in a chroot environment ++.\" FIXME What is the rationale for this restriction? ++(i.e., the caller's root directory does not match the root directory ++of the mount namespace in which it resides). ++.TP + .BR ERESTARTNOINTR " (since Linux 2.6.17)" ++.\" commit 4a2c7a7837da1b91468e50426066d988050e4d56 + System call was interrupted by a signal and will be restarted. + (This can be seen only during a trace.) +-.SH VERSIONS +-There is no entry for +-.BR clone () +-in libc5. +-glibc2 provides +-.BR clone () +-as described in this manual page. ++.TP ++.BR EUSERS " (Linux 3.11 to Linux 4.8)" ++.B CLONE_NEWUSER ++was specified in ++.IR flags , ++and the limit on the number of nested user namespaces would be exceeded. ++See the discussion of the ++.BR ENOSPC ++error above. ++.\" .SH VERSIONS ++.\" There is no entry for ++.\" .BR clone () ++.\" in libc5. ++.\" glibc2 provides ++.\" .BR clone () ++.\" as described in this manual page. + .SH CONFORMING TO + .BR clone () + is Linux-specific and should not be used in programs + intended to be portable. + .SH NOTES +-In the kernel 2.4.x series, ++The ++.BR kcmp (2) ++system call can be used to test whether two processes share various ++resources such as a file descriptor table, ++System V semaphore undo operations, or a virtual address space. ++ ++ ++Handlers registered using ++.BR pthread_atfork (3) ++are not executed during a call to ++.BR clone (). ++ ++In the Linux 2.4.x series, + .B CLONE_THREAD + generally does not make the parent of the new thread the same + as the parent of the calling process. +@@ -1012,14 +1147,13 @@ However, for kernel versions 2.4.7 to 2.4.18 the + .B CLONE_THREAD + flag implied the + .B CLONE_PARENT +-flag (as in kernel 2.6). ++flag (as in Linux 2.6.0 and later). + + For a while there was + .B CLONE_DETACHED + (introduced in 2.5.32): + parent wants no child-exit signal. +-In 2.6.2 the need to give this +-together with ++In Linux 2.6.2, the need to give this flag together with + .B CLONE_THREAD + disappeared. + This flag is still defined, but has no effect. +@@ -1088,7 +1222,6 @@ To get the truth, it may be necessary to use code such as the following: + .\" https://bugzilla.redhat.com/show_bug.cgi?id=417521 + .\" http://sourceware.org/bugzilla/show_bug.cgi?id=6910 + .SH EXAMPLE +-.SS Create a child that executes in a separate UTS namespace + The following program demonstrates the use of + .BR clone () + to create a child process that executes in a separate UTS namespace. +@@ -1098,7 +1231,7 @@ making it possible to see that the hostname + differs in the UTS namespaces of the parent and child. + For an example of the use of this program, see + .BR setns (2). +- ++.SS Program source + .nf + #define _GNU_SOURCE + #include +@@ -1198,6 +1331,7 @@ main(int argc, char *argv[]) + .BR unshare (2), + .BR wait (2), + .BR capabilities (7), ++.BR namespaces (7), + .BR pthreads (7) + .SH COLOPHON + This page is part of release 3.53 of the Linux +diff --git a/man-pages/man2/clone.2 b/man-pages/man2/clone.2 +index d9ffe3e..d053b0e 100644 +--- a/man-pages/man2/clone.2 ++++ b/man-pages/man2/clone.2 +@@ -39,50 +39,23 @@ + .\" 2008-11-19, mtk, document CLONE_NEWIPC + .\" 2008-11-19, Jens Axboe, mtk, document CLONE_IO + .\" +-.\" FIXME Document CLONE_NEWUSER, which is new in 2.6.23 +-.\" (also supported for unshare()?) +-.\" +-.TH CLONE 2 2013-04-16 "Linux" "Linux Programmer's Manual" ++.TH CLONE 2 2016-12-12 "Linux" "Linux Programmer's Manual" + .SH NAME + clone, __clone2 \- create a child process + .SH SYNOPSIS + .nf + /* Prototype for the glibc wrapper function */ + ++.B #define _GNU_SOURCE + .B #include + + .BI "int clone(int (*" "fn" ")(void *), void *" child_stack , + .BI " int " flags ", void *" "arg" ", ... " +-.BI " /* pid_t *" ptid ", struct user_desc *" tls \ ++.BI " /* pid_t *" ptid ", void *" newtls \ + ", pid_t *" ctid " */ );" + +-/* Prototype for the raw system call */ +- +-.BI "long clone(unsigned long " flags ", void *" child_stack , +-.BI " void *" ptid ", void *" ctid , +-.BI " struct pt_regs *" regs ); ++/* For the prototype of the raw system call, see NOTES */ + .fi +-.sp +-.in -4n +-Feature Test Macro Requirements for glibc wrapper function (see +-.BR feature_test_macros (7)): +-.in +-.sp +-.BR clone (): +-.ad l +-.RS 4 +-.PD 0 +-.TP 4 +-Since glibc 2.14: +-_GNU_SOURCE +-.TP 4 +-.\" FIXME See http://sources.redhat.com/bugzilla/show_bug.cgi?id=4749 +-Before glibc 2.14: +-_BSD_SOURCE || _SVID_SOURCE +- /* _GNU_SOURCE also suffices */ +-.PD +-.RE +-.ad b + .SH DESCRIPTION + .BR clone () + creates a new process, in a manner similar to +@@ -107,7 +80,7 @@ But see the description of + .B CLONE_PARENT + below.) + +-The main use of ++One use of + .BR clone () + is to implement threads: multiple threads of control in a program that + run concurrently in a shared memory space. +@@ -180,7 +153,7 @@ in order to specify what is shared between the calling process + and the child process: + .TP + .BR CLONE_CHILD_CLEARTID " (since Linux 2.5.49)" +-Erase child thread ID at location ++Clear (zero) the child thread ID at the location + .I ctid + in child memory when the child exits, and do a wakeup on the futex + at that address. +@@ -190,9 +163,12 @@ system call. + This is used by threading libraries. + .TP + .BR CLONE_CHILD_SETTID " (since Linux 2.5.49)" +-Store child thread ID at location ++Store the child thread ID at the location + .I ctid +-in child memory. ++in the child's memory. ++The store operation completes before ++.BR clone () ++returns control to user space. + .TP + .BR CLONE_FILES " (since Linux 2.0)" + If +@@ -206,27 +182,31 @@ or changes its associated flags (using the + .BR fcntl (2) + .B F_SETFD + operation), the other process is also affected. ++If a process sharing a file descriptor table calls ++.BR execve (2), ++its file descriptor table is duplicated (unshared). + + If + .B CLONE_FILES + is not set, the child process inherits a copy of all file descriptors + opened in the calling process at the time of + .BR clone (). +-(The duplicated file descriptors in the child refer to the +-same open file descriptions (see +-.BR open (2)) +-as the corresponding file descriptors in the calling process.) + Subsequent operations that open or close file descriptors, + or change file descriptor flags, + performed by either the calling + process or the child process do not affect the other process. ++Note, however, ++that the duplicated file descriptors in the child refer to the same open file ++descriptions as the corresponding file descriptors in the calling process, ++and thus share file offsets and file status flags (see ++.BR open (2)). + .TP + .BR CLONE_FS " (since Linux 2.0)" + If + .B CLONE_FS +-is set, the caller and the child process share the same file system ++is set, the caller and the child process share the same filesystem + information. +-This includes the root of the file system, the current ++This includes the root of the filesystem, the current + working directory, and the umask. + Any call to + .BR chroot (2), +@@ -238,7 +218,7 @@ other process. + + If + .B CLONE_FS +-is not set, the child process works on a copy of the file system ++is not set, the child process works on a copy of the filesystem + information of the calling process at the time of the + .BR clone () + call. +@@ -258,7 +238,7 @@ If this flag is not set, then (as with + the new process has its own I/O context. + + .\" The following based on text from Jens Axboe +-The I/O context is the I/O scope of the disk scheduler (i.e, ++The I/O context is the I/O scope of the disk scheduler (i.e., + what the I/O scheduler uses to model scheduling of a process's I/O). + If processes share the same I/O context, + they are treated as one by the I/O scheduler. +@@ -288,7 +268,7 @@ the process is created in the same IPC namespace as + the calling process. + This flag is intended for the implementation of containers. + +-An IPC namespace provides an isolated view of System V IPC objects (see ++An IPC namespace provides an isolated view of System\ V IPC objects (see + .BR svipc (7)) + and (since Linux 2.6.30) + .\" commit 7eafd7c74c3f2e67c27621b987b28397110d643f +@@ -308,17 +288,17 @@ When an IPC namespace is destroyed + (i.e., when the last process that is a member of the namespace terminates), + all IPC objects in the namespace are automatically destroyed. + +-Use of this flag requires: a kernel configured with the +-.B CONFIG_SYSVIPC +-and +-.B CONFIG_IPC_NS +-options and that the process be privileged +-.RB ( CAP_SYS_ADMIN ). ++Only a privileged process ++.RB ( CAP_SYS_ADMIN ) ++can employ ++.BR CLONE_NEWIPC . + This flag can't be specified in conjunction with + .BR CLONE_SYSVSEM . ++ ++For further information on IPC namespaces, see ++.BR namespaces (7). + .TP + .BR CLONE_NEWNET " (since Linux 2.6.24)" +-.\" FIXME Check when the implementation was completed + (The implementation of this flag was completed only + by about kernel version 2.6.29.) + +@@ -326,7 +306,7 @@ If + .B CLONE_NEWNET + is set, then create the process in a new network namespace. + If this flag is not set, then (as with +-.BR fork (2)), ++.BR fork (2)) + the process is created in the same network namespace as + the calling process. + This flag is intended for the implementation of containers. +@@ -341,7 +321,7 @@ directory trees, sockets, etc.). + A physical network device can live in exactly one + network namespace. + A virtual network device ("veth") pair provides a pipe-like abstraction +-.\" FIXME Add pointer to veth(4) page when it is eventually completed ++.\" FIXME . Add pointer to veth(4) page when it is eventually completed + that can be used to create tunnels between network namespaces, + and can be used to create a bridge to a physical network device + in another namespace. +@@ -350,54 +330,41 @@ When a network namespace is freed + (i.e., when the last process in the namespace terminates), + its physical network devices are moved back to the + initial network namespace (not to the parent of the process). ++For further information on network namespaces, see ++.BR namespaces (7). + +-Use of this flag requires: a kernel configured with the +-.B CONFIG_NET_NS +-option and that the process be privileged +-.RB ( CAP_SYS_ADMIN ). ++Only a privileged process ++.RB ( CAP_SYS_ADMIN ) ++can employ ++.BR CLONE_NEWNET . + .TP + .BR CLONE_NEWNS " (since Linux 2.4.19)" +-Start the child in a new mount namespace. +- +-Every process lives in a mount namespace. +-The +-.I namespace +-of a process is the data (the set of mounts) describing the file hierarchy +-as seen by that process. +-After a +-.BR fork (2) +-or +-.BR clone () +-where the +-.B CLONE_NEWNS +-flag is not set, the child lives in the same mount +-namespace as the parent. +-The system calls +-.BR mount (2) +-and +-.BR umount (2) +-change the mount namespace of the calling process, and hence affect +-all processes that live in the same namespace, but do not affect +-processes in a different mount namespace. +- +-After a +-.BR clone () +-where the ++If + .B CLONE_NEWNS +-flag is set, the cloned child is started in a new mount namespace, ++is set, the cloned child is started in a new mount namespace, + initialized with a copy of the namespace of the parent. +- +-Only a privileged process (one having the \fBCAP_SYS_ADMIN\fP capability) +-may specify the ++If + .B CLONE_NEWNS +-flag. ++is not set, the child lives in the same mount ++namespace as the parent. ++ ++Only a privileged process ++.RB ( CAP_SYS_ADMIN ) ++can employ ++.BR CLONE_NEWNS . + It is not permitted to specify both + .B CLONE_NEWNS + and + .B CLONE_FS ++.\" See https://lwn.net/Articles/543273/ + in the same + .BR clone () + call. ++ ++For further information on mount namespaces, see ++.BR namespaces (7) ++and ++.BR mount_namespaces (7). + .TP + .BR CLONE_NEWPID " (since Linux 2.6.24)" + .\" This explanation draws a lot of details from +@@ -411,73 +378,74 @@ If + .B CLONE_NEWPID + is set, then create the process in a new PID namespace. + If this flag is not set, then (as with +-.BR fork (2)), ++.BR fork (2)) + the process is created in the same PID namespace as + the calling process. + This flag is intended for the implementation of containers. + +-A PID namespace provides an isolated environment for PIDs: +-PIDs in a new namespace start at 1, +-somewhat like a standalone system, and calls to +-.BR fork (2), +-.BR vfork (2), ++For further information on PID namespaces, see ++.BR namespaces (7) ++and ++.BR pid_namespaces (7). ++ ++Only a privileged process ++.RB ( CAP_SYS_ADMIN ) ++can employ ++.BR CLONE_NEWPID . ++This flag can't be specified in conjunction with ++.BR CLONE_THREAD + or ++.BR CLONE_PARENT . ++.TP ++.BR CLONE_NEWUSER ++(This flag first became meaningful for + .BR clone () +-will produce processes with PIDs that are unique within the namespace. ++in Linux 2.6.23, ++the current ++.BR clone () ++semantics were merged in Linux 3.5, ++and the final pieces to make the user namespaces completely usable were ++merged in Linux 3.8.) + +-The first process created in a new namespace +-(i.e., the process created using the +-.BR CLONE_NEWPID +-flag) has the PID 1, and is the "init" process for the namespace. +-Children that are orphaned within the namespace will be reparented +-to this process rather than +-.BR init (8). +-Unlike the traditional +-.B init +-process, the "init" process of a PID namespace can terminate, +-and if it does, all of the processes in the namespace are terminated. +- +-PID namespaces form a hierarchy. +-When a new PID namespace is created, +-the processes in that namespace are visible +-in the PID namespace of the process that created the new namespace; +-analogously, if the parent PID namespace is itself +-the child of another PID namespace, +-then processes in the child and parent PID namespaces will both be +-visible in the grandparent PID namespace. +-Conversely, the processes in the "child" PID namespace do not see +-the processes in the parent namespace. +-The existence of a namespace hierarchy means that each process +-may now have multiple PIDs: +-one for each namespace in which it is visible; +-each of these PIDs is unique within the corresponding namespace. +-(A call to +-.BR getpid (2) +-always returns the PID associated with the namespace in which +-the process lives.) +- +-After creating the new namespace, +-it is useful for the child to change its root directory +-and mount a new procfs instance at +-.I /proc +-so that tools such as +-.BR ps (1) +-work correctly. +-.\" mount -t proc proc /proc +-(If +-.BR CLONE_NEWNS +-is also included in +-.IR flags , +-then it isn't necessary to change the root directory: +-a new procfs instance can be mounted directly over +-.IR /proc .) ++If ++.B CLONE_NEWUSER ++is set, then create the process in a new user namespace. ++If this flag is not set, then (as with ++.BR fork (2)) ++the process is created in the same user namespace as the calling process. ++ ++For further information on user namespaces, see ++.BR namespaces (7) ++and ++.BR user_namespaces (7) ++ ++Before Linux 3.8, use of ++.BR CLONE_NEWUSER ++required that the caller have three capabilities: ++.BR CAP_SYS_ADMIN , ++.BR CAP_SETUID , ++and ++.BR CAP_SETGID . ++.\" Before Linux 2.6.29, it appears that only CAP_SYS_ADMIN was needed ++Starting with Linux 3.8, ++no privileges are needed to create a user namespace. + +-Use of this flag requires: a kernel configured with the +-.B CONFIG_PID_NS +-option and that the process be privileged +-.RB ( CAP_SYS_ADMIN ). + This flag can't be specified in conjunction with +-.BR CLONE_THREAD . ++.BR CLONE_THREAD ++or ++.BR CLONE_PARENT . ++For security reasons, ++.\" commit e66eded8309ebf679d3d3c1f5820d1f2ca332c71 ++.\" https://lwn.net/Articles/543273/ ++.\" The fix actually went into 3.9 and into 3.8.3. However, user namespaces ++.\" were, for practical purposes, unusable in earlier 3.8.x because of the ++.\" various filesystems that didn't support userns. ++.BR CLONE_NEWUSER ++cannot be specified in conjunction with ++.BR CLONE_FS . ++ ++For further information on user namespaces, see ++.BR user_namespaces (7). + .TP + .BR CLONE_NEWUTS " (since Linux 2.6.19)" + If +@@ -486,27 +454,29 @@ is set, then create the process in a new UTS namespace, + whose identifiers are initialized by duplicating the identifiers + from the UTS namespace of the calling process. + If this flag is not set, then (as with +-.BR fork (2)), ++.BR fork (2)) + the process is created in the same UTS namespace as + the calling process. + This flag is intended for the implementation of containers. + + A UTS namespace is the set of identifiers returned by + .BR uname (2); +-among these, the domain name and the host name can be modified by ++among these, the domain name and the hostname can be modified by + .BR setdomainname (2) + and +-.BR + .BR sethostname (2), + respectively. + Changes made to the identifiers in a UTS namespace + are visible to all other processes in the same namespace, + but are not visible to processes in other UTS namespaces. + +-Use of this flag requires: a kernel configured with the +-.B CONFIG_UTS_NS +-option and that the process be privileged +-.RB ( CAP_SYS_ADMIN ). ++Only a privileged process ++.RB ( CAP_SYS_ADMIN ) ++can employ ++.BR CLONE_NEWUTS . ++ ++For further information on UTS namespaces, see ++.BR namespaces (7). + .TP + .BR CLONE_PARENT " (since Linux 2.3.12)" + If +@@ -530,12 +500,15 @@ is set, then the parent of the calling process, rather than the + calling process itself, will be signaled. + .TP + .BR CLONE_PARENT_SETTID " (since Linux 2.5.49)" +-Store child thread ID at location ++Store the child thread ID at the location + .I ptid +-in parent and child memory. ++in the parent's memory. + (In Linux 2.5.32-2.5.48 there was a flag + .B CLONE_SETTID + that did this.) ++The store operation completes before ++.BR clone () ++returns control to user space. + .TP + .BR CLONE_PID " (obsolete)" + If +@@ -547,6 +520,7 @@ of not much use. + Since 2.3.21 this flag can be + specified only by the system boot process (PID 0). + It disappeared in Linux 2.5.16. ++Since then, the kernel silently ignores it without error. + .TP + .BR CLONE_PTRACE " (since Linux 2.2)" + If +@@ -556,11 +530,25 @@ then trace the child also (see + .BR ptrace (2)). + .TP + .BR CLONE_SETTLS " (since Linux 2.5.32)" +-The ++The TLS (Thread Local Storage) descriptor is set to ++.I newtls. ++ ++The interpretation of + .I newtls +-argument is the new TLS (Thread Local Storage) descriptor. ++and the resulting effect is architecture dependent. ++On x86, ++.I newtls ++is interpreted as a ++.IR "struct user_desc *" + (See +-.BR set_thread_area (2).) ++.BR set_thread_area (2)). ++On x86_64 it is the new value to be set for the %fs base register ++(See the ++.I ARCH_SET_FS ++argument to ++.BR arch_prctl (2)). ++On architectures with a dedicated TLS register, it is the new value ++of that register. + .TP + .BR CLONE_SIGHAND " (since Linux 2.0)" + If +@@ -612,16 +600,26 @@ from Linux 2.6.25 onward, + and was + .I removed + altogether in Linux 2.6.38. ++Since then, the kernel silently ignores it without error. + .\" glibc 2.8 removed this defn from bits/sched.h + .TP + .BR CLONE_SYSVSEM " (since Linux 2.5.10)" + If + .B CLONE_SYSVSEM + is set, then the child and the calling process share +-a single list of System V semaphore undo values (see ++a single list of System V semaphore adjustment ++.RI ( semadj ) ++values (see + .BR semop (2)). +-If this flag is not set, then the child has a separate undo list, +-which is initially empty. ++In this case, the shared list accumulates ++.I semadj ++values across all processes sharing the list, ++and semaphore adjustments are performed only when the last process ++that is sharing the list terminates (or ceases sharing the list using ++.BR unshare (2)). ++If this flag is not set, then the child has a separate ++.I semadj ++list that is initially empty. + .TP + .BR CLONE_THREAD " (since Linux 2.4.0-test8)" + If +@@ -703,7 +701,12 @@ must also include + .B CLONE_SIGHAND + if + .B CLONE_THREAD +-is specified. ++is specified ++(and note that, since Linux 2.6.0-test6, ++.BR CLONE_SIGHAND ++also requires ++.BR CLONE_VM ++to be included). + + Signals may be sent to a thread group as a whole (i.e., a TGID) using + .BR kill (2), +@@ -761,7 +764,7 @@ or + + If + .B CLONE_VFORK +-is not set then both the calling process and the child are schedulable ++is not set, then both the calling process and the child are schedulable + after the call, and an application should not rely on execution occurring + in any particular order. + .TP +@@ -786,7 +789,7 @@ space of the calling process at the time of + Memory writes or file mappings/unmappings performed by one of the + processes do not affect the other, as with + .BR fork (2). +-.SS The raw system call interface ++.SS C library/kernel differences + The raw + .BR clone () + system call corresponds more closely to +@@ -801,16 +804,58 @@ arguments of the + .BR clone () + wrapper function are omitted. + Furthermore, the argument order changes. +-The raw system call interface on x86 and many other architectures is roughly: ++In addition, there are variations across architectures. ++ ++The raw system call interface on x86-64 and some other architectures ++(including sh, tile, and alpha) is roughly: ++ + .in +4 + .nf ++.BI "long clone(unsigned long " flags ", void *" child_stack , ++.BI " int *" ptid ", int *" ctid , ++.BI " unsigned long " newtls ); ++.fi ++.in ++ ++On x86-32, and several other common architectures ++(including score, ARM, ARM 64, PA-RISC, arc, Power PC, xtensa, ++and MIPS), ++.\" CONFIG_CLONE_BACKWARDS ++the order of the last two arguments is reversed: + ++.in +4 ++.nf + .BI "long clone(unsigned long " flags ", void *" child_stack , +-.BI " void *" ptid ", void *" ctid , +-.BI " struct pt_regs *" regs ); ++.BI " int *" ptid ", unsigned long " newtls , ++.BI " int *" ctid ); ++.fi ++.in ++ ++On the cris and s390 architectures, ++.\" CONFIG_CLONE_BACKWARDS2 ++the order of the first two arguments is reversed: + ++.in +4 ++.nf ++.BI "long clone(void *" child_stack ", unsigned long " flags , ++.BI " int *" ptid ", int *" ctid , ++.BI " unsigned long " newtls ); ++.fi ++.in ++ ++On the microblaze architecture, ++.\" CONFIG_CLONE_BACKWARDS3 ++an additional argument is supplied: ++ ++.in +4 ++.nf ++.BI "long clone(unsigned long " flags ", void *" child_stack , ++.BI " int " stack_size , "\fR /* Size of stack */" ++.BI " int *" ptid ", int *" ctid , ++.BI " unsigned long " newtls ); + .fi + .in ++ + Another difference for the raw system call is that the + .I child_stack + argument may be zero, in which case copy-on-write semantics ensure that the +@@ -819,17 +864,13 @@ the stack. + In this case, for correct operation, the + .B CLONE_VM + option should not be specified. +- +-For some architectures, the order of the arguments for the system call +-differs from that shown above. +-On the score, microblaze, ARM, ARM 64, PA-RISC, arc, Power PC, xtensa, +-and MIPS architectures, +-the order of the fourth and fifth arguments is reversed. +-On the cris and s390 architectures, +-the order of the first and second arguments is reversed. ++.\" + .SS blackfin, m68k, and sparc ++.\" Mike Frysinger noted in a 2013 mail: ++.\" these arches don't define __ARCH_WANT_SYS_CLONE: ++.\" blackfin ia64 m68k sparc + The argument-passing conventions on +-blackfin, m68k, and sparc are different from descriptions above. ++blackfin, m68k, and sparc are different from the descriptions above. + For details, see the kernel (and glibc) source. + .SS ia64 + On ia64, a different interface is used: +@@ -883,7 +924,8 @@ will be set appropriately. + .SH ERRORS + .TP + .B EAGAIN +-Too many processes are already running. ++Too many processes are already running; see ++.BR fork (2). + .TP + .B EINVAL + .B CLONE_SIGHAND +@@ -908,6 +950,7 @@ was not. + .\" (Since Linux 2.6.0-test6.) + .TP + .B EINVAL ++.\" commit e66eded8309ebf679d3d3c1f5820d1f2ca332c71 + Both + .B CLONE_FS + and +@@ -915,6 +958,14 @@ and + were specified in + .IR flags . + .TP ++.BR EINVAL " (since Linux 3.9)" ++Both ++.B CLONE_NEWUSER ++and ++.B CLONE_FS ++were specified in ++.IR flags . ++.TP + .B EINVAL + Both + .B CLONE_NEWIPC +@@ -924,18 +975,25 @@ were specified in + .IR flags . + .TP + .B EINVAL +-Both ++One (or both) of + .BR CLONE_NEWPID +-and ++or ++.BR CLONE_NEWUSER ++and one (or both) of + .BR CLONE_THREAD ++or ++.BR CLONE_PARENT + were specified in + .IR flags . + .TP + .B EINVAL +-Returned by ++Returned by the glibc + .BR clone () +-when a zero value is specified for +-.IR child_stack . ++wrapper function when ++.IR fn ++or ++.IR child_stack ++is specified as NULL. + .TP + .B EINVAL + .BR CLONE_NEWIPC +@@ -971,11 +1029,48 @@ but the kernel was not configured with the + .B CONFIG_UTS + option. + .TP ++.B EINVAL ++.I child_stack ++is not aligned to a suitable boundary for this architecture. ++For example, on aarch64, ++.I child_stack ++must be a multiple of 16. ++.TP + .B ENOMEM + Cannot allocate sufficient memory to allocate a task structure for the + child, or to copy those parts of the caller's context that need to be + copied. + .TP ++.BR ENOSPC " (since Linux 3.7)" ++.\" commit f2302505775fd13ba93f034206f1e2a587017929 ++.B CLONE_NEWPID ++was specified in flags, ++but the limit on the nesting depth of PID namespaces ++would have been exceeded; see ++.BR pid_namespaces (7). ++.TP ++.BR ENOSPC " (since Linux 4.9; beforehand " EUSERS ) ++.B CLONE_NEWUSER ++was specified in ++.IR flags , ++and the call would cause the limit on the number of ++nested user namespaces to be exceeded. ++See ++.BR user_namespaces (7). ++ ++From Linux 3.11 to Linux 4.8, the error diagnosed in this case was ++.BR EUSERS . ++.TP ++.BR ENOSPC " (since Linux 4.9)" ++One of the values in ++.I flags ++specified the creation of a new user namespace, ++but doing so would have caused the limit defined by the corresponding file in ++.IR /proc/sys/user ++to be exceeded. ++For further details, see ++.BR namespaces (7). ++.TP + .B EPERM + .BR CLONE_NEWIPC , + .BR CLONE_NEWNET , +@@ -989,22 +1084,62 @@ was specified by an unprivileged process (process without \fBCAP_SYS_ADMIN\fP). + .B CLONE_PID + was specified by a process other than process 0. + .TP ++.B EPERM ++.BR CLONE_NEWUSER ++was specified in ++.IR flags , ++but either the effective user ID or the effective group ID of the caller ++does not have a mapping in the parent namespace (see ++.BR user_namespaces (7)). ++.TP ++.BR EPERM " (since Linux 3.9)" ++.\" commit 3151527ee007b73a0ebd296010f1c0454a919c7d ++.B CLONE_NEWUSER ++was specified in ++.I flags ++and the caller is in a chroot environment ++.\" FIXME What is the rationale for this restriction? ++(i.e., the caller's root directory does not match the root directory ++of the mount namespace in which it resides). ++.TP + .BR ERESTARTNOINTR " (since Linux 2.6.17)" ++.\" commit 4a2c7a7837da1b91468e50426066d988050e4d56 + System call was interrupted by a signal and will be restarted. + (This can be seen only during a trace.) +-.SH VERSIONS +-There is no entry for +-.BR clone () +-in libc5. +-glibc2 provides +-.BR clone () +-as described in this manual page. ++.TP ++.BR EUSERS " (Linux 3.11 to Linux 4.8)" ++.B CLONE_NEWUSER ++was specified in ++.IR flags , ++and the limit on the number of nested user namespaces would be exceeded. ++See the discussion of the ++.BR ENOSPC ++error above. ++.\" .SH VERSIONS ++.\" There is no entry for ++.\" .BR clone () ++.\" in libc5. ++.\" glibc2 provides ++.\" .BR clone () ++.\" as described in this manual page. + .SH CONFORMING TO + .BR clone () + is Linux-specific and should not be used in programs + intended to be portable. + .SH NOTES +-In the kernel 2.4.x series, ++The ++.BR kcmp (2) ++system call can be used to test whether two processes share various ++resources such as a file descriptor table, ++System V semaphore undo operations, or a virtual address space. ++ ++ ++Handlers registered using ++.BR pthread_atfork (3) ++are not executed during a call to ++.BR clone (). ++ ++In the Linux 2.4.x series, + .B CLONE_THREAD + generally does not make the parent of the new thread the same + as the parent of the calling process. +@@ -1012,14 +1147,13 @@ However, for kernel versions 2.4.7 to 2.4.18 the + .B CLONE_THREAD + flag implied the + .B CLONE_PARENT +-flag (as in kernel 2.6). ++flag (as in Linux 2.6.0 and later). + + For a while there was + .B CLONE_DETACHED + (introduced in 2.5.32): + parent wants no child-exit signal. +-In 2.6.2 the need to give this +-together with ++In Linux 2.6.2, the need to give this flag together with + .B CLONE_THREAD + disappeared. + This flag is still defined, but has no effect. +@@ -1071,7 +1205,6 @@ To get the truth, it may be necessary to use code such as the following: + .\" https://bugzilla.redhat.com/show_bug.cgi?id=417521 + .\" http://sourceware.org/bugzilla/show_bug.cgi?id=6910 + .SH EXAMPLE +-.SS Create a child that executes in a separate UTS namespace + The following program demonstrates the use of + .BR clone () + to create a child process that executes in a separate UTS namespace. +@@ -1081,7 +1214,7 @@ making it possible to see that the hostname + differs in the UTS namespaces of the parent and child. + For an example of the use of this program, see + .BR setns (2). +- ++.SS Program source + .nf + #define _GNU_SOURCE + #include +@@ -1181,6 +1314,7 @@ main(int argc, char *argv[]) + .BR unshare (2), + .BR wait (2), + .BR capabilities (7), ++.BR namespaces (7), + .BR pthreads (7) + .SH COLOPHON + This page is part of release 3.53 of the Linux +-- +2.7.4 + diff --git a/SOURCES/1452424-mpo-7.4.2-stat.2.patch b/SOURCES/1452424-mpo-7.4.2-stat.2.patch new file mode 100644 index 0000000..32d73c1 --- /dev/null +++ b/SOURCES/1452424-mpo-7.4.2-stat.2.patch @@ -0,0 +1,1044 @@ +From f14d3a310dbaf5456e5267ee56d2b35a78ec540b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Nikola=20Forr=C3=B3?= +Date: Mon, 22 May 2017 14:54:07 +0200 +Subject: [PATCH 2/2] stat.2: update to cover latest things used in RHEL 7 + +--- + man-pages/man2/stat.2 | 760 +++++++++++++++++++++++++++++++++++--------------- + 1 file changed, 540 insertions(+), 220 deletions(-) + +diff --git a/man-pages/man2/stat.2 b/man-pages/man2/stat.2 +index c86ebc0..f108020 100644 +--- a/man-pages/man2/stat.2 ++++ b/man-pages/man2/stat.2 +@@ -1,7 +1,7 @@ + '\" t + .\" Copyright (c) 1992 Drew Eckhardt (drew@cs.colorado.edu), March 28, 1992 + .\" Parts Copyright (c) 1995 Nicolai Langfeldt (janl@ifi.uio.no), 1/1/95 +-.\" and Copyright (c) 2007 Michael Kerrisk ++.\" and Copyright (c) 2006, 2007, 2014 Michael Kerrisk + .\" + .\" %%%LICENSE_START(VERBATIM) + .\" Permission is granted to make and distribute verbatim copies of this +@@ -37,21 +37,30 @@ + .\" 2007-06-08 mtk: Added example program + .\" 2007-07-05 mtk: Added details on underlying system call interfaces + .\" +-.TH STAT 2 2012-11-11 "Linux" "Linux Programmer's Manual" ++.TH STAT 2 2017-03-13 "Linux" "Linux Programmer's Manual" + .SH NAME +-stat, fstat, lstat \- get file status ++stat, fstat, lstat, fstatat \- get file status + .SH SYNOPSIS ++.nf + .B #include + .br + .B #include + .br + .B #include + .sp +-.BI "int stat(const char *" path ", struct stat *" buf ); ++.BI "int stat(const char *" pathname ", struct stat *" buf ); + .br + .BI "int fstat(int " fd ", struct stat *" buf ); + .br +-.BI "int lstat(const char *" path ", struct stat *" buf ); ++.BI "int lstat(const char *" pathname ", struct stat *" buf ); ++.sp ++.BR "#include " "/* Definition of AT_* constants */" ++.B #include ++.sp ++.BI "int fstatat(int " dirfd ", const char *" pathname ", struct stat *" \ ++buf , ++.BI " int " flags ); ++.fi + .sp + .in -4n + Feature Test Macro Requirements for glibc (see +@@ -62,45 +71,67 @@ Feature Test Macro Requirements for glibc (see + .sp + .BR lstat (): + .RS 4 +-_BSD_SOURCE || _XOPEN_SOURCE\ >=\ 500 || +-_XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED ++/* glibc 2.19 and earlier */ _BSD_SOURCE ++.br ++ || /* Since glibc 2.20 */ _DEFAULT_SOURCE + .br +-|| /* Since glibc 2.10: */ _POSIX_C_SOURCE\ >=\ 200112L ++ || _XOPEN_SOURCE\ >=\ 500 ++.\" _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED ++.br ++ || /* Since glibc 2.10: */ _POSIX_C_SOURCE\ >=\ 200112L ++.RE ++.sp ++.BR fstatat (): ++.PD 0 ++.ad l ++.RS 4 ++.TP 4 ++Since glibc 2.10: ++_POSIX_C_SOURCE\ >=\ 200809L ++.TP ++Before glibc 2.10: ++_ATFILE_SOURCE + .RE + .PD + .ad + .SH DESCRIPTION + .PP +-These functions return information about a file. ++These functions return information about a file, in the buffer pointed to by ++.IR buf . + No permissions are required on the file itself, but\(emin the case of +-.BR stat () ++.BR stat (), ++.BR fstatat (), + and +-.BR lstat () +-\(em +-execute (search) permission is required on all of the directories in +-.I path ++.BR lstat ()\(emexecute ++(search) permission is required on all of the directories in ++.I pathname + that lead to the file. + .PP + .BR stat () +-stats the file pointed to by +-.I path +-and fills in +-.IR buf . ++and ++.BR fstatat () ++retrieve information about the file pointed to by ++.IR pathname ; ++the differences for ++.BR fstatat () ++are described below. + + .BR lstat () + is identical to + .BR stat (), + except that if +-.I path +-is a symbolic link, then the link itself is stat-ed, ++.I pathname ++is a symbolic link, then it returns information about the link itself, + not the file that it refers to. + + .BR fstat () + is identical to + .BR stat (), +-except that the file to be stat-ed is specified by the file descriptor ++except that the file about which information is to be retrieved ++is specified by the file descriptor + .IR fd . +-.PP ++.\" ++.SS The stat structure + All of these system calls return a + .I stat + structure, which contains the following fields: +@@ -108,84 +139,123 @@ structure, which contains the following fields: + .in +4n + .nf + struct stat { +- dev_t st_dev; /* ID of device containing file */ +- ino_t st_ino; /* inode number */ +- mode_t st_mode; /* protection */ +- nlink_t st_nlink; /* number of hard links */ +- uid_t st_uid; /* user ID of owner */ +- gid_t st_gid; /* group ID of owner */ +- dev_t st_rdev; /* device ID (if special file) */ +- off_t st_size; /* total size, in bytes */ +- blksize_t st_blksize; /* blocksize for file system I/O */ +- blkcnt_t st_blocks; /* number of 512B blocks allocated */ +- time_t st_atime; /* time of last access */ +- time_t st_mtime; /* time of last modification */ +- time_t st_ctime; /* time of last status change */ ++ dev_t st_dev; /* ID of device containing file */ ++ ino_t st_ino; /* inode number */ ++ mode_t st_mode; /* file type and mode */ ++ nlink_t st_nlink; /* number of hard links */ ++ uid_t st_uid; /* user ID of owner */ ++ gid_t st_gid; /* group ID of owner */ ++ dev_t st_rdev; /* device ID (if special file) */ ++ off_t st_size; /* total size, in bytes */ ++ blksize_t st_blksize; /* blocksize for filesystem I/O */ ++ blkcnt_t st_blocks; /* number of 512B blocks allocated */ ++ ++ /* Since Linux 2.6, the kernel supports nanosecond ++ precision for the following timestamp fields. ++ For the details before Linux 2.6, see NOTES. */ ++ ++ struct timespec st_atim; /* time of last access */ ++ struct timespec st_mtim; /* time of last modification */ ++ struct timespec st_ctim; /* time of last status change */ ++ ++#define st_atime st_atim.tv_sec /* Backward compatibility */ ++#define st_mtime st_mtim.tv_sec ++#define st_ctime st_ctim.tv_sec + }; + .fi + .in +-.PP +-The ++ ++.IR Note : ++the order of fields in the ++.I stat ++structure varies somewhat ++across architectures. ++In addition, ++the definition above does not show the padding bytes ++that may be present between some fields on various architectures. ++Consult the glibc and kernel source code ++if you need to know the details. ++ ++.\" Background: inode attributes are modified with i_mutex held, but ++.\" read by stat() without taking the mutex. ++.IR Note : ++For performance and simplicity reasons, different fields in the ++.I stat ++structure may contain state information from different moments ++during the execution of the system call. ++For example, if ++.IR st_mode ++or ++.IR st_uid ++is changed by another process by calling ++.BR chmod (2) ++or ++.BR chown (2), ++.BR stat () ++might return the old ++.I st_mode ++together with the new ++.IR st_uid , ++or the old ++.I st_uid ++together with the new ++.IR st_mode . ++ ++The fields in the ++.I stat ++structure are as follows: ++.TP + .I st_dev +-field describes the device on which this file resides. ++This field describes the device on which this file resides. + (The + .BR major (3) + and + .BR minor (3) + macros may be useful to decompose the device ID in this field.) +- +-The ++.TP ++.I st_ino ++This field contains the file's inode number. ++.TP ++.I st_mode ++See the discussion of file type and mode, below. ++.TP ++.I st_nlink ++This field contains the number of hard links to the file. ++.TP ++.I st_uid ++This field contains the user ID of the owner of the file. ++.TP ++.I st_gid ++This field contains the ID of the group owner of the file. ++.TP + .I st_rdev +-field describes the device that this file (inode) represents. +- +-The ++This field describes the device that this file (inode) represents. ++.TP + .I st_size +-field gives the size of the file (if it is a regular ++This field gives the size of the file (if it is a regular + file or a symbolic link) in bytes. + The size of a symbolic link is the length of the pathname + it contains, without a terminating null byte. +- +-The ++.TP ++.I st_blksize ++This field gives the "preferred" blocksize for efficient filesystem I/O. ++(Writing to a file in smaller chunks may cause ++an inefficient read-modify-rewrite.) ++.TP + .I st_blocks +-field indicates the number of blocks allocated to the file, 512-byte units. ++This field indicates the number of blocks allocated to the file, ++512-byte units. + (This may be smaller than + .IR st_size /512 + when the file has holes.) +- +-The +-.I st_blksize +-field gives the "preferred" blocksize for efficient file system I/O. +-(Writing to a file in smaller chunks may cause +-an inefficient read-modify-rewrite.) +-.PP +-Not all of the Linux file systems implement all of the time fields. +-Some file system types allow mounting in such a way that file +-and/or directory accesses do not cause an update of the +-.I st_atime +-field. +-(See +-.IR noatime , +-.IR nodiratime , +-and +-.I relatime +-in +-.BR mount (8), +-and related information in +-.BR mount (2).) +-In addition, +-.I st_atime +-is not updated if a file is opened with the +-.BR O_NOATIME ; +-see +-.BR open (2). +- +-The field ++.TP + .I st_atime +-is changed by file accesses, for example, by ++This is the file's last access timestamp. ++It is changed by file accesses, for example, by + .BR execve (2), + .BR mknod (2), + .BR pipe (2), +-.BR utime (2) ++.BR utime (2), + and + .BR read (2) + (of more than zero bytes). +@@ -193,13 +263,13 @@ Other routines, like + .BR mmap (2), + may or may not update + .IR st_atime . +- +-The field ++.TP + .I st_mtime +-is changed by file modifications, for example, by ++This is the file's last modification timestamp. ++It is changed by file modifications, for example, by + .BR mknod (2), + .BR truncate (2), +-.BR utime (2) ++.BR utime (2), + and + .BR write (2) + (of more than zero bytes). +@@ -212,15 +282,78 @@ The + field is + .I not + changed for changes in owner, group, hard link count, or mode. +- +-The field ++.TP + .I st_ctime +-is changed by writing or by setting inode information ++This is the file's last status change timestamp. ++It is changed by writing or by setting inode information + (i.e., owner, group, link count, mode, etc.). + .PP +-The following POSIX macros are defined to check the file type using the ++Not all of the Linux filesystems implement all of the time fields. ++Some filesystem types allow mounting in such a way that file ++and/or directory accesses do not cause an update of the ++.I st_atime ++field. ++(See ++.IR noatime , ++.IR nodiratime , ++and ++.I relatime ++in ++.BR mount (8), ++and related information in ++.BR mount (2).) ++In addition, ++.I st_atime ++is not updated if a file is opened with the ++.BR O_NOATIME ++flag; see ++.BR open (2). ++.\" ++.SS The file type and mode (st_mode) ++POSIX refers to the ++.I st_mode ++bits corresponding to the mask ++.B S_IFMT ++(see below) as the ++.IR "file type" , ++the 12 bits corresponding to the mask 07777 as the ++.IR "file mode bits" ++and the least significant 9 bits (0777) as the ++.IR "file permission bits" . ++.PP ++The following mask values are defined for the file type of the + .I st_mode + field: ++.in +4n ++.TS ++lB l l. ++S_IFMT 0170000 bit mask for the file type bit field ++ ++S_IFSOCK 0140000 socket ++S_IFLNK 0120000 symbolic link ++S_IFREG 0100000 regular file ++S_IFBLK 0060000 block device ++S_IFDIR 0040000 directory ++S_IFCHR 0020000 character device ++S_IFIFO 0010000 FIFO ++.TE ++.in ++.PP ++Thus, to test for a regular file (for example), one could write: ++ ++.nf ++.in +4n ++stat(pathname, &sb); ++if ((sb.st_mode & S_IFMT) == S_IFREG) { ++ /* Handle regular file */ ++} ++.in ++.fi ++.PP ++Because tests of the above form are common, additional ++macros are defined by POSIX to allow the test of the file type in ++.I st_mode ++to be written more concisely: + .RS 4 + .TP 1.2i + .BR S_ISREG (m) +@@ -245,42 +378,85 @@ symbolic link? (Not in POSIX.1-1996.) + socket? (Not in POSIX.1-1996.) + .RE + .PP +-The following flags are defined for the ++The preceding code snippet could thus be rewritten as: ++ ++.nf ++.in +4n ++stat(pathname, &sb); ++if (S_ISREG(sb.st_mode)) { ++ /* Handle regular file */ ++} ++.in ++.fi ++.PP ++The definitions of most of the above file type test macros ++are provided if any of the following feature test macros is defined: ++.BR _BSD_SOURCE ++(in glibc 2.19 and earlier), ++.BR _SVID_SOURCE ++(in glibc 2.19 and earlier), ++or ++.BR _DEFAULT_SOURCE ++(in glibc 2.20 and later). ++In addition, definitions of all of the above macros except ++.BR S_IFSOCK ++and ++.BR S_ISSOCK () ++are provided if ++.BR _XOPEN_SOURCE ++is defined. ++The definition of ++.BR S_IFSOCK ++can also be exposed by defining ++.BR _XOPEN_SOURCE ++with a value of 500 or greater. ++ ++The definition of ++.BR S_ISSOCK () ++is exposed if any of the following feature test macros is defined: ++.BR _BSD_SOURCE ++(in glibc 2.19 and earlier), ++.BR _DEFAULT_SOURCE ++(in glibc 2.20 and later), ++.BR _XOPEN_SOURCE ++with a value of 500 or greater, or ++.BR _POSIX_C_SOURCE ++with a value of 200112L or greater. ++.PP ++The following mask values are defined for ++the file mode component of the + .I st_mode + field: + .in +4n + .TS + lB l l. +-S_IFMT 0170000 bit mask for the file type bit fields +-S_IFSOCK 0140000 socket +-S_IFLNK 0120000 symbolic link +-S_IFREG 0100000 regular file +-S_IFBLK 0060000 block device +-S_IFDIR 0040000 directory +-S_IFCHR 0020000 character device +-S_IFIFO 0010000 FIFO +-S_ISUID 0004000 set-user-ID bit +-S_ISGID 0002000 set-group-ID bit (see below) +-S_ISVTX 0001000 sticky bit (see below) +-S_IRWXU 00700 mask for file owner permissions +-S_IRUSR 00400 owner has read permission +-S_IWUSR 00200 owner has write permission +-S_IXUSR 00100 owner has execute permission +-S_IRWXG 00070 mask for group permissions +-S_IRGRP 00040 group has read permission +-S_IWGRP 00020 group has write permission +-S_IXGRP 00010 group has execute permission +-S_IRWXO 00007 mask for permissions for others (not in group) +-S_IROTH 00004 others have read permission +-S_IWOTH 00002 others have write permission +-S_IXOTH 00001 others have execute permission ++S_ISUID 04000 set-user-ID bit ++S_ISGID 02000 set-group-ID bit (see below) ++S_ISVTX 01000 sticky bit (see below) ++ ++S_IRWXU 00700 owner has read, write, and execute permission ++S_IRUSR 00400 owner has read permission ++S_IWUSR 00200 owner has write permission ++S_IXUSR 00100 owner has execute permission ++ ++S_IRWXG 00070 group has read, write, and execute permission ++S_IRGRP 00040 group has read permission ++S_IWGRP 00020 group has write permission ++S_IXGRP 00010 group has execute permission ++ ++S_IRWXO 00007 T{ ++others (not in group) have read, write, and execute permission ++T} ++S_IROTH 00004 others have read permission ++S_IWOTH 00002 others have write permission ++S_IXOTH 00001 others have execute permission + .TE + .in + .P + The set-group-ID bit + .RB ( S_ISGID ) + has several special uses. +-For a directory it indicates that BSD semantics is to be used ++For a directory, it indicates that BSD semantics is to be used + for that directory: files created there inherit their group ID from + the directory, not from the effective group ID of the creating process, + and directories created there will also get the +@@ -297,6 +473,100 @@ on a directory means that a file + in that directory can be renamed or deleted only by the owner + of the file, by the owner of the directory, and by a privileged + process. ++.\" ++.\" ++.SS fstatat() ++The ++.BR fstatat () ++system call operates in exactly the same way as ++.BR stat (), ++except for the differences described here. ++ ++If the pathname given in ++.I pathname ++is relative, then it is interpreted relative to the directory ++referred to by the file descriptor ++.I dirfd ++(rather than relative to the current working directory of ++the calling process, as is done by ++.BR stat () ++for a relative pathname). ++ ++If ++.I pathname ++is relative and ++.I dirfd ++is the special value ++.BR AT_FDCWD , ++then ++.I pathname ++is interpreted relative to the current working ++directory of the calling process (like ++.BR stat ()). ++ ++If ++.I pathname ++is absolute, then ++.I dirfd ++is ignored. ++ ++.I flags ++can either be 0, or include one or more of the following flags ORed: ++.TP ++.BR AT_EMPTY_PATH " (since Linux 2.6.39)" ++.\" commit 65cfc6722361570bfe255698d9cd4dccaf47570d ++If ++.I pathname ++is an empty string, operate on the file referred to by ++.IR dirfd ++(which may have been obtained using the ++.BR open (2) ++.B O_PATH ++flag). ++In this case, ++.I dirfd ++can refer to any type of file, not just a directory. ++If ++.I dirfd ++is ++.BR AT_FDCWD , ++the call operates on the current working directory. ++This flag is Linux-specific; define ++.B _GNU_SOURCE ++.\" Before glibc 2.16, defining _ATFILE_SOURCE sufficed ++to obtain its definition. ++.TP ++.BR AT_NO_AUTOMOUNT " (since Linux 2.6.38)" ++Don't automount the terminal ("basename") component of ++.I pathname ++if it is a directory that is an automount point. ++This allows the caller to gather attributes of an automount point ++(rather than the location it would mount). ++This flag can be used in tools that scan directories ++to prevent mass-automounting of a directory of automount points. ++The ++.B AT_NO_AUTOMOUNT ++flag has no effect if the mount point has already been mounted over. ++This flag is Linux-specific; define ++.B _GNU_SOURCE ++.\" Before glibc 2.16, defining _ATFILE_SOURCE sufficed ++to obtain its definition. ++.TP ++.B AT_SYMLINK_NOFOLLOW ++If ++.I pathname ++is a symbolic link, do not dereference it: ++instead return information about the link itself, like ++.BR lstat (). ++(By default, ++.BR fstatat () ++dereferences symbolic links, like ++.BR stat ().) ++.PP ++See ++.BR openat (2) ++for an explanation of the need for ++.BR fstatat (). + .SH RETURN VALUE + On success, zero is returned. + On error, \-1 is returned, and +@@ -307,13 +577,13 @@ is set appropriately. + .B EACCES + Search permission is denied for one of the directories + in the path prefix of +-.IR path . ++.IR pathname . + (See also + .BR path_resolution (7).) + .TP + .B EBADF + .I fd +-is bad. ++is not a valid open file descriptor. + .TP + .B EFAULT + Bad address. +@@ -322,26 +592,26 @@ Bad address. + Too many symbolic links encountered while traversing the path. + .TP + .B ENAMETOOLONG +-.I path ++.I pathname + is too long. + .TP + .B ENOENT + A component of +-.I path ++.I pathname + does not exist, or +-.I path +-is an empty string. ++.I pathname ++is an empty string and AT_EMPTY_PATH was not specified. + .TP + .B ENOMEM + Out of memory (i.e., kernel memory). + .TP + .B ENOTDIR + A component of the path prefix of +-.I path ++.I pathname + is not a directory. + .TP + .B EOVERFLOW +-.I path ++.I pathname + or + .I fd + refers to a file whose size, inode number, +@@ -358,8 +628,32 @@ calls + on a file whose size exceeds + .I (1<<31)-1 + bytes. ++.PP ++The following additional errors can occur for ++.BR fstatat (): ++.TP ++.B EBADF ++.I dirfd ++is not a valid file descriptor. ++.TP ++.B EINVAL ++Invalid flag specified in ++.IR flags . ++.TP ++.B ENOTDIR ++.I pathname ++is relative and ++.I dirfd ++is a file descriptor referring to a file other than a directory. ++.SH VERSIONS ++.BR fstatat () ++was added to Linux in kernel 2.6.16; ++library support was added to glibc in version 2.4. + .SH CONFORMING TO +-These system calls conform to SVr4, 4.3BSD, POSIX.1-2001. ++.BR stat (), ++.BR fstat (), ++.BR lstat (): ++SVr4, 4.3BSD, POSIX.1-2001, POSIX.1.2008. + .\" SVr4 documents additional + .\" .BR fstat () + .\" error conditions EINTR, ENOLINK, and EOVERFLOW. SVr4 +@@ -369,18 +663,21 @@ These system calls conform to SVr4, 4.3BSD, POSIX.1-2001. + .\" .BR lstat () + .\" error conditions EINTR, EMULTIHOP, ENOLINK, and EOVERFLOW. + ++.BR fstatat (): ++POSIX.1-2008. ++ + According to POSIX.1-2001, + .BR lstat () + on a symbolic link need return valid information only in the + .I st_size +-field and the file-type component of the ++field and the file type of the + .IR st_mode + field of the + .IR stat + structure. +-POSIX.-2008 tightens the specification, requiring ++POSIX.1-2008 tightens the specification, requiring + .BR lstat () +-to return valid information in all fields except the permission bits in ++to return valid information in all fields except the mode bits in + .IR st_mode . + + Use of the +@@ -413,10 +710,10 @@ POSIX.1-1990 did not describe the + .BR S_IFCHR , + .BR S_IFIFO , + .B S_ISVTX +-constants, but instead demanded the use of ++constants, but instead specified the use of + the macros + .BR S_ISDIR (), +-etc. ++and so on. + The + .BR S_IF* + constants are present in POSIX.1-2001 and later. +@@ -425,11 +722,11 @@ The + .BR S_ISLNK () + and + .BR S_ISSOCK () +-macros are not in ++macros were not in + POSIX.1-1996, but both are present in POSIX.1-2001; + the former is from SVID 4, the latter from SUSv2. + .LP +-UNIX V7 (and later systems) had ++UNIX\ V7 (and later systems) had + .BR S_IREAD , + .BR S_IWRITE , + .BR S_IEXEC , +@@ -438,104 +735,74 @@ prescribes the synonyms + .BR S_IRUSR , + .BR S_IWUSR , + .BR S_IXUSR . +-.SS Other systems +-Values that have been (or are) in use on various systems: +-.ad l +-.TS +-l l l l l. +-hex name ls octal description +-f000 S_IFMT 170000 mask for file type +-0000 000000 T{ +-SCO out-of-service inode; BSD unknown type; SVID-v2 and XPG2 +-have both 0 and 0100000 for ordinary file +-T} +-1000 S_IFIFO p| 010000 FIFO (named pipe) +-2000 S_IFCHR c 020000 character special (V7) +-3000 S_IFMPC 030000 multiplexed character special (V7) +-4000 S_IFDIR d/ 040000 directory (V7) +-5000 S_IFNAM 050000 T{ +-XENIX named special file with two subtypes, distinguished by +-\fIst_rdev\fP values 1, 2 +-T} +-0001 S_INSEM s 000001 XENIX semaphore subtype of IFNAM +-0002 S_INSHD m 000002 XENIX shared data subtype of IFNAM +-6000 S_IFBLK b 060000 block special (V7) +-7000 S_IFMPB 070000 multiplexed block special (V7) +-8000 S_IFREG - 100000 regular (V7) +-9000 S_IFCMP 110000 VxFS compressed +-9000 S_IFNWK n 110000 network special (HP-UX) +-a000 S_IFLNK l@ 120000 symbolic link (BSD) +-b000 S_IFSHAD 130000 T{ +-Solaris shadow inode for ACL (not seen by user space) +-T} +-c000 S_IFSOCK s= 140000 socket (BSD; also "S_IFSOC" on VxFS) +-d000 S_IFDOOR D> 150000 Solaris door +-e000 S_IFWHT w% 160000 BSD whiteout (not used for inode) +-0200 S_ISVTX 001000 T{ +-sticky bit: save swapped text even after use (V7) +-.br +-reserved (SVID-v2) +-.br +-On nondirectories: don't cache this file (SunOS) +-.br +-On directories: restricted deletion flag (SVID-v4.2) +-T} +-0400 S_ISGID 002000 T{ +-set-group-ID on execution (V7) +-.br +-for directories: use BSD semantics for propagation of GID +-T} +-0400 S_ENFMT 002000 T{ +-System V file locking enforcement (shared with S_ISGID) +-T} +-0800 S_ISUID 004000 set-user-ID on execution (V7) +-0800 S_CDF 004000 T{ +-directory is a context dependent file (HP-UX) +-T} +-.TE +-.ad +- +-A sticky command appeared in Version 32V AT&T UNIX. + .SH NOTES ++On Linux, ++.BR lstat () ++will generally not trigger automounter action, whereas ++.BR stat () ++will (but see the description of ++.BR fstatat () ++.B AT_NO_AUTOMOUNT ++fag, above). ++ ++For pseudofiles that are autogenerated by the kernel, ++.BR stat () ++does not return an accurate value in the ++.IR st_size ++field. ++For example, the value 0 is returned for many files under the ++.I /proc ++directory, ++while various files under ++.IR /sys ++report a size of 4096 bytes, even though the file content is smaller. ++For such files, one should simply try to read as many bytes as possible ++(and append \(aq\e0\(aq to the returned buffer ++if it is to be interpreted as a string). ++.\" ++.SS Timestamp fields ++Older kernels and older standards did not support nanosecond timestamp ++fields. ++Instead, there were three timestamp ++.RI fields\(em st_atime , ++.IR st_mtime , ++and ++.IR st_ctime \(emtyped ++as ++.IR time_t ++that recorded timestamps with one-second precision. ++ + Since kernel 2.5.48, the + .I stat + structure supports nanosecond resolution for the three file timestamp fields. +-Glibc exposes the nanosecond component of each field using names of the form +-.IR st_atim.tv_nsec +-if the +-.B _BSD_SOURCE +-or +-.B _SVID_SOURCE +-feature test macro is defined. +-These fields are specified in POSIX.1-2008, and, starting with version 2.12, +-glibc also exposes these field names if ++The nanosecond components of each timestamp are available ++via names of the form ++.IR st_atim.tv_nsec , ++if suitable feature test macros are defined. ++Nanosecond timestamps were standardized in POSIX.1-2008, ++and, starting with version 2.12, ++glibc exposes the nanosecond component names if + .BR _POSIX_C_SOURCE + is defined with the value 200809L or greater, or + .BR _XOPEN_SOURCE + is defined with the value 700 or greater. ++Up to and including glibc 2.19, ++the definitions of the nanoseconds components are also defined if ++.B _BSD_SOURCE ++or ++.B _SVID_SOURCE ++is defined. + If none of the aforementioned macros are defined, + then the nanosecond values are exposed with names of the form + .IR st_atimensec . +-On file systems that do not support subsecond timestamps, +-the nanosecond fields are returned with the value 0. +-.\" As at kernel 2.6.25, XFS and JFS support nanosecond timestamps, +-.\" but ext2, ext3, and Reiserfs do not. +- +-On Linux, +-.BR lstat () +-will generally not trigger automounter action, whereas +-.BR stat () +-will (but see +-.BR fstatat (2)). + +-For most files under the +-.I /proc +-directory, +-.BR stat () +-does not return the file size in the +-.I st_size +-field; instead the field is returned with the value 0. +-.SS Underlying kernel interface ++Nanosecond timestamps are supported on XFS, JFS, Btrfs, and ++ext4 (since Linux 2.6.23). ++.\" commit ef7f38359ea8b3e9c7f2cae9a4d4935f55ca9e80 ++Nanosecond timestamps are not supported in ext2, ext3, and Reiserfs. ++On filesystems that do not support subsecond timestamps, ++the nanosecond fields are returned with the value 0. ++.SS C library/kernel differences + Over time, increases in the size of the + .I stat + structure have led to three successive versions of +@@ -548,17 +815,51 @@ structure have led to three successive versions of + .IR __NR_stat ), + and + .I sys_stat64() +-(new in kernel 2.4; slot +-.IR __NR_stat64 ). ++(slot ++.IR __NR_stat64 ) ++on 32-bit platforms such as i386. ++The first two versions were already present in Linux 1.0 ++(albeit with different names); ++.\" See include/asm-i386/stat.h in the Linux 2.4 source code for the ++.\" various versions of the structure definitions ++the last was added in Linux 2.4. ++Similar remarks apply for ++.BR fstat () ++and ++.BR lstat (). ++ ++The kernel-internal versions of the ++.I stat ++structure dealt with by the different versions are, respectively: ++.TP ++.IR __old_kernel_stat ++The original structure, with rather narrow fields, and no padding. ++.TP ++.IR stat ++Larger ++.I st_ino ++field and padding added to various parts of the structure to ++allow for future expansion. ++.TP ++.IR stat64 ++Even larger ++.I st_ino ++field, ++larger ++.I st_uid ++and ++.I st_gid ++fields to accommodate the Linux-2.4 expansion of UIDs and GIDs to 32 bits, ++and various other enlarged fields and further padding in the structure. ++(Various padding bytes were eventually consumed in Linux 2.6, ++with the advent of 32-bit device IDs and nanosecond components ++for the timestamp fields.) ++.PP + The glibc + .BR stat () + wrapper function hides these details from applications, + invoking the most recent version of the system call provided by the kernel, + and repacking the returned information if required for old binaries. +-Similar remarks apply for +-.BR fstat () +-and +-.BR lstat (). + .\" + .\" A note from Andries Brouwer, July 2007 + .\" +@@ -587,6 +888,20 @@ and + .\" interface, rather than the libc-kernel interface. + .\" + .\" (Note that the details depend on gcc being used as c compiler.) ++ ++On modern 64-bit systems, life is simpler: there is a single ++.BR stat () ++system call and the kernel deals with a ++.I stat ++structure that contains fields of a sufficient size. ++ ++The underlying system call employed by the glibc ++.BR fstatat () ++wrapper function is actually called ++.BR fstatat64 () ++or, on some architectures, ++.\" strace(1) shows the name "newfstatat" on x86-64 ++.BR newfstatat (). + .SH EXAMPLE + The following program calls + .BR stat () +@@ -600,6 +915,7 @@ structure. + #include + #include + #include ++#include + + int + main(int argc, char *argv[]) +@@ -616,6 +932,9 @@ main(int argc, char *argv[]) + exit(EXIT_FAILURE); + } + ++ printf("ID of containing device: [%lx,%lx]\\n", ++ (long) major(sb.st_dev), (long) minor(sb.st_dev)); ++ + printf("File type: "); + + switch (sb.st_mode & S_IFMT) { +@@ -653,10 +972,11 @@ main(int argc, char *argv[]) + } + .fi + .SH SEE ALSO ++.BR ls (1), ++.BR stat (1), + .BR access (2), + .BR chmod (2), + .BR chown (2), +-.BR fstatat (2), + .BR readlink (2), + .BR utime (2), + .BR capabilities (7), +-- +2.7.4 + diff --git a/SOURCES/1495572-mpo-7.6.0-mount.cifs.8.patch b/SOURCES/1495572-mpo-7.6.0-mount.cifs.8.patch new file mode 100644 index 0000000..1b44970 --- /dev/null +++ b/SOURCES/1495572-mpo-7.6.0-mount.cifs.8.patch @@ -0,0 +1,28 @@ +From 785c2a1e47ce8fa251f9355ca760412b22784d28 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Nikola=20Forr=C3=B3?= +Date: Wed, 20 Jun 2018 11:11:09 +0200 +Subject: [PATCH] mount.cifs.8: describe seal option +--- + cifs-utils/man8/mount.cifs.8 | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/cifs-utils/man8/mount.cifs.8 b/cifs-utils/man8/mount.cifs.8 +index 01579f6..2a751ab 100644 +--- a/cifs-utils/man8/mount.cifs.8 ++++ b/cifs-utils/man8/mount.cifs.8 +@@ -440,6 +440,12 @@ The default in mainline kernel versions prior to v3.8 was sec=ntlm. In v3.8, the + If the server requires signing during protocol negotiation, then it may be enabled automatically. Packet signing may also be enabled automatically if it's enabled in /proc/fs/cifs/SecurityFlags. + .RE + .PP ++seal ++.RS 4 ++Request encryption at the SMB layer. Encryption is only supported in ++SMBv3 and above. The encryption algorithm used is AES\-128\-CCM. ++.RE ++.PP + nobrl + .RS 4 + Do not send byte range lock requests to the server\&. This is necessary for certain applications that break with cifs style mandatory byte range locks (and most cifs servers do not yet support requesting advisory byte range locks)\&. +-- +2.17.1 + diff --git a/SOURCES/1560191-mpo-7.6.0-madvise.2.patch b/SOURCES/1560191-mpo-7.6.0-madvise.2.patch new file mode 100644 index 0000000..4002832 --- /dev/null +++ b/SOURCES/1560191-mpo-7.6.0-madvise.2.patch @@ -0,0 +1,126 @@ +From 1bcf4b3aaf39cedd42bb5b34a81c6044b8a02d5a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Nikola=20Forr=C3=B3?= +Date: Tue, 19 Jun 2018 13:13:18 +0200 +Subject: [PATCH] madvise.2: document MADV_WIPEONFORK and MADV_KEEPONFORK +--- + man-pages/en/man2/madvise.2 | 39 +++++++++++++++++++++++++++++++++++++ + man-pages/man2/madvise.2 | 39 +++++++++++++++++++++++++++++++++++++ + 2 files changed, 78 insertions(+) + +diff --git a/man-pages/en/man2/madvise.2 b/man-pages/en/man2/madvise.2 +index 4e693da..8a1c46d 100644 +--- a/man-pages/en/man2/madvise.2 ++++ b/man-pages/en/man2/madvise.2 +@@ -265,6 +265,33 @@ file (see + .BR MADV_DODUMP " (since Linux 3.4)" + Undo the effect of an earlier + .BR MADV_DONTDUMP . ++.TP ++.BR MADV_WIPEONFORK " (since Linux 4.14)" ++.\" commit d2cd9ede6e193dd7d88b6d27399e96229a551b19 ++Present the child process with zero-filled memory in this range after a ++.BR fork (2). ++This is useful in forking servers in order to ensure ++that sensitive per-process data ++(for example, PRNG seeds, cryptographic secrets, and so on) ++is not handed to child processes. ++.IP ++The ++.B MADV_WIPEONFORK ++operation can be applied only to private anonymous pages (see ++.BR mmap (2)). ++.IP ++Within the child created by ++.BR fork (2), ++the ++.B MADV_WIPEONFORK ++setting remains in place on the specified address range. ++This setting is cleared during ++.BR execve (2). ++.TP ++.BR MADV_KEEPONFORK " (since Linux 4.14)" ++.\" commit d2cd9ede6e193dd7d88b6d27399e96229a551b19 ++Undo the effect of an earlier ++.BR MADV_WIPEONFORK . + .SH RETURN VALUE + On success + .BR madvise () +@@ -308,6 +335,18 @@ but the kernel was not configured with + .BR CONFIG_KSM . + .RE + .TP ++.B EINVAL ++.I advice ++is ++.BR MADV_FREE ++or ++.BR MADV_WIPEONFORK ++but the specified address range includes file, Huge TLB, ++.BR MAP_SHARED , ++or ++.BR VM_PFNMAP ++ranges. ++.TP + .B EIO + (for + .BR MADV_WILLNEED ) +diff --git a/man-pages/man2/madvise.2 b/man-pages/man2/madvise.2 +index 4e693da..8a1c46d 100644 +--- a/man-pages/man2/madvise.2 ++++ b/man-pages/man2/madvise.2 +@@ -265,6 +265,33 @@ file (see + .BR MADV_DODUMP " (since Linux 3.4)" + Undo the effect of an earlier + .BR MADV_DONTDUMP . ++.TP ++.BR MADV_WIPEONFORK " (since Linux 4.14)" ++.\" commit d2cd9ede6e193dd7d88b6d27399e96229a551b19 ++Present the child process with zero-filled memory in this range after a ++.BR fork (2). ++This is useful in forking servers in order to ensure ++that sensitive per-process data ++(for example, PRNG seeds, cryptographic secrets, and so on) ++is not handed to child processes. ++.IP ++The ++.B MADV_WIPEONFORK ++operation can be applied only to private anonymous pages (see ++.BR mmap (2)). ++.IP ++Within the child created by ++.BR fork (2), ++the ++.B MADV_WIPEONFORK ++setting remains in place on the specified address range. ++This setting is cleared during ++.BR execve (2). ++.TP ++.BR MADV_KEEPONFORK " (since Linux 4.14)" ++.\" commit d2cd9ede6e193dd7d88b6d27399e96229a551b19 ++Undo the effect of an earlier ++.BR MADV_WIPEONFORK . + .SH RETURN VALUE + On success + .BR madvise () +@@ -308,6 +335,18 @@ but the kernel was not configured with + .BR CONFIG_KSM . + .RE + .TP ++.B EINVAL ++.I advice ++is ++.BR MADV_FREE ++or ++.BR MADV_WIPEONFORK ++but the specified address range includes file, Huge TLB, ++.BR MAP_SHARED , ++or ++.BR VM_PFNMAP ++ranges. ++.TP + .B EIO + (for + .BR MADV_WILLNEED ) +-- +2.17.1 + diff --git a/SOURCES/1573281-mpo-7.6.0-mlock.2-mlock2.2.patch b/SOURCES/1573281-mpo-7.6.0-mlock.2-mlock2.2.patch new file mode 100644 index 0000000..c3c623b --- /dev/null +++ b/SOURCES/1573281-mpo-7.6.0-mlock.2-mlock2.2.patch @@ -0,0 +1,280 @@ +From 88a7af51d8ef4d9199ff9073bc09eabb5182fe80 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Nikola=20Forr=C3=B3?= +Date: Tue, 19 Jun 2018 13:14:13 +0200 +Subject: [PATCH 2/3] mlock.2, mlock2.2: document mlock2(2) and MCL_ONFAULT +--- + man-pages/man2/mlock.2 | 152 ++++++++++++++++++++++++++++++++++++----- + 1 file changed, 136 insertions(+), 16 deletions(-) + +diff --git a/man-pages/man2/mlock.2 b/man-pages/man2/mlock.2 +index 27189d8..595c9e9 100644 +--- a/man-pages/man2/mlock.2 ++++ b/man-pages/man2/mlock.2 +@@ -23,35 +23,39 @@ + .\" . + .\" %%%LICENSE_END + .\" +-.TH MLOCK 2 2011-09-14 "Linux" "Linux Programmer's Manual" ++.TH MLOCK 2 2015-08-28 "Linux" "Linux Programmer's Manual" + .SH NAME +-mlock, munlock, mlockall, munlockall \- lock and unlock memory ++mlock, mlock2, munlock, mlockall, munlockall \- lock and unlock memory + .SH SYNOPSIS + .nf + .B #include + .sp + .BI "int mlock(const void *" addr ", size_t " len ); ++.BI "int mlock2(const void *" addr ", size_t " len ", int " flags ); + .BI "int munlock(const void *" addr ", size_t " len ); + .sp + .BI "int mlockall(int " flags ); + .B int munlockall(void); + .fi + .SH DESCRIPTION +-.BR mlock () ++.BR mlock (), ++.BR mlock2 (), + and + .BR mlockall () +-respectively lock part or all of the calling process's virtual address ++lock part or all of the calling process's virtual address + space into RAM, preventing that memory from being paged to the + swap area. ++ + .BR munlock () + and + .BR munlockall () + perform the converse operation, +-respectively unlocking part or all of the calling process's virtual ++unlocking part or all of the calling process's virtual + address space, so that pages in the specified virtual address range may + once more to be swapped out if required by the kernel memory manager. ++ + Memory locking and unlocking are performed in units of whole pages. +-.SS mlock() and munlock() ++.SS mlock(), mlock2(), and munlock() + .BR mlock () + locks pages in the address range starting at + .I addr +@@ -62,6 +66,41 @@ All pages that contain a part of the specified address range are + guaranteed to be resident in RAM when the call returns successfully; + the pages are guaranteed to stay in RAM until later unlocked. + ++.BR mlock2 () ++.\" commit a8ca5d0ecbdde5cc3d7accacbd69968b0c98764e ++.\" commit de60f5f10c58d4f34b68622442c0e04180367f3f ++.\" commit b0f205c2a3082dd9081f9a94e50658c5fa906ff1 ++also locks pages in the specified range starting at ++.I addr ++and continuing for ++.I len ++bytes. ++However, the state of the pages contained in that range after the call ++returns successfully will depend on the value in the ++.I flags ++argument. ++ ++The ++.I flags ++argument can be either 0 or the following constant: ++.TP ++.B MLOCK_ONFAULT ++Lock pages that are currently resident and mark the entire range to have ++pages locked when they are populated by the page fault. ++.PP ++ ++If ++.I flags ++is 0, ++.BR mlock2 () ++behaves exactly the same as ++.BR mlock (). ++ ++Note: currently, there is not a glibc wrapper for ++.BR mlock2 (), ++so it will need to be invoked using ++.BR syscall (2). ++ + .BR munlock () + unlocks pages in the address range starting at + .I addr +@@ -93,9 +132,36 @@ the process. + .B MCL_FUTURE + Lock all pages which will become mapped into the address space of the + process in the future. +-These could be for instance new pages required +-by a growing heap and stack as well as new memory mapped files or ++These could be, for instance, new pages required ++by a growing heap and stack as well as new memory-mapped files or + shared memory regions. ++.TP ++.BR MCL_ONFAULT " (since Linux 4.4)" ++Used together with ++.BR MCL_CURRENT , ++.BR MCL_FUTURE , ++or both. ++Mark all current (with ++.BR MCL_CURRENT ) ++or future (with ++.BR MCL_FUTURE ) ++mappings to lock pages when they are faulted in. ++When used with ++.BR MCL_CURRENT , ++all present pages are locked, but ++.BR mlockall () ++will not fault in non-present pages. ++When used with ++.BR MCL_FUTURE , ++all future mappings will be marked to lock pages when they are faulted ++in, but they will not be populated by the lock when the mapping is ++created. ++.B MCL_ONFAULT ++must be used with either ++.B MCL_CURRENT ++or ++.B MCL_FUTURE ++or both. + .PP + If + .B MCL_FUTURE +@@ -148,7 +214,8 @@ to perform the requested operation. + .\"SVr4 documents an additional EAGAIN error code. + .LP + For +-.BR mlock () ++.BR mlock (), ++.BR mlock2 (), + and + .BR munlock (): + .TP +@@ -157,9 +224,9 @@ Some or all of the specified address range could not be locked. + .TP + .B EINVAL + The result of the addition +-.IR start + len ++.IR addr + len + was less than +-.IR start ++.IR addr + (e.g., the addition may have resulted in an overflow). + .TP + .B EINVAL +@@ -172,19 +239,36 @@ Some of the specified address range does not correspond to mapped + pages in the address space of the process. + .LP + For +-.BR mlockall (): ++.BR mlock2 (): + .TP + .B EINVAL + Unknown \fIflags\fP were specified. + .LP + For ++.BR mlockall (): ++.TP ++.B EINVAL ++Unknown \fIflags\fP were specified or ++.B MCL_ONFAULT ++was specified without either ++.B MCL_FUTURE ++or ++.BR MCL_CURRENT . ++.LP ++For + .BR munlockall (): + .TP + .B EPERM + (Linux 2.6.8 and earlier) The caller was not privileged + .RB ( CAP_IPC_LOCK ). ++.SH VERSIONS ++.BR mlock2 (2) ++is available since Linux 4.4. + .SH CONFORMING TO +-POSIX.1-2001, SVr4. ++POSIX.1-2001, POSIX.1-2008, SVr4. ++ ++mlock2 () ++is Linux specific. + .SH AVAILABILITY + On POSIX systems on which + .BR mlock () +@@ -247,6 +331,15 @@ Memory locks are not inherited by a child created via + and are automatically removed (unlocked) during an + .BR execve (2) + or when the process terminates. ++The ++.BR mlockall () ++.B MCL_FUTURE ++and ++.B MCL_FUTURE | MCL_ONFAULT ++settings are not inherited by a child created via ++.BR fork (2) ++and are cleared during an ++.BR execve (2). + + The memory lock on an address range is automatically removed + if the address range is unmapped via +@@ -254,7 +347,8 @@ if the address range is unmapped via + + Memory locks do not stack, that is, pages which have been locked several times + by calls to +-.BR mlock () ++.BR mlock (), ++.BR mlock2 (), + or + .BR mlockall () + will be unlocked by a single call to +@@ -264,15 +358,40 @@ for the corresponding range or by + Pages which are mapped to several locations or by several processes stay + locked into RAM as long as they are locked at least at one location or by + at least one process. ++ ++If a call to ++.BR mlockall () ++which uses the ++.B MCL_FUTURE ++flag is followed by another call that does not specify this flag, the ++changes made by the ++.B MCL_FUTURE ++call will be lost. ++ ++The ++.BR mlock2 () ++.B MLOCK_ONFAULT ++flag and the ++.BR mlockall () ++.B MCL_ONFAULT ++flag allow efficient memory locking for applications that deal with ++large mappings where only a (small) portion of pages in the mapping are touched. ++In such cases, locking all of the pages in a mapping would incur ++a significant penalty for memory locking. + .SS Linux notes + Under Linux, +-.BR mlock () ++.BR mlock (), ++.BR mlock2 (), + and + .BR munlock () + automatically round + .I addr + down to the nearest page boundary. +-However, POSIX.1-2001 allows an implementation to require that ++However, the POSIX.1 specification of ++.BR mlock () ++and ++.BR munlock () ++allows an implementation to require that + .I addr + is page aligned, so portable applications should ensure this. + +@@ -284,6 +403,7 @@ file shows how many kilobytes of memory the process with ID + .I PID + has locked using + .BR mlock (), ++.BR mlock2 (), + .BR mlockall (), + and + .BR mmap (2) +-- +2.17.1 + diff --git a/SOURCES/1577265-mpo-7.6.0-host.conf.5.patch b/SOURCES/1577265-mpo-7.6.0-host.conf.5.patch new file mode 100644 index 0000000..12ba02b --- /dev/null +++ b/SOURCES/1577265-mpo-7.6.0-host.conf.5.patch @@ -0,0 +1,107 @@ +From 9ad552df64b1de224e452d7d788f3b3473dbf945 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Nikola=20Forr=C3=B3?= +Date: Tue, 19 Jun 2018 14:00:17 +0200 +Subject: [PATCH] host.conf.5: remove description of never-implemented spoof + options +--- + man-pages/man5/host.conf.5 | 63 +------------------------------------- + 1 file changed, 1 insertion(+), 62 deletions(-) + +diff --git a/man-pages/man5/host.conf.5 b/man-pages/man5/host.conf.5 +index c85fefe..3f24518 100644 +--- a/man-pages/man5/host.conf.5 ++++ b/man-pages/man5/host.conf.5 +@@ -33,7 +33,7 @@ contains configuration information specific to the resolver library. + It should contain one configuration keyword per line, followed by + appropriate configuration information. + The keywords recognized are +-.IR trim ", " multi ", " nospoof ", " spoof ", and " reorder . ++.IR trim ", " multi ", and " reorder . + These keywords are described below. + .TP + .I trim +@@ -68,52 +68,6 @@ This is + by default, as it may cause a substantial performance loss at sites + with large hosts files. + .TP +-.I nospoof +-Valid values are +-.IR on " and " off . +-If set to +-.IR on , +-the resolv+ library will attempt to prevent hostname spoofing to +-enhance the security of +-.BR rlogin " and " rsh . +-It works as follows: after performing a host address lookup, resolv+ +-will perform a hostname lookup for that address. +-If the two hostnames +-do not match, the query will fail. +-The default value is +-.IR off . +-.TP +-.I spoofalert +-Valid values are +-.IR on " and " off . +-If this option is set to +-.I on +-and the +-.I nospoof +-option is also set, resolv+ will log a warning of the error via the +-syslog facility. +-The default value is +-.IR off . +-.TP +-.I spoof +-Valid values are +-.IR off ", " nowarn " and " warn . +-If this option is set to +-.IR off , +-spoofed addresses are permitted and no warnings will be emitted +-via the syslog facility. +-If this option is set to +-.IR warn , +-resolv+ will attempt to prevent hostname spoofing to +-enhance the security and log a warning of the error via the syslog +-facility. +-If this option is set to +-.IR nowarn , +-the resolv+ library will attempt to prevent hostname spoofing to +-enhance the security but not emit warnings via the syslog facility. +-Setting this option to anything else is equal to setting it to +-.IR nowarn . +-.TP + .I reorder + Valid values are + .IR on " and " off . +@@ -135,15 +89,6 @@ override the behavior which is configured in + If set this variable points to a file that should be read instead of + .IR /etc/host.conf . + .TP +-.B RESOLV_SPOOF_CHECK +-Overrides the +-.IR nospoof ", " spoofalert " and " spoof +-commands in the same way as the +-.I spoof +-command is parsed. +-Valid values are +-.IR off ", " nowarn " and " warn . +-.TP + .B RESOLV_MULTI + Overrides the + .I multi +@@ -178,12 +123,6 @@ Resolver configuration file + Local hosts database + .SH NOTES + The following differences exist compared to the original implementation. +-A new command +-.I spoof +-and a new environment variable +-.B RESOLV_SPOOF_CHECK +-can take arguments like +-.IR off ", " nowarn " and " warn . + Line comments can appear anywhere and not only at the beginning of a line. + .SH SEE ALSO + .BR gethostbyname (3), +-- +2.17.1 + diff --git a/SOURCES/1589421-mpo-7.8.0-iperf3.1.patch b/SOURCES/1589421-mpo-7.8.0-iperf3.1.patch new file mode 100644 index 0000000..ff4f38a --- /dev/null +++ b/SOURCES/1589421-mpo-7.8.0-iperf3.1.patch @@ -0,0 +1,50 @@ +From 9e3c08824c9b6ea991b59a4d7745fd9fee5caaf4 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Nikola=20Forr=C3=B3?= +Date: Thu, 8 Aug 2019 17:37:57 +0200 +Subject: [PATCH 5/6] iperf3.1: remove unsupported options +--- + iperf3/man1/iperf3.1 | 21 --------------------- + 1 file changed, 21 deletions(-) + +diff --git a/iperf3/man1/iperf3.1 b/iperf3/man1/iperf3.1 +index 0f42d5d..3cb3fc8 100644 +--- a/iperf3/man1/iperf3.1 ++++ b/iperf3/man1/iperf3.1 +@@ -91,9 +91,6 @@ handle one client connection, then exit. + .BR -c ", " --client " \fIhost\fR" + run in client mode, connecting to the specified server + .TP +-.BR --sctp +-use SCTP rather than TCP (FreeBSD and Linux) +-.TP + .BR -u ", " --udp + use UDP rather than TCP + .TP +@@ -173,24 +170,6 @@ set the IP 'type of service' + .BR -L ", " --flowlabel " \fIn\fR" + set the IPv6 flow label (currently only supported on Linux) + .TP +-.BR -X ", " --xbind " \fIname\fR" +-Bind SCTP associations to a specific subset of links using sctp_bindx(3). +-The \fB--B\fR flag will be ignored if this flag is specified. +-Normally SCTP will include the protocol addresses of all active links +-on the local host when setting up an association. Specifying at least +-one \fB--X\fR name will disable this behaviour. +-This flag must be specified for each link to be included in the +-association, and is supported for both iperf servers and clients +-(the latter are supported by passing the first \fB--X\fR argument to bind(2)). +-Hostnames are accepted as arguments and are resolved using +-getaddrinfo(3). +-If the \fB--4\fR or \fB--6\fR flags are specified, names +-which do not resolve to addresses within the +-specified protocol family will be ignored. +-.TP +-.BR --nstreams " \fIn\fR" +-Set number of SCTP streams. +-.TP + .BR -Z ", " --zerocopy " " + Use a "zero copy" method of sending data, such as sendfile(2), + instead of the usual write(2). +-- +2.21.0 + diff --git a/SOURCES/1595662-mpo-7.8.0-mmap.2.patch b/SOURCES/1595662-mpo-7.8.0-mmap.2.patch new file mode 100644 index 0000000..e939d48 --- /dev/null +++ b/SOURCES/1595662-mpo-7.8.0-mmap.2.patch @@ -0,0 +1,118 @@ +From f703950fc461d87b9833246be8721593aa5ec460 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Nikola=20Forr=C3=B3?= +Date: Thu, 8 Aug 2019 16:59:54 +0200 +Subject: [PATCH 2/6] mmap.2: fix EINVAL conditions +--- + man-pages/man2/mmap.2 | 60 +++++++++++++++++++++++++++++++++++++------ + 1 file changed, 52 insertions(+), 8 deletions(-) + +diff --git a/man-pages/man2/mmap.2 b/man-pages/man2/mmap.2 +index 798e0dd..6a9248c 100644 +--- a/man-pages/man2/mmap.2 ++++ b/man-pages/man2/mmap.2 +@@ -126,6 +126,23 @@ or + .BR munmap () + is called. + .TP ++.BR MAP_SHARED_VALIDATE " (since Linux 4.15)" ++This flag provides the same behavior as ++.B MAP_SHARED ++except that ++.B MAP_SHARED ++mappings ignore unknown flags in ++.IR flags . ++By contrast, when creating a mapping using ++.BR MAP_SHARED_VALIDATE , ++the kernel verifies all passed flags are known and fails the ++mapping with the error ++.BR EOPNOTSUPP ++for unknown flags. ++This mapping type is also required to be able to use some mapping flags ++(e.g., ++.BR MAP_SYNC ). ++.TP + .B MAP_PRIVATE + Create a private copy-on-write mapping. + Updates to the mapping are not visible to other processes +@@ -135,8 +152,14 @@ It is unspecified whether changes made to the file after the + .BR mmap () + call are visible in the mapped region. + .LP +-Both of these flags are described in POSIX.1-2001. +- ++Both ++.B MAP_SHARED ++and ++.B MAP_PRIVATE ++are described in POSIX.1-2001 and POSIX.1-2008. ++.B MAP_SHARED_VALIDATE ++is a Linux extension. ++.LP + In addition, zero or more of the following values can be ORed in + .IR flags : + .TP +@@ -290,6 +313,27 @@ support can later be transparently implemented for glibc. + .\" "pthread_create() slow for many threads; also time to revisit 64b + .\" context switch optimization?" + .TP ++.BR MAP_SYNC " (since Linux 4.15)" ++This flag is available only with the ++.B MAP_SHARED_VALIDATE ++mapping type; ++mappings of type ++.B MAP_SHARED ++will silently ignore this flag. ++This flag is supported only for files supporting DAX ++(direct mapping of persistent memory). ++For other files, creating a mapping with this flag results in an ++.B EOPNOTSUPP ++error. ++.IP ++Shared file mappings with this flag provide the guarantee that while ++some memory is writably mapped in the address space of the process, ++it will be visible in the same file at the same offset even after ++the system crashes or is rebooted. ++In conjunction with the use of appropriate CPU instructions, ++this provides users of such mappings with a more efficient way ++of making data modifications persistent. ++.TP + .BR MAP_UNINITIALIZED " (since Linux 2.6.33)" + Don't clear anonymous pages. + This flag is intended to improve performance on embedded devices. +@@ -302,7 +346,7 @@ that option is normally enabled only on embedded devices + .LP + Of the above flags, only + .B MAP_FIXED +-is specified in POSIX.1-2001. ++is specified in POSIX.1-2001 and POSIX.1-2008. + However, most systems also support + .B MAP_ANONYMOUS + (or its synonym +@@ -436,11 +480,11 @@ was 0. + .TP + .B EINVAL + .I flags +-contained neither +-.B MAP_PRIVATE ++contained none of ++.BR MAP_PRIVATE , ++.B MAP_SHARED + or +-.BR MAP_SHARED , +-or contained both of these values. ++.BR MAP_SHARED_VALIDATE . + .TP + .B ENFILE + .\" This is for shared anonymous segments +@@ -495,7 +539,7 @@ Attempted access to a portion of the buffer that does not correspond + to the file (for example, beyond the end of the file, including the + case where another process has truncated the file). + .SH CONFORMING TO +-SVr4, 4.4BSD, POSIX.1-2001. ++POSIX.1-2001, POSIX.1-2008, SVr4, 4.4BSD. + .\" SVr4 documents additional error codes ENXIO and ENODEV. + .\" SUSv2 documents additional error codes EMFILE and EOVERFLOW. + .SH AVAILABILITY +-- +2.21.0 + diff --git a/SOURCES/1598288-mpo-7.6.2-resolv.conf.5.patch b/SOURCES/1598288-mpo-7.6.2-resolv.conf.5.patch new file mode 100644 index 0000000..c15daea --- /dev/null +++ b/SOURCES/1598288-mpo-7.6.2-resolv.conf.5.patch @@ -0,0 +1,31 @@ +From bab019a04a4d1a4039a504ddd7f7167b326d548c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Nikola=20Forr=C3=B3?= +Date: Wed, 22 Aug 2018 12:35:19 +0200 +Subject: [PATCH 1/2] resolv.conf.5: document no-reload (RES_NORELOAD) option + +--- + man-pages/man5/resolv.conf.5 | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/man-pages/man5/resolv.conf.5 b/man-pages/man5/resolv.conf.5 +index 2495dde..8dc55c0 100644 +--- a/man-pages/man5/resolv.conf.5 ++++ b/man-pages/man5/resolv.conf.5 +@@ -269,6 +269,14 @@ as if it were a top level domain (TLD). + This option can cause problems if the site has ``localhost'' as a TLD + rather than having localhost on one or more elements of the search list. + This option has no effect if neither RES_DEFNAMES or RES_DNSRCH is set. ++.\" aef16cc8a4c670036d45590877d411a97f01e0cd ++.TP ++.BR no\-reload " (since glibc 2.26)" ++sets ++.BR RES_NORELOAD ++in ++.IR _res.options . ++This option disables automatic reloading of a changed configuration file. + .RE + .LP + The \fIdomain\fP and \fIsearch\fP keywords are mutually exclusive. +-- +2.17.1 + diff --git a/SOURCES/1607318-mpo-7.6.2-proc.5.patch b/SOURCES/1607318-mpo-7.6.2-proc.5.patch new file mode 100644 index 0000000..928e500 --- /dev/null +++ b/SOURCES/1607318-mpo-7.6.2-proc.5.patch @@ -0,0 +1,301 @@ +From cfd0231bfc49d6f040f9ec90243ae35e1af216d0 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Nikola=20Forr=C3=B3?= +Date: Wed, 22 Aug 2018 12:35:44 +0200 +Subject: [PATCH 2/2] proc.5: document missing fields in /proc/[pid]/smaps and + /proc/[pid]/status + +--- + man-pages/man5/proc.5 | 198 +++++++++++++++++++++++++++++++++++------- + 1 file changed, 168 insertions(+), 30 deletions(-) + +diff --git a/man-pages/man5/proc.5 b/man-pages/man5/proc.5 +index e4d2fd7..fa8505d 100644 +--- a/man-pages/man5/proc.5 ++++ b/man-pages/man5/proc.5 +@@ -961,28 +961,93 @@ For each of mappings there is a series of lines such as the following: + .in +4n + .nf + +-08048000-080bc000 r-xp 00000000 03:02 13130 /bin/bash +-Size: 464 kB +-Rss: 424 kB +-Shared_Clean: 424 kB +-Shared_Dirty: 0 kB +-Private_Clean: 0 kB +-Private_Dirty: 0 kB ++00400000\-0048a000 r\-xp 00000000 fd:03 960637 /bin/bash ++Size: 552 kB ++Rss: 460 kB ++Pss: 100 kB ++Shared_Clean: 452 kB ++Shared_Dirty: 0 kB ++Private_Clean: 8 kB ++Private_Dirty: 0 kB ++Referenced: 460 kB ++Anonymous: 0 kB ++AnonHugePages: 0 kB ++Swap: 0 kB ++KernelPageSize: 4 kB ++MMUPageSize: 4 kB ++KernelPageSize: 4 kB ++MMUPageSize: 4 kB ++Locked: 0 kB ++VmFlags: rd ex mr mw me dw + + .fi + .in + The first of these lines shows the same information as is displayed + for the mapping in + .IR /proc/[pid]/maps . +-The remaining lines show the size of the mapping, +-the amount of the mapping that is currently resident in RAM, ++The following lines show the size of the mapping, ++the amount of the mapping that is currently resident in RAM ("Rss"), ++the process's proportional share of this mapping ("Pss"), + the number of clean and dirty shared pages in the mapping, + and the number of clean and dirty private pages in the mapping. +- +-This file is present only if the +-.B CONFIG_MMU +-kernel configuration +-option is enabled. ++"Referenced" indicates the amount of memory currently marked as ++referenced or accessed. ++"Anonymous" shows the amount of memory ++that does not belong to any file. ++"Swap" shows how much ++would-be-anonymous memory is also used, but out on swap. ++.IP ++The "KernelPageSize" line (available since Linux 2.6.29) ++is the page size used by the kernel to back the virtual memory area. ++This matches the size used by the MMU in the majority of cases. ++However, one counter-example occurs on PPC64 kernels ++whereby a kernel using 64kB as a base page size may still use 4kB ++pages for the MMU on older processors. ++To distinguish the two attributes, the "MMUPageSize" line ++(also available since Linux 2.6.29) ++reports the page size used by the MMU. ++.IP ++The "Locked" indicates whether the mapping is locked in memory ++or not. ++.IP ++The "VmFlags" line (available since Linux 3.8) ++represents the kernel flags associated with the virtual memory area, ++encoded using the following two-letter codes: ++.IP ++ rd - readable ++ wr - writable ++ ex - executable ++ sh - shared ++ mr - may read ++ mw - may write ++ me - may execute ++ ms - may share ++ gd - stack segment grows down ++ pf - pure PFN range ++ dw - disabled write to the mapped file ++ lo - pages are locked in memory ++ io - memory mapped I/O area ++ sr - sequential read advise provided ++ rr - random read advise provided ++ dc - do not copy area on fork ++ de - do not expand area on remapping ++ ac - area is accountable ++ nr - swap space is not reserved for the area ++ ht - area uses huge tlb pages ++ nl - non-linear mapping ++ ar - architecture specific flag ++ dd - do not include area into core dump ++ sd - soft-dirty flag ++ mm - mixed map area ++ hg - huge page advise flag ++ nh - no-huge page advise flag ++ mg - mergeable advise flag ++.IP ++The ++.IR /proc/[pid]/smaps ++file is present only if the ++.B CONFIG_PROC_PAGE_MONITOR ++kernel configuration option is enabled. + .TP + .I /proc/[pid]/stat + Status information about the process. +@@ -1300,25 +1365,31 @@ Here's an example: + + .RB "$" " cat /proc/$$/status" + Name: bash ++Umask: 0022 + State: S (sleeping) +-Tgid: 3515 +-Pid: 3515 +-PPid: 3452 ++Tgid: 17248 ++Ngid: 0 ++Pid: 17248 ++PPid: 17200 + TracerPid: 0 + Uid: 1000 1000 1000 1000 + Gid: 100 100 100 100 + FDSize: 256 + Groups: 16 33 100 +-VmPeak: 9136 kB +-VmSize: 7896 kB ++VmPeak: 131168 kB ++VmSize: 131168 kB + VmLck: 0 kB +-VmHWM: 7572 kB +-VmRSS: 6316 kB +-VmData: 5224 kB +-VmStk: 88 kB +-VmExe: 572 kB +-VmLib: 1708 kB +-VmPTE: 20 kB ++VmPin: 0 kB ++VmHWM: 13484 kB ++VmRSS: 13484 kB ++RssAnon: 10264 kB ++RssFile: 3220 kB ++RssShmem: 0 kB ++VmData: 10332 kB ++VmStk: 136 kB ++VmExe: 992 kB ++VmLib: 2104 kB ++VmPTE: 76 kB + Threads: 1 + SigQ: 0/3067 + SigPnd: 0000000000000000 +@@ -1330,6 +1401,9 @@ CapInh: 0000000000000000 + CapPrm: 0000000000000000 + CapEff: 0000000000000000 + CapBnd: ffffffffffffffff ++CapAmb: 0000000000000000 ++Seccomp: 0 ++Speculation_Store_Bypass: vulnerable + Cpus_allowed: 00000001 + Cpus_allowed_list: 0 + Mems_allowed: 1 +@@ -1345,6 +1419,11 @@ The fields are as follows: + .IR Name : + Command run by this process. + .IP * ++.IR Umask : ++Process umask, expressed in octal with a leading zero; see ++.BR umask (2). ++(Since Linux 4.7.) ++.IP * + .IR State : + Current state of the process. + One of +@@ -1360,6 +1439,9 @@ or + .IR Tgid : + Thread group ID (i.e., Process ID). + .IP * ++.IR Ngid : ++NUMA group ID (0 if none; since Linux 3.13). ++.IP * + .IR Pid : + Thread ID (see + .BR gettid (2)). +@@ -1371,7 +1453,7 @@ PID of parent process. + PID of process tracing this process (0 if not being traced). + .IP * + .IR Uid ", " Gid : +-Real, effective, saved set, and file system UIDs (GIDs). ++Real, effective, saved set, and filesystem UIDs (GIDs). + .IP * + .IR FDSize : + Number of file descriptor slots currently allocated. +@@ -1387,13 +1469,43 @@ Virtual memory size. + .IP * + .IR VmLck : + Locked memory size (see +-.BR mlock (3)). ++.BR mlock (2)). ++.IP * ++.IR VmPin : ++Pinned memory size ++.\" commit bc3e53f682d93df677dbd5006a404722b3adfe18 ++(since Linux 3.2). ++These are pages that can't be moved because something needs to ++directly access physical memory. + .IP * + .IR VmHWM : + Peak resident set size ("high water mark"). + .IP * + .IR VmRSS : + Resident set size. ++Note that the value here is the sum of ++.IR RssAnon , ++.IR RssFile , ++and ++.IR RssShmem . ++.IP * ++.IR RssAnon : ++Size of resident anonymous memory. ++.\" commit bf9683d6990589390b5178dafe8fd06808869293 ++(since Linux 4.5). ++.IP * ++.IR RssFile : ++Size of resident file mappings. ++.\" commit bf9683d6990589390b5178dafe8fd06808869293 ++(since Linux 4.5). ++.IP * ++.IR RssShmem : ++Size of resident shared memory (includes System V shared memory, ++mappings from ++.BR tmpfs (5), ++and shared anonymous mappings). ++.\" commit bf9683d6990589390b5178dafe8fd06808869293 ++(since Linux 4.5). + .IP * + .IR VmData ", " VmStk ", " VmExe : + Size of data, stack, and text segments. +@@ -1435,9 +1547,35 @@ Masks of capabilities enabled in inheritable, permitted, and effective sets + .IP * + .IR CapBnd : + Capability Bounding set +-(since kernel 2.6.26, see ++(since Linux 2.6.26, see ++.BR capabilities (7)). ++.IP * ++.IR CapAmb : ++Ambient capability set ++(since Linux 4.3, see + .BR capabilities (7)). + .IP * ++.IR Seccomp : ++.\" commit 2f4b3bf6b2318cfaa177ec5a802f4d8d6afbd816 ++Seccomp mode of the process ++(since Linux 3.8, see ++.BR seccomp (2)). ++0 means ++.BR SECCOMP_MODE_DISABLED ; ++1 means ++.BR SECCOMP_MODE_STRICT ; ++2 means ++.BR SECCOMP_MODE_FILTER . ++This field is provided only if the kernel was built with the ++.BR CONFIG_SECCOMP ++kernel configuration option enabled. ++.IP * ++.IR Speculation_Store_Bypass : ++.\" commit fae1fa0fc6cca8beee3ab8ed71d54f9a78fa3f64 ++Speculation flaw mitigation state ++(since Linux 4.17, see ++.BR prctl (2)). ++.IP * + .IR Cpus_allowed : + Mask of CPUs on which this process may run + (since Linux 2.6.24, see +@@ -1458,7 +1596,7 @@ Same as previous, but in "list format" + (since Linux 2.6.26, see + .BR cpuset (7)). + .IP * +-.IR voluntary_context_switches ", " nonvoluntary_context_switches : ++.IR voluntary_ctxt_switches ", " nonvoluntary_ctxt_switches : + Number of voluntary and involuntary context switches (since Linux 2.6.23). + .RE + .TP +-- +2.17.1 + diff --git a/SOURCES/1619272-mpo-7.6.2-perf_event_open.2.patch b/SOURCES/1619272-mpo-7.6.2-perf_event_open.2.patch new file mode 100644 index 0000000..54da751 --- /dev/null +++ b/SOURCES/1619272-mpo-7.6.2-perf_event_open.2.patch @@ -0,0 +1,3582 @@ +From b4bd8040f471c245455a66c32c8979d3262faa2f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Nikola=20Forr=C3=B3?= +Date: Wed, 22 Aug 2018 11:11:05 +0200 +Subject: [PATCH 3/3] perf_event_open.2: sync with upstream + +--- + man-pages/man2/perf_event_open.2 | 2448 +++++++++++++++++++++++------- + 1 file changed, 1861 insertions(+), 587 deletions(-) + +diff --git a/man-pages/man2/perf_event_open.2 b/man-pages/man2/perf_event_open.2 +index 2ab3eb9..0f29d96 100644 +--- a/man-pages/man2/perf_event_open.2 ++++ b/man-pages/man2/perf_event_open.2 +@@ -24,19 +24,19 @@ + .\" This document is based on the perf_event.h header file, the + .\" tools/perf/design.txt file, and a lot of bitter experience. + .\" +-.TH PERF_EVENT_OPEN 2 2013-07-16 "Linux" "Linux Programmer's Manual" ++.TH PERF_EVENT_OPEN 2 2018-02-02 "Linux" "Linux Programmer's Manual" + .SH NAME + perf_event_open \- set up performance monitoring + .SH SYNOPSIS + .nf + .B #include + .B #include +-.sp ++.PP + .BI "int perf_event_open(struct perf_event_attr *" attr , + .BI " pid_t " pid ", int " cpu ", int " group_fd , + .BI " unsigned long " flags ); + .fi +- ++.PP + .IR Note : + There is no glibc wrapper for this system call; see NOTES. + .SH DESCRIPTION +@@ -56,7 +56,7 @@ to measure multiple events simultaneously. + Events can be enabled and disabled in two ways: via + .BR ioctl (2) + and via +-.BR prctl (2) . ++.BR prctl (2). + When an event is disabled it does not count or generate overflows but does + continue to exist and maintain its count value. + .PP +@@ -72,58 +72,48 @@ A + .I sampling + event periodically writes measurements to a buffer that can then + be accessed via +-.BR mmap (2) . ++.BR mmap (2). + .SS Arguments +-.P +-The argument +-.I pid +-allows events to be attached to processes in various ways. +-If +-.I pid +-is 0, measurements happen on the current thread, if +-.I pid +-is greater than 0, the process indicated by +-.I pid +-is measured, and if +-.I pid +-is \-1, all processes are counted. +- ++.PP + The +-.I cpu +-argument allows measurements to be specific to a CPU. +-If +-.I cpu +-is greater than or equal to 0, +-measurements are restricted to the specified CPU; +-if +-.I cpu +-is \-1, the events are measured on all CPUs. +-.P +-Note that the combination of +-.IR pid " == \-1" +-and +-.IR cpu " == \-1" +-is not valid. +-.P +-A +-.IR pid " > 0" +-and +-.IR cpu " == \-1" +-setting measures per-process and follows that process to whatever CPU the +-process gets scheduled to. +-Per-process events can be created by any user. +-.P +-A +-.IR pid " == \-1" ++.I pid + and +-.IR cpu " >= 0" +-setting is per-CPU and measures all processes on the specified CPU. +-Per-CPU events need the ++.I cpu ++arguments allow specifying which process and CPU to monitor: ++.TP ++.BR "pid == 0" " and " "cpu == \-1" ++This measures the calling process/thread on any CPU. ++.TP ++.BR "pid == 0" " and " "cpu >= 0" ++This measures the calling process/thread only ++when running on the specified CPU. ++.TP ++.BR "pid > 0" " and " "cpu == \-1" ++This measures the specified process/thread on any CPU. ++.TP ++.BR "pid > 0" " and " "cpu >= 0" ++This measures the specified process/thread only ++when running on the specified CPU. ++.TP ++.BR "pid == \-1" " and " "cpu >= 0" ++This measures all processes/threads on the specified CPU. ++This requires + .B CAP_SYS_ADMIN + capability or a + .I /proc/sys/kernel/perf_event_paranoid + value of less than 1. +-.P ++.TP ++.BR "pid == \-1" " and " "cpu == \-1" ++This setting is invalid and will return an error. ++.PP ++When ++.I pid ++is greater than zero, permission to perform this system call ++is governed by a ptrace access mode ++.B PTRACE_MODE_READ_REALCREDS ++check; see ++.BR ptrace (2). ++.PP + The + .I group_fd + argument allows event groups to be created. +@@ -134,7 +124,7 @@ The rest of the group members are created with subsequent + .BR perf_event_open () + calls with + .IR group_fd +-being set to the fd of the group leader. ++being set to the file descriptor of the group leader. + (A single event on its own is created with + .IR group_fd " = \-1" + and is considered to be a group with only 1 member.) +@@ -142,29 +132,51 @@ An event group is scheduled onto the CPU as a unit: it will + be put onto the CPU only if all of the events in the group can be put onto + the CPU. + This means that the values of the member events can be +-meaningfully compared, added, divided (to get ratios), etc., with each ++meaningfully compared\(emadded, divided (to get ratios), and so on\(emwith each + other, since they have counted events for the same set of executed + instructions. +-.P ++.PP + The + .I flags + argument is formed by ORing together zero or more of the following values: + .TP ++.BR PERF_FLAG_FD_CLOEXEC " (since Linux 3.14)" ++.\" commit a21b0b354d4ac39be691f51c53562e2c24443d9e ++This flag enables the close-on-exec flag for the created ++event file descriptor, ++so that the file descriptor is automatically closed on ++.BR execve (2). ++Setting the close-on-exec flags at creation time, rather than later with ++.BR fcntl (2), ++avoids potential race conditions where the calling thread invokes ++.BR perf_event_open () ++and ++.BR fcntl (2) ++at the same time as another thread calls ++.BR fork (2) ++then ++.BR execve (2). ++.TP + .BR PERF_FLAG_FD_NO_GROUP +-.\" FIXME The following sentence is unclear +-This flag allows creating an event as part of an event group but +-having no group leader. +-It is unclear why this is useful. +-.\" FIXME So, why is it useful? ++This flag tells the event to ignore the ++.IR group_fd ++parameter except for the purpose of setting up output redirection ++using the ++.B PERF_FLAG_FD_OUTPUT ++flag. + .TP +-.BR PERF_FLAG_FD_OUTPUT +-This flag re-routes the output from an event to the group leader. ++.BR PERF_FLAG_FD_OUTPUT " (broken since Linux 2.6.35)" ++.\" commit ac9721f3f54b27a16c7e1afb2481e7ee95a70318 ++This flag re-routes the event's sampled output to instead ++be included in the mmap buffer of the event specified by ++.IR group_fd . + .TP +-.BR PERF_FLAG_PID_CGROUP " (Since Linux 2.6.39)." ++.BR PERF_FLAG_PID_CGROUP " (since Linux 2.6.39)" ++.\" commit e5d1367f17ba6a6fed5fd8b74e4d5720923e0c25 + This flag activates per-container system-wide monitoring. + A container +-is an abstraction that isolates a set of resources for finer grain +-control (CPUs, memory, etc...). ++is an abstraction that isolates a set of resources for finer-grained ++control (CPUs, memory, etc.). + In this mode, the event is measured + only if the thread running on the monitored CPU belongs to the designated + container (cgroup). +@@ -182,52 +194,58 @@ must be passed as the + parameter. + cgroup monitoring is available only + for system-wide events and may therefore require extra permissions. +-.P ++.PP + The + .I perf_event_attr + structure provides detailed configuration information + for the event being created. +- ++.PP + .in +4n +-.nf ++.EX + struct perf_event_attr { +- __u32 type; /* Type of event */ +- __u32 size; /* Size of attribute structure */ +- __u64 config; /* Type-specific configuration */ ++ __u32 type; /* Type of event */ ++ __u32 size; /* Size of attribute structure */ ++ __u64 config; /* Type-specific configuration */ + + union { + __u64 sample_period; /* Period of sampling */ + __u64 sample_freq; /* Frequency of sampling */ + }; + +- __u64 sample_type; /* Specifies values included in sample */ +- __u64 read_format; /* Specifies values returned in read */ +- +- __u64 disabled : 1, /* off by default */ +- inherit : 1, /* children inherit it */ +- pinned : 1, /* must always be on PMU */ +- exclusive : 1, /* only group on PMU */ +- exclude_user : 1, /* don't count user */ +- exclude_kernel : 1, /* don't count kernel */ +- exclude_hv : 1, /* don't count hypervisor */ +- exclude_idle : 1, /* don't count when idle */ +- mmap : 1, /* include mmap data */ +- comm : 1, /* include comm data */ +- freq : 1, /* use freq, not period */ +- inherit_stat : 1, /* per task counts */ +- enable_on_exec : 1, /* next exec enables */ +- task : 1, /* trace fork/exit */ +- watermark : 1, /* wakeup_watermark */ +- precise_ip : 2, /* skid constraint */ +- mmap_data : 1, /* non-exec mmap data */ +- sample_id_all : 1, /* sample_type all events */ +- exclude_host : 1, /* don't count in host */ +- exclude_guest : 1, /* don't count in guest */ +- exclude_callchain_kernel : 1, +- /* exclude kernel callchains */ +- exclude_callchain_user : 1, +- /* exclude user callchains */ +- __reserved_1 : 41; ++ __u64 sample_type; /* Specifies values included in sample */ ++ __u64 read_format; /* Specifies values returned in read */ ++ ++ __u64 disabled : 1, /* off by default */ ++ inherit : 1, /* children inherit it */ ++ pinned : 1, /* must always be on PMU */ ++ exclusive : 1, /* only group on PMU */ ++ exclude_user : 1, /* don't count user */ ++ exclude_kernel : 1, /* don't count kernel */ ++ exclude_hv : 1, /* don't count hypervisor */ ++ exclude_idle : 1, /* don't count when idle */ ++ mmap : 1, /* include mmap data */ ++ comm : 1, /* include comm data */ ++ freq : 1, /* use freq, not period */ ++ inherit_stat : 1, /* per task counts */ ++ enable_on_exec : 1, /* next exec enables */ ++ task : 1, /* trace fork/exit */ ++ watermark : 1, /* wakeup_watermark */ ++ precise_ip : 2, /* skid constraint */ ++ mmap_data : 1, /* non-exec mmap data */ ++ sample_id_all : 1, /* sample_type all events */ ++ exclude_host : 1, /* don't count in host */ ++ exclude_guest : 1, /* don't count in guest */ ++ exclude_callchain_kernel : 1, ++ /* exclude kernel callchains */ ++ exclude_callchain_user : 1, ++ /* exclude user callchains */ ++ mmap2 : 1, /* include mmap with inode data */ ++ comm_exec : 1, /* flag comm events that are ++ due to exec */ ++ use_clockid : 1, /* use clockid for time fields */ ++ context_switch : 1, /* context switch data */ ++ ++ __reserved_1 : 37; + + union { + __u32 wakeup_events; /* wakeup every n events */ +@@ -238,23 +256,31 @@ struct perf_event_attr { + + union { + __u64 bp_addr; /* breakpoint address */ ++ __u64 kprobe_func; /* for perf_kprobe */ ++ __u64 uprobe_path; /* for perf_uprobe */ + __u64 config1; /* extension of config */ + }; + + union { + __u64 bp_len; /* breakpoint length */ ++ __u64 kprobe_addr; /* with kprobe_func == NULL */ ++ __u64 probe_offset; /* for perf_[k,u]probe */ + __u64 config2; /* extension of config1 */ + }; +- __u64 branch_sample_type; /* enum perf_branch_sample_type */ +- __u64 sample_regs_user; /* user regs to dump on samples */ +- __u32 sample_stack_user; /* size of stack to dump on ++ __u64 branch_sample_type; /* enum perf_branch_sample_type */ ++ __u64 sample_regs_user; /* user regs to dump on samples */ ++ __u32 sample_stack_user; /* size of stack to dump on + samples */ +- __u32 __reserved_2; /* Align to u64 */ ++ __s32 clockid; /* clock to use for time fields */ ++ __u64 sample_regs_intr; /* regs to dump on samples */ ++ __u32 aux_watermark; /* aux bytes before wakeup */ ++ __u16 sample_max_stack; /* max frames in callchain */ ++ __u16 __reserved_2; /* align to u64 */ + + }; +-.fi ++.EE + .in +- ++.PP + The fields of the + .I perf_event_attr + structure are described in more detail below: +@@ -289,13 +315,15 @@ field definition. + This indicates a "raw" implementation-specific event in the + .IR config " field." + .TP +-.BR PERF_TYPE_BREAKPOINT " (Since Linux 2.6.33)" ++.BR PERF_TYPE_BREAKPOINT " (since Linux 2.6.33)" ++.\" commit 24f1e32c60c45c89a997c73395b69c8af6f0a84e + This indicates a hardware breakpoint as provided by the CPU. + Breakpoints can be read/write accesses to an address as well as + execution of an instruction address. + .TP + .RB "dynamic PMU" +-Since Linux 2.6.39, ++Since Linux 2.6.38, ++.\" commit 2e80a82a49c4c7eca4e35734380f28298ba5db19 + .BR perf_event_open () + can support multiple PMUs. + To enable this, a value exported by the kernel can be used in the +@@ -304,7 +332,7 @@ field to indicate which PMU to use. + The value to use can be found in the sysfs filesystem: + there is a subdirectory per PMU instance under + .IR /sys/bus/event_source/devices . +-In each sub-directory there is a ++In each subdirectory there is a + .I type + file whose content is an integer that can be used in the + .I type +@@ -312,6 +340,17 @@ field. + For instance, + .I /sys/bus/event_source/devices/cpu/type + contains the value for the core CPU PMU, which is usually 4. ++.TP ++.BR kprobe " and " uprobe " (since Linux 4.17)" ++.\" commit 65074d43fc77bcae32776724b7fa2696923c78e4 ++.\" commit e12f03d7031a977356e3d7b75a68c2185ff8d155 ++.\" commit 33ea4b24277b06dbc55d7f5772a46f029600255e ++These two dynamic PMUs create a kprobe/uprobe and attach it to the ++file descriptor generated by perf_event_open. ++The kprobe/uprobe will be destroyed on the destruction of the file descriptor. ++See fields ++.IR kprobe_func ", " uprobe_path ", " kprobe_addr ", and " probe_offset ++for more details. + .RE + .TP + .I "size" +@@ -322,21 +361,36 @@ Set this using + .I sizeof(struct perf_event_attr) + to allow the kernel to see + the struct size at the time of compilation. +- ++.IP + The related define + .B PERF_ATTR_SIZE_VER0 + is set to 64; this was the size of the first published struct. + .B PERF_ATTR_SIZE_VER1 + is 72, corresponding to the addition of breakpoints in Linux 2.6.33. ++.\" commit cb5d76999029ae7a517cb07dfa732c1b5a934fc2 ++.\" this was added much later when PERF_ATTR_SIZE_VER2 happened ++.\" but the actual attr_size had increased in 2.6.33 + .B PERF_ATTR_SIZE_VER2 + is 80 corresponding to the addition of branch sampling in Linux 3.4. +-.B PERF_ATR_SIZE_VER3 ++.\" commit cb5d76999029ae7a517cb07dfa732c1b5a934fc2 ++.B PERF_ATTR_SIZE_VER3 + is 96 corresponding to the addition + of + .I sample_regs_user + and + .I sample_stack_user + in Linux 3.7. ++.\" commit 1659d129ed014b715b0b2120e6fd929bdd33ed03 ++.B PERF_ATTR_SIZE_VER4 ++is 104 corresponding to the addition of ++.I sample_regs_intr ++in Linux 3.19. ++.\" commit 60e2364e60e86e81bc6377f49779779e6120977f ++.B PERF_ATTR_SIZE_VER5 ++is 112 corresponding to the addition of ++.I aux_watermark ++in Linux 4.1. ++.\" commit 1a5941312414c71dece6717da9a0fa1303127afa + .TP + .I "config" + This specifies which event you want, in conjunction with +@@ -348,13 +402,7 @@ The + fields are also taken into account in cases where 64 bits is not + enough to fully specify the event. + The encoding of these fields are event dependent. +- +-The most significant bit (bit 63) of +-.I config +-signifies CPU-specific (raw) counter configuration data; +-if the most significant bit is unset, the next 7 bits are an event +-type and the rest of the bits are the event identifier. +- ++.IP + There are various ways to set the + .I config + field that are dependent on the value of the previously +@@ -365,7 +413,7 @@ What follows are various possible settings for + .I config + separated out by + .IR type . +- ++.IP + If + .I type + is +@@ -379,12 +427,12 @@ to one of the following: + .TP + .B PERF_COUNT_HW_CPU_CYCLES + Total cycles. +-Be wary of what happens during CPU frequency scaling ++Be wary of what happens during CPU frequency scaling. + .TP + .B PERF_COUNT_HW_INSTRUCTIONS + Retired instructions. + Be careful, these can be affected by various +-issues, most notably hardware interrupt counts ++issues, most notably hardware interrupt counts. + .TP + .B PERF_COUNT_HW_CACHE_REFERENCES + Cache accesses. +@@ -402,8 +450,9 @@ event to calculate cache miss rates. + .TP + .B PERF_COUNT_HW_BRANCH_INSTRUCTIONS + Retired branch instructions. +-Prior to Linux 2.6.34, this used ++Prior to Linux 2.6.35, this used + the wrong event on AMD processors. ++.\" commit f287d332ce835f77a4f5077d2c0ef1e3f9ea42d2 + .TP + .B PERF_COUNT_HW_BRANCH_MISSES + Mispredicted branch instructions. +@@ -411,13 +460,16 @@ Mispredicted branch instructions. + .B PERF_COUNT_HW_BUS_CYCLES + Bus cycles, which can be different from total cycles. + .TP +-.BR PERF_COUNT_HW_STALLED_CYCLES_FRONTEND " (Since Linux 3.0)" ++.BR PERF_COUNT_HW_STALLED_CYCLES_FRONTEND " (since Linux 3.0)" ++.\" commit 8f62242246351b5a4bc0c1f00c0c7003edea128a + Stalled cycles during issue. + .TP +-.BR PERF_COUNT_HW_STALLED_CYCLES_BACKEND " (Since Linux 3.0)" ++.BR PERF_COUNT_HW_STALLED_CYCLES_BACKEND " (since Linux 3.0)" ++.\" commit 8f62242246351b5a4bc0c1f00c0c7003edea128a + Stalled cycles during retirement. + .TP +-.BR PERF_COUNT_HW_REF_CPU_CYCLES " (Since Linux 3.3)" ++.BR PERF_COUNT_HW_REF_CPU_CYCLES " (since Linux 3.3)" ++.\" commit c37e17497e01fc0f5d2d6feb5723b210b3ab8890 + Total cycles; not affected by CPU frequency scaling. + .RE + .IP +@@ -444,6 +496,7 @@ This reports the number of page faults. + This counts context switches. + Until Linux 2.6.34, these were all reported as user-space + events, after that they are reported as happening in the kernel. ++.\" commit e49a5bd38159dfb1928fd25b173bc9de4bbadb21 + .TP + .B PERF_COUNT_SW_CPU_MIGRATIONS + This reports the number of times the process +@@ -457,19 +510,29 @@ These did not require disk I/O to handle. + This counts the number of major page faults. + These required disk I/O to handle. + .TP +-.BR PERF_COUNT_SW_ALIGNMENT_FAULTS " (Since Linux 2.6.33)" ++.BR PERF_COUNT_SW_ALIGNMENT_FAULTS " (since Linux 2.6.33)" ++.\" commit f7d7986060b2890fc26db6ab5203efbd33aa2497 + This counts the number of alignment faults. + These happen when unaligned memory accesses happen; the kernel + can handle these but it reduces performance. + This happens only on some architectures (never on x86). + .TP +-.BR PERF_COUNT_SW_EMULATION_FAULTS " (Since Linux 2.6.33)" ++.BR PERF_COUNT_SW_EMULATION_FAULTS " (since Linux 2.6.33)" ++.\" commit f7d7986060b2890fc26db6ab5203efbd33aa2497 + This counts the number of emulation faults. + The kernel sometimes traps on unimplemented instructions + and emulates them for user space. + This can negatively impact performance. ++.TP ++.BR PERF_COUNT_SW_DUMMY " (since Linux 3.12)" ++.\" commit fa0097ee690693006ab1aea6c01ad3c851b65c77 ++This is a placeholder event that counts nothing. ++Informational sample record types such as mmap or comm ++must be associated with an active event. ++This dummy event allows gathering such records without requiring ++a counting event. + .RE +- ++.PP + .RS + If + .I type +@@ -482,7 +545,7 @@ can be obtained from under debugfs + .I tracing/events/*/*/id + if ftrace is enabled in the kernel. + .RE +- ++.PP + .RS + If + .I type +@@ -492,13 +555,13 @@ then we are measuring a hardware CPU cache event. + To calculate the appropriate + .I config + value use the following equation: ++.PP + .RS 4 + .nf +- + (perf_hw_cache_id) | (perf_hw_cache_op_id << 8) | + (perf_hw_cache_op_result_id << 16) + .fi +-.P ++.PP + where + .I perf_hw_cache_id + is one of: +@@ -522,13 +585,14 @@ for measuring the Instruction TLB + .B PERF_COUNT_HW_CACHE_BPU + for measuring the branch prediction unit + .TP +-.BR PERF_COUNT_HW_CACHE_NODE " (Since Linux 3.0)" ++.BR PERF_COUNT_HW_CACHE_NODE " (since Linux 3.1)" ++.\" commit 89d6c0b5bdbb1927775584dcf532d98b3efe1477 + for measuring local memory accesses + .RE +-.P ++.PP + and + .I perf_hw_cache_op_id +-is one of ++is one of: + .RS 4 + .TP + .B PERF_COUNT_HW_CACHE_OP_READ +@@ -540,10 +604,10 @@ for write accesses + .B PERF_COUNT_HW_CACHE_OP_PREFETCH + for prefetch accesses + .RE +-.P ++.PP + and + .I perf_hw_cache_op_result_id +-is one of ++is one of: + .RS 4 + .TP + .B PERF_COUNT_HW_CACHE_RESULT_ACCESS +@@ -553,7 +617,7 @@ to measure accesses + to measure misses + .RE + .RE +- ++.PP + If + .I type + is +@@ -569,7 +633,7 @@ The libpfm4 library can be used to translate from the name in the + architectural manuals to the raw hex value + .BR perf_event_open () + expects in this field. +- ++.PP + If + .I type + is +@@ -578,23 +642,63 @@ then leave + .I config + set to zero. + Its parameters are set in other places. ++.PP ++If ++.I type ++is ++.BR kprobe ++or ++.BR uprobe , ++set ++.IR retprobe ++(bit 0 of ++.IR config , ++see ++.IR /sys/bus/event_source/devices/[k,u]probe/format/retprobe ) ++for kretprobe/uretprobe. ++See fields ++.IR kprobe_func ", " uprobe_path ", " kprobe_addr ", and " probe_offset ++for more details. + .RE + .TP ++.IR kprobe_func ", " uprobe_path ", " kprobe_addr ", and " probe_offset ++These fields describe the kprobe/uprobe for dynamic PMUs ++.BR kprobe ++and ++.BR uprobe . ++For ++.BR kprobe : ++use ++.I kprobe_func ++and ++.IR probe_offset , ++or use ++.I kprobe_addr ++and leave ++.I kprobe_func ++as NULL. ++For ++.BR uprobe : ++use ++.I uprobe_path ++and ++.IR probe_offset . ++.TP + .IR sample_period ", " sample_freq +-A "sampling" counter is one that generates an interrupt ++A "sampling" event is one that generates an overflow notification + every N events, where N is given by + .IR sample_period . +-A sampling counter has ++A sampling event has + .IR sample_period " > 0." +-When an overflow interrupt occurs, requested data is recorded ++When an overflow occurs, requested data is recorded + in the mmap buffer. + The + .I sample_type +-field controls what data is recorded on each interrupt. +- ++field controls what data is recorded on each overflow. ++.IP + .I sample_freq + can be used if you wish to use frequency rather than period. +-In this case you set the ++In this case, you set the + .I freq + flag. + The kernel will adjust the sampling period +@@ -647,39 +751,106 @@ Records a unique ID for the opened event. + Unlike + .B PERF_SAMPLE_ID + the actual ID is returned, not the group leader. +-This ID is the same as the one returned by PERF_FORMAT_ID. ++This ID is the same as the one returned by ++.BR PERF_FORMAT_ID . + .TP + .B PERF_SAMPLE_RAW + Records additional data, if applicable. + Usually returned by tracepoint events. + .TP +-.BR PERF_SAMPLE_BRANCH_STACK " (Since Linux 3.4)" ++.BR PERF_SAMPLE_BRANCH_STACK " (since Linux 3.4)" ++.\" commit bce38cd53e5ddba9cb6d708c4ef3d04a4016ec7e + This provides a record of recent branches, as provided + by CPU branch sampling hardware (such as Intel Last Branch Record). + Not all hardware supports this feature. +- ++.IP + See the + .I branch_sample_type + field for how to filter which branches are reported. + .TP +-.BR PERF_SAMPLE_REGS_USER " (Since Linux 3.7)" ++.BR PERF_SAMPLE_REGS_USER " (since Linux 3.7)" ++.\" commit 4018994f3d8785275ef0e7391b75c3462c029e56 + Records the current user-level CPU register state + (the values in the process before the kernel was called). + .TP +-.BR PERF_SAMPLE_STACK_USER " (Since Linux 3.7)" ++.BR PERF_SAMPLE_STACK_USER " (since Linux 3.7)" ++.\" commit c5ebcedb566ef17bda7b02686e0d658a7bb42ee7 + Records the user level stack, allowing stack unwinding. + .TP +-.BR PERF_SAMPLE_WEIGHT " (Since Linux 3.10)" ++.BR PERF_SAMPLE_WEIGHT " (since Linux 3.10)" ++.\" commit c3feedf2aaf9ac8bad6f19f5d21e4ee0b4b87e9c + Records a hardware provided weight value that expresses how + costly the sampled event was. + This allows the hardware to highlight expensive events in + a profile. + .TP +-.BR PERF_SAMPLE_DATA_SRC " (Since Linux 3.10)" ++.BR PERF_SAMPLE_DATA_SRC " (since Linux 3.10)" ++.\" commit d6be9ad6c960f43800a6f118932bc8a5a4eadcd1 + Records the data source: where in the memory hierarchy + the data associated with the sampled instruction came from. +-This is only available if the underlying hardware ++This is available only if the underlying hardware + supports this feature. ++.TP ++.BR PERF_SAMPLE_IDENTIFIER " (since Linux 3.12)" ++.\" commit ff3d527cebc1fa3707c617bfe9e74f53fcfb0955 ++Places the ++.B SAMPLE_ID ++value in a fixed position in the record, ++either at the beginning (for sample events) or at the end ++(if a non-sample event). ++.IP ++This was necessary because a sample stream may have ++records from various different event sources with different ++.I sample_type ++settings. ++Parsing the event stream properly was not possible because the ++format of the record was needed to find ++.BR SAMPLE_ID , ++but ++the format could not be found without knowing what ++event the sample belonged to (causing a circular ++dependency). ++.IP ++The ++.B PERF_SAMPLE_IDENTIFIER ++setting makes the event stream always parsable ++by putting ++.B SAMPLE_ID ++in a fixed location, even though ++it means having duplicate ++.B SAMPLE_ID ++values in records. ++.TP ++.BR PERF_SAMPLE_TRANSACTION " (since Linux 3.13)" ++.\" commit fdfbbd07e91f8fe387140776f3fd94605f0c89e5 ++Records reasons for transactional memory abort events ++(for example, from Intel TSX transactional memory support). ++.IP ++The ++.I precise_ip ++setting must be greater than 0 and a transactional memory abort ++event must be measured or no values will be recorded. ++Also note that some perf_event measurements, such as sampled ++cycle counting, may cause extraneous aborts (by causing an ++interrupt during a transaction). ++.TP ++.BR PERF_SAMPLE_REGS_INTR " (since Linux 3.19)" ++.\" commit 60e2364e60e86e81bc6377f49779779e6120977f ++Records a subset of the current CPU register state ++as specified by ++.IR sample_regs_intr . ++Unlike ++.B PERF_SAMPLE_REGS_USER ++the register values will return kernel register ++state if the overflow happened while kernel ++code is running. ++If the CPU supports hardware sampling of ++register state (i.e., PEBS on Intel x86) and ++.I precise_ip ++is set higher than zero then the register ++values returned are those captured by ++hardware at the time of the sampled ++instruction's retirement. + .RE + .TP + .IR "read_format" +@@ -702,7 +873,7 @@ Adds the 64-bit + .I time_running + field. + This can be used to calculate estimated totals if +-the PMU is overcommitted and multiplexing is happening. ++the PMU is overcommitted and multiplexing is happening. + .TP + .B PERF_FORMAT_ID + Adds a 64-bit unique value that corresponds to the event group. +@@ -720,6 +891,17 @@ If disabled, the event can later be enabled by + .BR prctl (2), + or + .IR enable_on_exec . ++.IP ++When creating an event group, typically the group leader is initialized ++with ++.I disabled ++set to 1 and any child events are initialized with ++.I disabled ++set to 0. ++Despite ++.I disabled ++being 0, the child events will not start until the group leader ++is enabled. + .TP + .IR "inherit" + The +@@ -729,10 +911,10 @@ tasks as well as the task specified. + This applies only to new children, not to any existing children at + the time the counter is created (nor to any new children of + existing children). +- ++.IP + Inherit does not work for some combinations of +-.IR read_format s, +-such as ++.IR read_format ++values, such as + .BR PERF_FORMAT_GROUP . + .TP + .IR "pinned" +@@ -756,12 +938,19 @@ it should be the only group using the CPU's counters. + In the future this may allow monitoring programs to + support PMU features that need to run alone so that they do not + disrupt other hardware counters. ++.IP ++Note that many unexpected situations may prevent events with the ++.I exclusive ++bit set from ever running. ++This includes any users running a system-wide ++measurement as well as any kernel use of the performance counters ++(including the commonly enabled NMI Watchdog Timer interface). + .TP + .IR "exclude_user" + If this bit is set, the count excludes events that happen in user space. + .TP + .IR "exclude_kernel" +-If this bit is set, the count excludes events that happen in kernel-space. ++If this bit is set, the count excludes events that happen in kernel space. + .TP + .IR "exclude_hv" + If this bit is set, the count excludes events that happen in the +@@ -772,23 +961,42 @@ Extra support is needed for handling hypervisor measurements on most + machines. + .TP + .IR "exclude_idle" +-If set, don't count when the CPU is idle. ++If set, don't count when the CPU is running the idle task. ++While you can currently enable this for any event type, it is ignored ++for all but software events. + .TP + .IR "mmap" + The + .I mmap +-bit enables recording of exec mmap events. ++bit enables generation of ++.B PERF_RECORD_MMAP ++samples for every ++.BR mmap (2) ++call that has ++.B PROT_EXEC ++set. ++This allows tools to notice new executable code being mapped into ++a program (dynamic shared libraries for example) ++so that addresses can be mapped back to the original code. + .TP + .IR "comm" + The + .I comm + bit enables tracking of process command name as modified by the +-.IR exec (2) ++.BR exec (2) + and +-.IR prctl (PR_SET_NAME) +-system calls. +-Unfortunately for tools, +-there is no way to distinguish one system call versus the other. ++.BR prctl (PR_SET_NAME) ++system calls as well as writing to ++.IR /proc/self/comm . ++If the ++.I comm_exec ++flag is also successfully set (possible since Linux 3.16), ++.\" commit 82b897782d10fcc4930c9d4a15b175348fdd2871 ++then the misc flag ++.B PERF_RECORD_MISC_COMM_EXEC ++can be used to differentiate the ++.BR exec (2) ++case from the others. + .TP + .IR "freq" + If this bit is set, then +@@ -814,14 +1022,15 @@ If this bit is set, then + fork/exit notifications are included in the ring buffer. + .TP + .IR "watermark" +-If set, have a sampling interrupt happen when we cross the ++If set, have an overflow notification happen when we cross the + .I wakeup_watermark + boundary. +-Otherwise interrupts happen after ++Otherwise, overflow notifications happen after + .I wakeup_events + samples. + .TP +-.IR "precise_ip" " (Since Linux 2.6.35)" ++.IR "precise_ip" " (since Linux 2.6.35)" ++.\" commit ab608344bcbde4f55ec4cd911b686b0ce3eae076 + This controls the amount of skid. + Skid is how many instructions + execute between an event of interest happening and the kernel +@@ -830,95 +1039,200 @@ Smaller skid is + better and allows more accurate reporting of which events + correspond to which instructions, but hardware is often limited + with how small this can be. +- +-The values of this are the following: ++.IP ++The possible values of this field are the following: + .RS +-.TP +-0 - ++.IP 0 3 + .B SAMPLE_IP +-can have arbitrary skid +-.TP +-1 - ++can have arbitrary skid. ++.IP 1 + .B SAMPLE_IP +-must have constant skid +-.TP +-2 - ++must have constant skid. ++.IP 2 + .B SAMPLE_IP +-requested to have 0 skid +-.TP +-3 - ++requested to have 0 skid. ++.IP 3 + .B SAMPLE_IP + must have 0 skid. +-See also ++See also the description of + .BR PERF_RECORD_MISC_EXACT_IP . + .RE + .TP +-.IR "mmap_data" " (Since Linux 2.6.36)" +-The counterpart of the ++.IR "mmap_data" " (since Linux 2.6.36)" ++.\" commit 3af9e859281bda7eb7c20b51879cf43aa788ac2e ++This is the counterpart of the + .I mmap +-field, but enables including data mmap events +-in the ring-buffer. ++field. ++This enables generation of ++.B PERF_RECORD_MMAP ++samples for ++.BR mmap (2) ++calls that do not have ++.B PROT_EXEC ++set (for example data and SysV shared memory). + .TP +-.IR "sample_id_all" " (Since Linux 2.6.38)" +-If set, then TID, TIME, ID, CPU, and STREAM_ID can ++.IR "sample_id_all" " (since Linux 2.6.38)" ++.\" commit c980d1091810df13f21aabbce545fd98f545bbf7 ++If set, then TID, TIME, ID, STREAM_ID, and CPU can + additionally be included in + .RB non- PERF_RECORD_SAMPLE s + if the corresponding + .I sample_type + is selected. ++.IP ++If ++.B PERF_SAMPLE_IDENTIFIER ++is specified, then an additional ID value is included ++as the last value to ease parsing the record stream. ++This may lead to the ++.I id ++value appearing twice. ++.IP ++The layout is described by this pseudo-structure: ++.IP ++.in +4n ++.EX ++struct sample_id { ++ { u32 pid, tid; } /* if PERF_SAMPLE_TID set */ ++ { u64 time; } /* if PERF_SAMPLE_TIME set */ ++ { u64 id; } /* if PERF_SAMPLE_ID set */ ++ { u64 stream_id;} /* if PERF_SAMPLE_STREAM_ID set */ ++ { u32 cpu, res; } /* if PERF_SAMPLE_CPU set */ ++ { u64 id; } /* if PERF_SAMPLE_IDENTIFIER set */ ++}; ++.EE ++.in + .TP +-.IR "exclude_host" " (Since Linux 3.2)" +-Do not measure time spent in VM host +-.TP +-.IR "exclude_guest" " (Since Linux 3.2)" +-Do not measure time spent in VM guest +-.TP +-.IR "exclude_callchain_kernel" " (Since Linux 3.7)" ++.IR "exclude_host" " (since Linux 3.2)" ++.\" commit a240f76165e6255384d4bdb8139895fac7988799 ++When conducting measurements that include processes running ++VM instances (i.e., have executed a ++.B KVM_RUN ++.BR ioctl (2)), ++only measure events happening inside a guest instance. ++This is only meaningful outside the guests; this setting does ++not change counts gathered inside of a guest. ++Currently, this functionality is x86 only. ++.TP ++.IR "exclude_guest" " (since Linux 3.2)" ++.\" commit a240f76165e6255384d4bdb8139895fac7988799 ++When conducting measurements that include processes running ++VM instances (i.e., have executed a ++.B KVM_RUN ++.BR ioctl (2)), ++do not measure events happening inside guest instances. ++This is only meaningful outside the guests; this setting does ++not change counts gathered inside of a guest. ++Currently, this functionality is x86 only. ++.TP ++.IR "exclude_callchain_kernel" " (since Linux 3.7)" ++.\" commit d077526485d5c9b12fe85d0b2b3b7041e6bc5f91 + Do not include kernel callchains. + .TP +-.IR "exclude_callchain_user" " (Since Linux 3.7)" ++.IR "exclude_callchain_user" " (since Linux 3.7)" ++.\" commit d077526485d5c9b12fe85d0b2b3b7041e6bc5f91 + Do not include user callchains. + .TP ++.IR "mmap2" " (since Linux 3.16)" ++.\" commit 13d7a2410fa637f450a29ecb515ac318ee40c741 ++.\" This is tricky; was committed during 3.12 development ++.\" but right before release was disabled. ++.\" So while you could select mmap2 starting with 3.12 ++.\" it did not work until 3.16 ++.\" commit a5a5ba72843dd05f991184d6cb9a4471acce1005 ++Generate an extended executable mmap record that contains enough ++additional information to uniquely identify shared mappings. ++The ++.I mmap ++flag must also be set for this to work. ++.TP ++.IR "comm_exec" " (since Linux 3.16)" ++.\" commit 82b897782d10fcc4930c9d4a15b175348fdd2871 ++This is purely a feature-detection flag, it does not change ++kernel behavior. ++If this flag can successfully be set, then, when ++.I comm ++is enabled, the ++.B PERF_RECORD_MISC_COMM_EXEC ++flag will be set in the ++.I misc ++field of a comm record header if the rename event being ++reported was caused by a call to ++.BR exec (2). ++This allows tools to distinguish between the various ++types of process renaming. ++.TP ++.IR "use_clockid" " (since Linux 4.1)" ++.\" commit 34f439278cef7b1177f8ce24f9fc81dfc6221d3b ++This allows selecting which internal Linux clock to use ++when generating timestamps via the ++.I clockid ++field. ++This can make it easier to correlate perf sample times with ++timestamps generated by other tools. ++.TP ++.IR "context_switch" " (since Linux 4.3)" ++.\" commit 45ac1403f564f411c6a383a2448688ba8dd705a4 ++This enables the generation of ++.B PERF_RECORD_SWITCH ++records when a context switch occurs. ++It also enables the generation of ++.B PERF_RECORD_SWITCH_CPU_WIDE ++records when sampling in CPU-wide mode. ++This functionality is in addition to existing tracepoint and ++software events for measuring context switches. ++The advantage of this method is that it will give full ++information even with strict ++.I perf_event_paranoid ++settings. ++.TP + .IR "wakeup_events" ", " "wakeup_watermark" + This union sets how many samples + .RI ( wakeup_events ) + or bytes + .RI ( wakeup_watermark ) +-happen before an overflow signal happens. ++happen before an overflow notification happens. + Which one is used is selected by the + .I watermark +-bitflag. +- ++bit flag. ++.IP + .I wakeup_events +-only counts ++counts only + .B PERF_RECORD_SAMPLE + record types. +-To receive a signal for every incoming ++To receive overflow notification for all + .B PERF_RECORD +-type set ++types choose watermark and set + .I wakeup_watermark + to 1. ++.IP ++Prior to Linux 3.0, setting ++.\" commit f506b3dc0ec454a16d40cab9ee5d75435b39dc50 ++.I wakeup_events ++to 0 resulted in no overflow notifications; ++more recent kernels treat 0 the same as 1. + .TP +-.IR "bp_type" " (Since Linux 2.6.33)" ++.IR "bp_type" " (since Linux 2.6.33)" ++.\" commit 24f1e32c60c45c89a997c73395b69c8af6f0a84e + This chooses the breakpoint type. + It is one of: + .RS + .TP + .BR HW_BREAKPOINT_EMPTY +-no breakpoint ++No breakpoint. + .TP + .BR HW_BREAKPOINT_R +-count when we read the memory location ++Count when we read the memory location. + .TP + .BR HW_BREAKPOINT_W +-count when we write the memory location ++Count when we write the memory location. + .TP + .BR HW_BREAKPOINT_RW +-count when we read or write the memory location ++Count when we read or write the memory location. + .TP + .BR HW_BREAKPOINT_X +-count when we execute code at the memory location +-.LP ++Count when we execute code at the memory location. ++.PP + The values can be combined via a bitwise or, but the + combination of + .B HW_BREAKPOINT_R +@@ -929,21 +1243,23 @@ with + is not allowed. + .RE + .TP +-.IR "bp_addr" " (Since Linux 2.6.33)" +-.I bp_addr +-address of the breakpoint. +-For execution breakpoints this is the memory address of the instruction +-of interest; for read and write breakpoints it is the memory address ++.IR "bp_addr" " (since Linux 2.6.33)" ++.\" commit 24f1e32c60c45c89a997c73395b69c8af6f0a84e ++This is the address of the breakpoint. ++For execution breakpoints, this is the memory address of the instruction ++of interest; for read and write breakpoints, it is the memory address + of the memory location of interest. + .TP +-.IR "config1" " (Since Linux 2.6.39)" ++.IR "config1" " (since Linux 2.6.39)" ++.\" commit a7e3ed1e470116c9d12c2f778431a481a6be8ab6 + .I config1 + is used for setting events that need an extra register or otherwise + do not fit in the regular config field. + Raw OFFCORE_EVENTS on Nehalem/Westmere/SandyBridge use this field +-on 3.3 and later kernels. ++on Linux 3.3 and later kernels. + .TP +-.IR "bp_len" " (Since Linux 2.6.33)" ++.IR "bp_len" " (since Linux 2.6.33)" ++.\" commit 24f1e32c60c45c89a997c73395b69c8af6f0a84e + .I bp_len + is the length of the breakpoint being measured if + .I type +@@ -953,100 +1269,167 @@ Options are + .BR HW_BREAKPOINT_LEN_1 , + .BR HW_BREAKPOINT_LEN_2 , + .BR HW_BREAKPOINT_LEN_4 , ++and + .BR HW_BREAKPOINT_LEN_8 . + For an execution breakpoint, set this to + .IR sizeof(long) . + .TP +-.IR "config2" " (Since Linux 2.6.39)" +- ++.IR "config2" " (since Linux 2.6.39)" ++.\" commit a7e3ed1e470116c9d12c2f778431a481a6be8ab6 + .I config2 + is a further extension of the + .I config1 + field. + .TP +-.IR "branch_sample_type" " (Since Linux 3.4)" ++.IR "branch_sample_type" " (since Linux 3.4)" ++.\" commit bce38cd53e5ddba9cb6d708c4ef3d04a4016ec7e + If + .B PERF_SAMPLE_BRANCH_STACK + is enabled, then this specifies what branches to include + in the branch record. ++.IP ++The first part of the value is the privilege level, which ++is a combination of one of the values listed below. + If the user does not set privilege level explicitly, the kernel + will use the event's privilege level. + Event and branch privilege levels do not have to match. +-The value is formed by ORing together zero or more of the following values, +-although +-.B PERF_SAMPLE_BRANCH_ANY +-covers all branch types. + .RS + .TP + .B PERF_SAMPLE_BRANCH_USER +-Branch target is in user space ++Branch target is in user space. + .TP + .B PERF_SAMPLE_BRANCH_KERNEL +-Branch target is in kernel space ++Branch target is in kernel space. + .TP + .B PERF_SAMPLE_BRANCH_HV +-Branch target is in hypervisor ++Branch target is in hypervisor. ++.TP ++.B PERF_SAMPLE_BRANCH_PLM_ALL ++A convenience value that is the three preceding values ORed together. ++.PP ++In addition to the privilege value, at least one or more of the ++following bits must be set. + .TP + .B PERF_SAMPLE_BRANCH_ANY + Any branch type. + .TP + .B PERF_SAMPLE_BRANCH_ANY_CALL +-Any call branch ++Any call branch (includes direct calls, indirect calls, and far jumps). + .TP +-.B PERF_SAMPLE_BRANCH_ANY_RETURN +-Any return branch ++.B PERF_SAMPLE_BRANCH_IND_CALL ++Indirect calls. + .TP +-.BR PERF_SAMPLE_BRANCH_IND_CALL +-Indirect calls ++.BR PERF_SAMPLE_BRANCH_CALL " (since Linux 4.4)" ++.\" commit c229bf9dc179d2023e185c0f705bdf68484c1e73 ++Direct calls. + .TP +-.BR PERF_SAMPLE_BRANCH_PLM_ALL +-User, kernel, and hv ++.B PERF_SAMPLE_BRANCH_ANY_RETURN ++Any return branch. ++.TP ++.BR PERF_SAMPLE_BRANCH_IND_JUMP " (since Linux 4.2)" ++.\" commit c9fdfa14c3792c0160849c484e83aa57afd80ccc ++Indirect jumps. ++.TP ++.BR PERF_SAMPLE_BRANCH_COND " (since Linux 3.16)" ++.\" commit bac52139f0b7ab31330e98fd87fc5a2664951050 ++Conditional branches. ++.TP ++.BR PERF_SAMPLE_BRANCH_ABORT_TX " (since Linux 3.11)" ++.\" commit 135c5612c460f89657c4698fe2ea753f6f667963 ++Transactional memory aborts. ++.TP ++.BR PERF_SAMPLE_BRANCH_IN_TX " (since Linux 3.11)" ++.\" commit 135c5612c460f89657c4698fe2ea753f6f667963 ++Branch in transactional memory transaction. ++.TP ++.BR PERF_SAMPLE_BRANCH_NO_TX " (since Linux 3.11)" ++.\" commit 135c5612c460f89657c4698fe2ea753f6f667963 ++Branch not in transactional memory transaction. ++.BR PERF_SAMPLE_BRANCH_CALL_STACK " (since Linux 4.1)" ++.\" commit 2c44b1936bb3b135a3fac8b3493394d42e51cf70 ++Branch is part of a hardware-generated call stack. ++This requires hardware support, currently only found ++on Intel x86 Haswell or newer. + .RE + .TP +-.IR "sample_regs_user" " (Since Linux 3.7)" +-This bitmask defines the set of user CPU registers to dump on samples. +-The layout of the register mask is architecture specific and +-described in the kernel header ++.IR "sample_regs_user" " (since Linux 3.7)" ++.\" commit 4018994f3d8785275ef0e7391b75c3462c029e56 ++This bit mask defines the set of user CPU registers to dump on samples. ++The layout of the register mask is architecture-specific and ++is described in the kernel header file + .IR arch/ARCH/include/uapi/asm/perf_regs.h . + .TP +-.IR "sample_stack_user" " (Since Linux 3.7)" ++.IR "sample_stack_user" " (since Linux 3.7)" ++.\" commit c5ebcedb566ef17bda7b02686e0d658a7bb42ee7 + This defines the size of the user stack to dump if + .B PERF_SAMPLE_STACK_USER + is specified. ++.TP ++.IR "clockid" " (since Linux 4.1)" ++.\" commit 34f439278cef7b1177f8ce24f9fc81dfc6221d3b ++If ++.I use_clockid ++is set, then this field selects which internal Linux timer to ++use for timestamps. ++The available timers are defined in ++.IR linux/time.h , ++with ++.BR CLOCK_MONOTONIC , ++.BR CLOCK_MONOTONIC_RAW , ++.BR CLOCK_REALTIME , ++.BR CLOCK_BOOTTIME , ++and ++.B CLOCK_TAI ++currently supported. ++.TP ++.IR "aux_watermark" " (since Linux 4.1)" ++.\" commit 1a5941312414c71dece6717da9a0fa1303127afa ++This specifies how much data is required to trigger a ++.B PERF_RECORD_AUX ++sample. ++.TP ++.IR "sample_max_stack" " (since Linux 4.8)" ++.\" commit 97c79a38cd454602645f0470ffb444b3b75ce574 ++When ++.I sample_type ++includes ++.BR PERF_SAMPLE_CALLCHAIN , ++this field specifies how many stack frames to report when ++generating the callchain. + .SS Reading results + Once a + .BR perf_event_open () +-file descriptor has been opened, the values ++file descriptor has been opened, the values + of the events can be read from the file descriptor. + The values that are there are specified by the + .I read_format + field in the + .I attr + structure at open time. +- ++.PP + If you attempt to read into a buffer that is not big enough to hold the +-data ++data, the error + .B ENOSPC +-is returned +- ++results. ++.PP + Here is the layout of the data returned by a read: + .IP * 2 + If + .B PERF_FORMAT_GROUP + was specified to allow reading all events in a group at once: +- ++.IP + .in +4n +-.nf ++.EX + struct read_format { + u64 nr; /* The number of events */ + u64 time_enabled; /* if PERF_FORMAT_TOTAL_TIME_ENABLED */ + u64 time_running; /* if PERF_FORMAT_TOTAL_TIME_RUNNING */ +- struct ++ struct { + u64 value; /* The value of the event */ + u64 id; /* if PERF_FORMAT_ID */ + } values[nr]; + }; +-.fi ++.EE + .in + .IP * + If +@@ -1054,33 +1437,33 @@ If + was + .I not + specified: +- ++.IP + .in +4n +-.nf ++.EX + struct read_format { + u64 value; /* The value of the event */ + u64 time_enabled; /* if PERF_FORMAT_TOTAL_TIME_ENABLED */ + u64 time_running; /* if PERF_FORMAT_TOTAL_TIME_RUNNING */ + u64 id; /* if PERF_FORMAT_ID */ + }; +-.fi ++.EE + .in + .PP + The values read are as follows: + .TP + .I nr + The number of events in this file descriptor. +-Only available if ++Available only if + .B PERF_FORMAT_GROUP + was specified. + .TP + .IR time_enabled ", " time_running + Total time the event was enabled and running. +-Normally these are the same. +-If more events are started +-than available counter slots on the PMU, then multiplexing ++Normally these values are the same. ++If more events are started, ++then available counter slots on the PMU, then multiplexing + happens and events run only part of the time. +-In that case the ++In that case, the + .I time_enabled + and + .I time running +@@ -1090,7 +1473,7 @@ values can be used to scale an estimated value for the count. + An unsigned 64-bit value containing the counter result. + .TP + .I id +-A globally unique value for this particular event, only there if ++A globally unique value for this particular event; only present if + .B PERF_FORMAT_ID + was specified in + .IR read_format . +@@ -1104,45 +1487,57 @@ mmap tracking) + are logged into a ring-buffer. + This ring-buffer is created and accessed through + .BR mmap (2). +- ++.PP + The mmap size should be 1+2^n pages, where the first page is a + metadata page + .RI ( "struct perf_event_mmap_page" ) + that contains various + bits of information such as where the ring-buffer head is. +- +-Before kernel 2.6.39, there is a bug that means you must allocate a mmap ++.PP ++Before kernel 2.6.39, there is a bug that means you must allocate an mmap + ring buffer when sampling even if you do not plan to access it. +- ++.PP + The structure of the first metadata mmap page is as follows: +- ++.PP + .in +4n +-.nf ++.EX + struct perf_event_mmap_page { +- __u32 version; /* version number of this structure */ +- __u32 compat_version; /* lowest version this is compat with */ +- __u32 lock; /* seqlock for synchronization */ +- __u32 index; /* hardware counter identifier */ +- __s64 offset; /* add to hardware counter value */ +- __u64 time_enabled; /* time event active */ +- __u64 time_running; /* time event on CPU */ ++ __u32 version; /* version number of this structure */ ++ __u32 compat_version; /* lowest version this is compat with */ ++ __u32 lock; /* seqlock for synchronization */ ++ __u32 index; /* hardware counter identifier */ ++ __s64 offset; /* add to hardware counter value */ ++ __u64 time_enabled; /* time event active */ ++ __u64 time_running; /* time event on CPU */ + union { + __u64 capabilities; +- __u64 cap_usr_time : 1, +- cap_usr_rdpmc : 1, ++ struct { ++ __u64 cap_usr_time / cap_usr_rdpmc / cap_bit0 : 1, ++ cap_bit0_is_deprecated : 1, ++ cap_user_rdpmc : 1, ++ cap_user_time : 1, ++ cap_user_time_zero : 1, ++ }; + }; +- __u16 pmc_width; +- __u16 time_shift; +- __u32 time_mult; +- __u64 time_offset; +- __u64 __reserved[120]; /* Pad to 1k */ +- __u64 data_head; /* head in the data section */ +- __u64 data_tail; /* user-space written tail */ ++ __u16 pmc_width; ++ __u16 time_shift; ++ __u32 time_mult; ++ __u64 time_offset; ++ __u64 __reserved[120]; /* Pad to 1 k */ ++ __u64 data_head; /* head in the data section */ ++ __u64 data_tail; /* user-space written tail */ ++ __u64 data_offset; /* where the buffer starts */ ++ __u64 data_size; /* data buffer size */ ++ __u64 aux_head; ++ __u64 aux_tail; ++ __u64 aux_offset; ++ __u64 aux_size; ++ + } +-.fi ++.EE + .in +- +-The following looks at the fields in the ++.PP ++The following list describes the fields in the + .I perf_event_mmap_page + structure in more detail: + .TP +@@ -1159,8 +1554,9 @@ A seqlock for synchronization. + A unique hardware counter identifier. + .TP + .I offset +-.\" FIXME clarify +-Add this to hardware counter value?? ++When using rdpmc for reads this offset value ++must be added to the one returned by rdpmc to get ++the current total event count. + .TP + .I time_enabled + Time the event was active. +@@ -1168,20 +1564,56 @@ Time the event was active. + .I time_running + Time the event was running. + .TP ++.IR cap_usr_time " / " cap_usr_rdpmc " / " cap_bit0 " (since Linux 3.4)" ++.\" commit c7206205d00ab375839bd6c7ddb247d600693c09 ++There was a bug in the definition of + .I cap_usr_time +-User time capability +-.TP ++and ++.I cap_usr_rdpmc ++from Linux 3.4 until Linux 3.11. ++Both bits were defined to point to the same location, so it was ++impossible to know if ++.I cap_usr_time ++or ++.I cap_usr_rdpmc ++were actually set. ++.IP ++Starting with Linux 3.12, these are renamed to ++.\" commit fa7315871046b9a4c48627905691dbde57e51033 ++.I cap_bit0 ++and you should use the ++.I cap_user_time ++and ++.I cap_user_rdpmc ++fields instead. ++.TP ++.IR cap_bit0_is_deprecated " (since Linux 3.12)" ++.\" commit fa7315871046b9a4c48627905691dbde57e51033 ++If set, this bit indicates that the kernel supports ++the properly separated ++.I cap_user_time ++and ++.I cap_user_rdpmc ++bits. ++.IP ++If not-set, it indicates an older kernel where ++.I cap_usr_time ++and + .I cap_usr_rdpmc ++map to the same bit and thus both features should ++be used with caution. ++.TP ++.IR cap_user_rdpmc " (since Linux 3.12)" ++.\" commit fa7315871046b9a4c48627905691dbde57e51033 + If the hardware supports user-space read of performance counters + without syscall (this is the "rdpmc" instruction on x86), then + the following code can be used to do a read: +- ++.IP + .in +4n +-.nf ++.EX + u32 seq, time_mult, time_shift, idx, width; + u64 count, enabled, running; + u64 cyc, time_offset; +-s64 pmc = 0; + + do { + seq = pc\->lock; +@@ -1201,45 +1633,59 @@ do { + + if (pc\->cap_usr_rdpmc && idx) { + width = pc\->pmc_width; +- pmc = rdpmc(idx \- 1); ++ count += rdpmc(idx \- 1); + } + + barrier(); + } while (pc\->lock != seq); +-.fi ++.EE + .in + .TP ++.IR cap_user_time " (since Linux 3.12)" ++.\" commit fa7315871046b9a4c48627905691dbde57e51033 ++This bit indicates the hardware has a constant, nonstop ++timestamp counter (TSC on x86). ++.TP ++.IR cap_user_time_zero " (since Linux 3.12)" ++.\" commit fa7315871046b9a4c48627905691dbde57e51033 ++Indicates the presence of ++.I time_zero ++which allows mapping timestamp values to ++the hardware clock. ++.TP + .I pmc_width + If + .IR cap_usr_rdpmc , + this field provides the bit-width of the value + read using the rdpmc or equivalent instruction. + This can be used to sign extend the result like: +- ++.IP + .in +4n +-.nf ++.EX + pmc <<= 64 \- pmc_width; + pmc >>= 64 \- pmc_width; // signed shift right + count += pmc; +-.fi ++.EE + .in + .TP + .IR time_shift ", " time_mult ", " time_offset +- ++.IP + If + .IR cap_usr_time , + these fields can be used to compute the time +-delta since time_enabled (in nanoseconds) using rdtsc or similar. ++delta since ++.I time_enabled ++(in nanoseconds) using rdtsc or similar. ++.IP + .nf +- + u64 quot, rem; + u64 delta; + quot = (cyc >> time_shift); +- rem = cyc & ((1 << time_shift) \- 1); ++ rem = cyc & (((u64)1 << time_shift) \- 1); + delta = time_offset + quot * time_mult + + ((rem * time_mult) >> time_shift); + .fi +- ++.IP + Where + .IR time_offset , + .IR time_mult , +@@ -1250,8 +1696,8 @@ are read in the + seqcount loop described above. + This delta can then be added to + enabled and possible running (if idx), improving the scaling: ++.IP + .nf +- + enabled += delta; + if (idx) + running += delta; +@@ -1260,25 +1706,102 @@ enabled and possible running (if idx), improving the scaling: + count = quot * enabled + (rem * enabled) / running; + .fi + .TP ++.IR time_zero " (since Linux 3.12)" ++.\" commit fa7315871046b9a4c48627905691dbde57e51033 ++.IP ++If ++.I cap_usr_time_zero ++is set, then the hardware clock (the TSC timestamp counter on x86) ++can be calculated from the ++.IR time_zero ", " time_mult ", and " time_shift " values:" ++.IP ++.nf ++ time = timestamp - time_zero; ++ quot = time / time_mult; ++ rem = time % time_mult; ++ cyc = (quot << time_shift) + (rem << time_shift) / time_mult; ++.fi ++.IP ++And vice versa: ++.IP ++.nf ++ quot = cyc >> time_shift; ++ rem = cyc & (((u64)1 << time_shift) - 1); ++ timestamp = time_zero + quot * time_mult + ++ ((rem * time_mult) >> time_shift); ++.fi ++.TP + .I data_head + This points to the head of the data section. + The value continuously increases, it does not wrap. + The value needs to be manually wrapped by the size of the mmap buffer + before accessing the samples. +- +-On SMP-capable platforms, after reading the data_head value, ++.IP ++On SMP-capable platforms, after reading the ++.I data_head ++value, + user space should issue an rmb(). + .TP +-.I data_tail; ++.I data_tail + When the mapping is + .BR PROT_WRITE , + the + .I data_tail + value should be written by user space to reflect the last read data. +-In this case the kernel will not over-write unread data. ++In this case, the kernel will not overwrite unread data. ++.TP ++.IR data_offset " (since Linux 4.1)" ++.\" commit e8c6deac69629c0cb97c3d3272f8631ef17f8f0f ++Contains the offset of the location in the mmap buffer ++where perf sample data begins. ++.TP ++.IR data_size " (since Linux 4.1)" ++.\" commit e8c6deac69629c0cb97c3d3272f8631ef17f8f0f ++Contains the size of the perf sample region within ++the mmap buffer. ++.TP ++.IR aux_head ", " aux_tail ", " aux_offset ", " aux_size " (since Linux 4.1) ++.\" commit 45bfb2e50471abbbfd83d40d28c986078b0d24ff ++The AUX region allows mmaping a separate sample buffer for ++high-bandwidth data streams (separate from the main perf sample buffer). ++An example of a high-bandwidth stream is instruction tracing support, ++as is found in newer Intel processors. ++.IP ++To set up an AUX area, first ++.I aux_offset ++needs to be set with an offset greater than ++.IR data_offset + data_size ++and ++.I aux_size ++needs to be set to the desired buffer size. ++The desired offset and size must be page aligned, and the size ++must be a power of two. ++These values are then passed to mmap in order to map the AUX buffer. ++Pages in the AUX buffer are included as part of the ++.BR RLIMIT_MEMLOCK ++resource limit (see ++.BR setrlimit (2)), ++and also as part of the ++.I perf_event_mlock_kb ++allowance. ++.IP ++By default, the AUX buffer will be truncated if it will not fit ++in the available space in the ring buffer. ++If the AUX buffer is mapped as a read only buffer, then it will ++operate in ring buffer mode where old data will be overwritten ++by new. ++In overwrite mode, it might not be possible to infer where the ++new data began, and it is the consumer's job to disable ++measurement while reading to avoid possible data races. ++.IP ++The ++.IR aux_head " and " aux_tail ++ring buffer pointers have the same behavior and ordering ++rules as the previous described ++.IR data_head " and " data_tail . + .PP + The following 2^n ring-buffer pages have the layout described below. +- ++.PP + If + .I perf_event_attr.sample_id_all + is set, then all event types will +@@ -1288,46 +1811,136 @@ an event took place (TID, TIME, ID, CPU, STREAM_ID) described in + below, it will be stashed just after the + .I perf_event_header + and the fields already present for the existing +-fields, i.e., at the end of the payload. +-That way a newer perf.data +-file will be supported by older perf tools, with these new optional ++fields, that is, at the end of the payload. ++This allows a newer perf.data ++file to be supported by older perf tools, with the new optional + fields being ignored. +- ++.PP + The mmap values start with a header: +- ++.PP + .in +4n +-.nf ++.EX + struct perf_event_header { + __u32 type; + __u16 misc; + __u16 size; + }; +-.fi ++.EE + .in +- ++.PP + Below, we describe the + .I perf_event_header + fields in more detail. ++For ease of reading, ++the fields with shorter descriptions are presented first. + .TP +-.I type ++.I size ++This indicates the size of the record. ++.TP ++.I misc + The +-.I type +-value is one of the below. +-The values in the corresponding record (that follows the header) +-depend on the +-.I type +-selected as shown. +-.RS +-.TP 4 ++.I misc ++field contains additional information about the sample. ++.IP ++The CPU mode can be determined from this value by masking with ++.B PERF_RECORD_MISC_CPUMODE_MASK ++and looking for one of the following (note these are not ++bit masks, only one can be set at a time): ++.RS ++.TP ++.B PERF_RECORD_MISC_CPUMODE_UNKNOWN ++Unknown CPU mode. ++.TP ++.B PERF_RECORD_MISC_KERNEL ++Sample happened in the kernel. ++.TP ++.B PERF_RECORD_MISC_USER ++Sample happened in user code. ++.TP ++.B PERF_RECORD_MISC_HYPERVISOR ++Sample happened in the hypervisor. ++.TP ++.BR PERF_RECORD_MISC_GUEST_KERNEL " (since Linux 2.6.35)" ++.\" commit 39447b386c846bbf1c56f6403c5282837486200f ++Sample happened in the guest kernel. ++.TP ++.B PERF_RECORD_MISC_GUEST_USER " (since Linux 2.6.35)" ++.\" commit 39447b386c846bbf1c56f6403c5282837486200f ++Sample happened in guest user code. ++.RE ++.PP ++.RS ++Since the following three statuses are generated by ++different record types, they alias to the same bit: ++.TP ++.BR PERF_RECORD_MISC_MMAP_DATA " (since Linux 3.10)" ++.\" commit 2fe85427e3bf65d791700d065132772fc26e4d75 ++This is set when the mapping is not executable; ++otherwise the mapping is executable. ++.TP ++.BR PERF_RECORD_MISC_COMM_EXEC " (since Linux 3.16)" ++.\" commit 82b897782d10fcc4930c9d4a15b175348fdd2871 ++This is set for a ++.B PERF_RECORD_COMM ++record on kernels more recent than Linux 3.16 ++if a process name change was caused by an ++.BR exec (2) ++system call. ++.TP ++.BR PERF_RECORD_MISC_SWITCH_OUT " (since Linux 4.3)" ++.\" commit 45ac1403f564f411c6a383a2448688ba8dd705a4 ++When a ++.BR PERF_RECORD_SWITCH ++or ++.BR PERF_RECORD_SWITCH_CPU_WIDE ++record is generated, this bit indicates that the ++context switch is away from the current process ++(instead of into the current process). ++.RE ++.PP ++.RS ++In addition, the following bits can be set: ++.TP ++.B PERF_RECORD_MISC_EXACT_IP ++This indicates that the content of ++.B PERF_SAMPLE_IP ++points ++to the actual instruction that triggered the event. ++See also ++.IR perf_event_attr.precise_ip . ++.TP ++.BR PERF_RECORD_MISC_EXT_RESERVED " (since Linux 2.6.35)" ++.\" commit 1676b8a077c352085d52578fb4f29350b58b6e74 ++This indicates there is extended data available (currently not used). ++.TP ++.B PERF_RECORD_MISC_PROC_MAP_PARSE_TIMEOUT ++.\" commit 930e6fcd2bcce9bcd9d4aa7e755678d33f3fe6f4 ++This bit is not set by the kernel. ++It is reserved for the user-space perf utility to indicate that ++.I /proc/i[pid]/maps ++parsing was taking too long and was stopped, and thus the mmap ++records may be truncated. ++.RE ++.TP ++.I type ++The ++.I type ++value is one of the below. ++The values in the corresponding record (that follows the header) ++depend on the ++.I type ++selected as shown. ++.RS ++.TP 4 + .B PERF_RECORD_MMAP + The MMAP events record the + .B PROT_EXEC + mappings so that we can correlate + user-space IPs to code. + They have the following structure: +- ++.IP + .in +4n +-.nf ++.EX + struct { + struct perf_event_header header; + u32 pid, tid; +@@ -1336,20 +1949,38 @@ struct { + u64 pgoff; + char filename[]; + }; +-.fi ++.EE + .in ++.RS ++.TP ++.I pid ++is the process ID. ++.TP ++.I tid ++is the thread ID. ++.TP ++.I addr ++is the address of the allocated memory. ++.I len ++is the length of the allocated memory. ++.I pgoff ++is the page offset of the allocated memory. ++.I filename ++is a string describing the backing of the allocated memory. ++.RE + .TP + .B PERF_RECORD_LOST + This record indicates when events are lost. +- ++.IP + .in +4n +-.nf ++.EX + struct { + struct perf_event_header header; +- u64 id; +- u64 lost; ++ u64 id; ++ u64 lost; ++ struct sample_id sample_id; + }; +-.fi ++.EE + .in + .RS + .TP +@@ -1362,106 +1993,140 @@ is the number of events that were lost. + .TP + .B PERF_RECORD_COMM + This record indicates a change in the process name. +- ++.IP + .in +4n +-.nf ++.EX + struct { + struct perf_event_header header; +- u32 pid, tid; +- char comm[]; ++ u32 pid; ++ u32 tid; ++ char comm[]; ++ struct sample_id sample_id; + }; +-.fi ++.EE + .in ++.RS ++.TP ++.I pid ++is the process ID. ++.TP ++.I tid ++is the thread ID. ++.TP ++.I comm ++is a string containing the new name of the process. ++.RE + .TP + .B PERF_RECORD_EXIT + This record indicates a process exit event. +- ++.IP + .in +4n +-.nf ++.EX + struct { + struct perf_event_header header; +- u32 pid, ppid; +- u32 tid, ptid; +- u64 time; ++ u32 pid, ppid; ++ u32 tid, ptid; ++ u64 time; ++ struct sample_id sample_id; + }; +-.fi ++.EE + .in + .TP + .BR PERF_RECORD_THROTTLE ", " PERF_RECORD_UNTHROTTLE + This record indicates a throttle/unthrottle event. +- ++.IP + .in +4n +-.nf ++.EX + struct { + struct perf_event_header header; +- u64 time; +- u64 id; +- u64 stream_id; ++ u64 time; ++ u64 id; ++ u64 stream_id; ++ struct sample_id sample_id; + }; +-.fi ++.EE + .in + .TP + .B PERF_RECORD_FORK + This record indicates a fork event. +- ++.IP + .in +4n +-.nf ++.EX + struct { + struct perf_event_header header; +- u32 pid, ppid; +- u32 tid, ptid; +- u64 time; ++ u32 pid, ppid; ++ u32 tid, ptid; ++ u64 time; ++ struct sample_id sample_id; + }; +-.fi ++.EE + .in + .TP + .B PERF_RECORD_READ + This record indicates a read event. +- ++.IP + .in +4n +-.nf ++.EX + struct { + struct perf_event_header header; +- u32 pid, tid; ++ u32 pid, tid; + struct read_format values; ++ struct sample_id sample_id; + }; +-.fi ++.EE + .in + .TP + .B PERF_RECORD_SAMPLE + This record indicates a sample. +- ++.IP + .in +4n +-.nf ++.EX + struct { + struct perf_event_header header; +- u64 ip; /* if PERF_SAMPLE_IP */ +- u32 pid, tid; /* if PERF_SAMPLE_TID */ +- u64 time; /* if PERF_SAMPLE_TIME */ +- u64 addr; /* if PERF_SAMPLE_ADDR */ +- u64 id; /* if PERF_SAMPLE_ID */ +- u64 stream_id; /* if PERF_SAMPLE_STREAM_ID */ +- u32 cpu, res; /* if PERF_SAMPLE_CPU */ +- u64 period; /* if PERF_SAMPLE_PERIOD */ +- struct read_format v; /* if PERF_SAMPLE_READ */ +- u64 nr; /* if PERF_SAMPLE_CALLCHAIN */ +- u64 ips[nr]; /* if PERF_SAMPLE_CALLCHAIN */ +- u32 size; /* if PERF_SAMPLE_RAW */ +- char data[size]; /* if PERF_SAMPLE_RAW */ +- u64 bnr; /* if PERF_SAMPLE_BRANCH_STACK */ ++ u64 sample_id; /* if PERF_SAMPLE_IDENTIFIER */ ++ u64 ip; /* if PERF_SAMPLE_IP */ ++ u32 pid, tid; /* if PERF_SAMPLE_TID */ ++ u64 time; /* if PERF_SAMPLE_TIME */ ++ u64 addr; /* if PERF_SAMPLE_ADDR */ ++ u64 id; /* if PERF_SAMPLE_ID */ ++ u64 stream_id; /* if PERF_SAMPLE_STREAM_ID */ ++ u32 cpu, res; /* if PERF_SAMPLE_CPU */ ++ u64 period; /* if PERF_SAMPLE_PERIOD */ ++ struct read_format v; ++ /* if PERF_SAMPLE_READ */ ++ u64 nr; /* if PERF_SAMPLE_CALLCHAIN */ ++ u64 ips[nr]; /* if PERF_SAMPLE_CALLCHAIN */ ++ u32 size; /* if PERF_SAMPLE_RAW */ ++ char data[size]; /* if PERF_SAMPLE_RAW */ ++ u64 bnr; /* if PERF_SAMPLE_BRANCH_STACK */ + struct perf_branch_entry lbr[bnr]; +- /* if PERF_SAMPLE_BRANCH_STACK */ +- u64 abi; /* if PERF_SAMPLE_REGS_USER */ +- u64 regs[weight(mask)]; +- /* if PERF_SAMPLE_REGS_USER */ +- u64 size; /* if PERF_SAMPLE_STACK_USER */ +- char data[size]; /* if PERF_SAMPLE_STACK_USER */ +- u64 dyn_size; /* if PERF_SAMPLE_STACK_USER */ +- u64 weight; /* if PERF_SAMPLE_WEIGHT */ +- u64 data_src; /* if PERF_SAMPLE_DATA_SRC */ ++ /* if PERF_SAMPLE_BRANCH_STACK */ ++ u64 abi; /* if PERF_SAMPLE_REGS_USER */ ++ u64 regs[weight(mask)]; ++ /* if PERF_SAMPLE_REGS_USER */ ++ u64 size; /* if PERF_SAMPLE_STACK_USER */ ++ char data[size]; /* if PERF_SAMPLE_STACK_USER */ ++ u64 dyn_size; /* if PERF_SAMPLE_STACK_USER && ++ size != 0 */ ++ u64 weight; /* if PERF_SAMPLE_WEIGHT */ ++ u64 data_src; /* if PERF_SAMPLE_DATA_SRC */ ++ u64 transaction; /* if PERF_SAMPLE_TRANSACTION */ ++ u64 abi; /* if PERF_SAMPLE_REGS_INTR */ ++ u64 regs[weight(mask)]; ++ /* if PERF_SAMPLE_REGS_INTR */ + }; +-.fi +-.RS ++.EE ++.RS 4 ++.TP 4 ++.I sample_id ++If ++.B PERF_SAMPLE_IDENTIFIER ++is enabled, a 64-bit unique ID is included. ++This is a duplication of the ++.B PERF_SAMPLE_ID ++.I id ++value, but included at the beginning of the sample ++so parsers can easily obtain the value. + .TP + .I ip + If +@@ -1546,7 +2211,7 @@ If + is enabled, then a 32-bit value indicating size + is included followed by an array of 8-bit values of length size. + The values are padded with 0 to have 64-bit alignment. +- ++.IP + This RAW record data is opaque with respect to the ABI. + The ABI doesn't make any promises with respect to the stability + of its content, it may vary depending +@@ -1563,39 +2228,57 @@ structures which each include the fields: + .RS + .TP + .I from +-indicating the source instruction (may not be a branch) ++This indicates the source instruction (may not be a branch). + .TP + .I to +-the branch target ++The branch target. + .TP + .I mispred +-the branch target was mispredicted ++The branch target was mispredicted. + .TP + .I predicted +-the branch target was predicted. +-.RE ++The branch target was predicted. ++.TP ++.IR in_tx " (since Linux 3.11)" ++.\" commit 135c5612c460f89657c4698fe2ea753f6f667963 ++The branch was in a transactional memory transaction. ++.TP ++.IR abort " (since Linux 3.11)" ++.\" commit 135c5612c460f89657c4698fe2ea753f6f667963 ++The branch was in an aborted transactional memory transaction. ++.TP ++.IR cycles " (since Linux 4.3)" ++.\" commit 71ef3c6b9d4665ee7afbbe4c208a98917dcfc32f ++This reports the number of cycles elapsed since the ++previous branch stack update. ++.PP + The entries are from most to least recent, so the first entry + has the most recent branch. +- ++.PP + Support for +-.I mispred ++.IR mispred , ++.IR predicted , + and +-.I predicted +-is optional; if not supported, both ++.IR cycles ++is optional; if not supported, those + values will be 0. +- ++.PP ++The type of branches recorded is specified by the ++.I branch_sample_type ++field. ++.RE + .TP + .IR abi ", " regs[weight(mask)] + If + .B PERF_SAMPLE_REGS_USER + is enabled, then the user CPU registers are recorded. +- ++.IP + The + .I abi + field is one of + .BR PERF_SAMPLE_REGS_ABI_NONE ", " PERF_SAMPLE_REGS_ABI_32 " or " + .BR PERF_SAMPLE_REGS_ABI_64 . +- ++.IP + The + .I regs + field is an array of the CPU registers that were specified by +@@ -1604,26 +2287,33 @@ the + attr field. + The number of values is the number of bits set in the + .I sample_regs_user +-bitmask. ++bit mask. + .TP + .IR size ", " data[size] ", " dyn_size + If + .B PERF_SAMPLE_STACK_USER +-is enabled, then record the user stack to enable backtracing. ++is enabled, then the user stack is recorded. ++This can be used to generate stack backtraces. + .I size + is the size requested by the user in +-.I stack_user_size ++.I sample_stack_user + or else the maximum record size. + .I data +-is the stack data. ++is the stack data (a raw dump of the memory pointed to by the ++stack pointer at the time of sampling). + .I dyn_size + is the amount of data actually dumped (can be less than + .IR size ). ++Note that ++.I dyn_size ++is omitted if ++.I size ++is 0. + .TP + .I weight + If + .B PERF_SAMPLE_WEIGHT +-is enabled, then a 64 bit value provided by the hardware ++is enabled, then a 64-bit value provided by the hardware + is recorded that indicates how costly the event was. + This allows expensive events to stand out more clearly + in profiles. +@@ -1631,211 +2321,508 @@ in profiles. + .I data_src + If + .B PERF_SAMPLE_DATA_SRC +-is enabled, then a 64 bit value is recorded that is made up of ++is enabled, then a 64-bit value is recorded that is made up of + the following fields: + .RS +-.TP ++.TP 4 + .I mem_op +-type of opcode, a bitwise combination of ++Type of opcode, a bitwise combination of: ++.IP ++.PD 0 ++.RS ++.TP 24 + .B PERF_MEM_OP_NA +-(not available), ++Not available ++.TP + .B PERF_MEM_OP_LOAD +-(load instruction), ++Load instruction ++.TP + .B PERF_MEM_OP_STORE +-(store instruction), ++Store instruction ++.TP + .B PERF_MEM_OP_PFETCH +-(prefetch), and ++Prefetch ++.TP + .B PERF_MEM_OP_EXEC +-(executable code). ++Executable code ++.RE ++.PD + .TP + .I mem_lvl +-memory hierarchy level hit or miss, a bitwise combination of ++Memory hierarchy level hit or miss, a bitwise combination of ++the following, shifted left by ++.BR PERF_MEM_LVL_SHIFT : ++.IP ++.PD 0 ++.RS ++.TP 24 + .B PERF_MEM_LVL_NA +-(not available), ++Not available ++.TP + .B PERF_MEM_LVL_HIT +-(hit), ++Hit ++.TP + .B PERF_MEM_LVL_MISS +-(miss), ++Miss ++.TP + .B PERF_MEM_LVL_L1 +-(level 1 cache), ++Level 1 cache ++.TP + .B PERF_MEM_LVL_LFB +-(line fill buffer), ++Line fill buffer ++.TP + .B PERF_MEM_LVL_L2 +-(level 2 cache), ++Level 2 cache ++.TP + .B PERF_MEM_LVL_L3 +-(level 3 cache), ++Level 3 cache ++.TP + .B PERF_MEM_LVL_LOC_RAM +-(local DRAM), ++Local DRAM ++.TP + .B PERF_MEM_LVL_REM_RAM1 +-(remote DRAM 1 hop), ++Remote DRAM 1 hop ++.TP + .B PERF_MEM_LVL_REM_RAM2 +-(remote DRAM 2 hops), ++Remote DRAM 2 hops ++.TP + .B PERF_MEM_LVL_REM_CCE1 +-(remote cache 1 hop), ++Remote cache 1 hop ++.TP + .B PERF_MEM_LVL_REM_CCE2 +-(remote cache 2 hops), ++Remote cache 2 hops ++.TP + .B PERF_MEM_LVL_IO +-(I/O memory), and ++I/O memory ++.TP + .B PERF_MEM_LVL_UNC +-(uncached memory). ++Uncached memory ++.RE ++.PD + .TP + .I mem_snoop +-snoop mode, a bitwise combination of ++Snoop mode, a bitwise combination of the following, shifted left by ++.BR PERF_MEM_SNOOP_SHIFT : ++.IP ++.PD 0 ++.RS ++.TP 24 + .B PERF_MEM_SNOOP_NA +-(not available), ++Not available ++.TP + .B PERF_MEM_SNOOP_NONE +-(no snoop), ++No snoop ++.TP + .B PERF_MEM_SNOOP_HIT +-(snoop hit), ++Snoop hit ++.TP + .B PERF_MEM_SNOOP_MISS +-(snoop miss), and ++Snoop miss ++.TP + .B PERF_MEM_SNOOP_HITM +-(snoop hit modified). ++Snoop hit modified ++.RE ++.PD + .TP + .I mem_lock +-lock instruction, a bitwise combination of ++Lock instruction, a bitwise combination of the following, shifted left by ++.BR PERF_MEM_LOCK_SHIFT : ++.IP ++.PD 0 ++.RS ++.TP 24 + .B PERF_MEM_LOCK_NA +-(not available) and ++Not available ++.TP + .B PERF_MEM_LOCK_LOCKED +-(locked transaction). ++Locked transaction ++.RE ++.PD + .TP + .I mem_dtlb +-tlb access hit or miss, a bitwise combination of ++TLB access hit or miss, a bitwise combination of the following, shifted ++left by ++.BR PERF_MEM_TLB_SHIFT : ++.IP ++.PD 0 ++.RS ++.TP 24 + .B PERF_MEM_TLB_NA +-(not available), ++Not available ++.TP + .B PERF_MEM_TLB_HIT +-(hit), ++Hit ++.TP + .B PERF_MEM_TLB_MISS +-(miss), ++Miss ++.TP + .B PERF_MEM_TLB_L1 +-(level 1 TLB), ++Level 1 TLB ++.TP + .B PERF_MEM_TLB_L2 +-(level 2 TLB), ++Level 2 TLB ++.TP + .B PERF_MEM_TLB_WK +-(hardware walker), and ++Hardware walker ++.TP + .B PERF_MEM_TLB_OS +-(OS fault handler). ++OS fault handler + .RE ++.PD + .RE ++.TP ++.I transaction ++If the ++.B PERF_SAMPLE_TRANSACTION ++flag is set, then a 64-bit field is recorded describing ++the sources of any transactional memory aborts. ++.IP ++The field is a bitwise combination of the following values: ++.RS ++.TP ++.B PERF_TXN_ELISION ++Abort from an elision type transaction (Intel-CPU-specific). ++.TP ++.B PERF_TXN_TRANSACTION ++Abort from a generic transaction. ++.TP ++.B PERF_TXN_SYNC ++Synchronous abort (related to the reported instruction). ++.TP ++.B PERF_TXN_ASYNC ++Asynchronous abort (not related to the reported instruction). ++.TP ++.B PERF_TXN_RETRY ++Retryable abort (retrying the transaction may have succeeded). ++.TP ++.B PERF_TXN_CONFLICT ++Abort due to memory conflicts with other threads. ++.TP ++.B PERF_TXN_CAPACITY_WRITE ++Abort due to write capacity overflow. ++.TP ++.B PERF_TXN_CAPACITY_READ ++Abort due to read capacity overflow. + .RE ++.IP ++In addition, a user-specified abort code can be obtained from ++the high 32 bits of the field by shifting right by ++.B PERF_TXN_ABORT_SHIFT ++and masking with the value ++.BR PERF_TXN_ABORT_MASK . + .TP +-.I misc ++.IR abi ", " regs[weight(mask)] ++If ++.B PERF_SAMPLE_REGS_INTR ++is enabled, then the user CPU registers are recorded. ++.IP + The +-.I misc +-field contains additional information about the sample. +- +-The CPU mode can be determined from this value by masking with +-.B PERF_RECORD_MISC_CPUMODE_MASK +-and looking for one of the following (note these are not +-bit masks, only one can be set at a time): ++.I abi ++field is one of ++.BR PERF_SAMPLE_REGS_ABI_NONE , ++.BR PERF_SAMPLE_REGS_ABI_32 , ++or ++.BR PERF_SAMPLE_REGS_ABI_64 . ++.IP ++The ++.I regs ++field is an array of the CPU registers that were specified by ++the ++.I sample_regs_intr ++attr field. ++The number of values is the number of bits set in the ++.I sample_regs_intr ++bit mask. ++.RE ++.TP ++.B PERF_RECORD_MMAP2 ++This record includes extended information on ++.BR mmap (2) ++calls returning executable mappings. ++The format is similar to that of the ++.B PERF_RECORD_MMAP ++record, but includes extra values that allow uniquely identifying ++shared mappings. ++.IP ++.in +4n ++.EX ++struct { ++ struct perf_event_header header; ++ u32 pid; ++ u32 tid; ++ u64 addr; ++ u64 len; ++ u64 pgoff; ++ u32 maj; ++ u32 min; ++ u64 ino; ++ u64 ino_generation; ++ u32 prot; ++ u32 flags; ++ char filename[]; ++ struct sample_id sample_id; ++}; ++.EE + .RS + .TP +-.B PERF_RECORD_MISC_CPUMODE_UNKNOWN +-Unknown CPU mode. ++.I pid ++is the process ID. + .TP +-.B PERF_RECORD_MISC_KERNEL +-Sample happened in the kernel. ++.I tid ++is the thread ID. + .TP +-.B PERF_RECORD_MISC_USER +-Sample happened in user code. ++.I addr ++is the address of the allocated memory. + .TP +-.B PERF_RECORD_MISC_HYPERVISOR +-Sample happened in the hypervisor. ++.I len ++is the length of the allocated memory. + .TP +-.B PERF_RECORD_MISC_GUEST_KERNEL +-Sample happened in the guest kernel. ++.I pgoff ++is the page offset of the allocated memory. + .TP +-.B PERF_RECORD_MISC_GUEST_USER +-Sample happened in guest user code. ++.I maj ++is the major ID of the underlying device. ++.TP ++.I min ++is the minor ID of the underlying device. ++.TP ++.I ino ++is the inode number. ++.TP ++.I ino_generation ++is the inode generation. ++.TP ++.I prot ++is the protection information. ++.TP ++.I flags ++is the flags information. ++.TP ++.I filename ++is a string describing the backing of the allocated memory. + .RE +- ++.TP ++.BR PERF_RECORD_AUX " (since Linux 4.1)" ++\" commit 68db7e98c3a6ebe7284b6cf14906ed7c55f3f7f0 ++This record reports that new data is available in the separate ++AUX buffer region. ++.IP ++.in +4n ++.EX ++struct { ++ struct perf_event_header header; ++ u64 aux_offset; ++ u64 aux_size; ++ u64 flags; ++ struct sample_id sample_id; ++}; ++.EE + .RS +-In addition, one of the following bits can be set: + .TP +-.B PERF_RECORD_MISC_MMAP_DATA +-This is set when the mapping is not executable; +-otherwise the mapping is executable. ++.I aux_offset ++offset in the AUX mmap region where the new data begins. + .TP +-.B PERF_RECORD_MISC_EXACT_IP +-This indicates that the content of +-.B PERF_SAMPLE_IP +-points +-to the actual instruction that triggered the event. +-See also +-.IR perf_event_attr.precise_ip . ++.I aux_size ++size of the data made available. + .TP +-.B PERF_RECORD_MISC_EXT_RESERVED +-This indicates there is extended data available (currently not used). ++.I flags ++describes the AUX update. ++.RS ++.TP ++.B PERF_AUX_FLAG_TRUNCATED ++if set, then the data returned was truncated to fit the available ++buffer size. ++.TP ++.B PERF_AUX_FLAG_OVERWRITE ++.\" commit 2023a0d2829e521fe6ad6b9907f3f90bfbf57142 ++if set, then the data returned has overwritten previous data. ++.RE + .RE + .TP +-.I size +-This indicates the size of the record. ++.BR PERF_RECORD_ITRACE_START " (since Linux 4.1)" ++\" ec0d7729bbaed4b9d2d3fada693278e13a3d1368 ++This record indicates which process has initiated an instruction ++trace event, allowing tools to properly correlate the instruction ++addresses in the AUX buffer with the proper executable. ++.IP ++.in +4n ++.EX ++struct { ++ struct perf_event_header header; ++ u32 pid; ++ u32 tid; ++}; ++.EE ++.RS ++.TP ++.I pid ++process ID of the thread starting an instruction trace. ++.TP ++.I tid ++thread ID of the thread starting an instruction trace. ++.RE ++.TP ++.BR PERF_RECORD_LOST_SAMPLES " (since Linux 4.2)" ++\" f38b0dbb491a6987e198aa6b428db8692a6480f8 ++When using hardware sampling (such as Intel PEBS) this record ++indicates some number of samples that may have been lost. ++.IP ++.in +4n ++.EX ++struct { ++ struct perf_event_header header; ++ u64 lost; ++ struct sample_id sample_id; ++}; ++.EE ++.RS ++.TP ++.I lost ++the number of potentially lost samples. + .RE +-.SS Signal overflow +-Events can be set to deliver a signal when a threshold is crossed. +-The signal handler is set up using the ++.TP ++.BR PERF_RECORD_SWITCH " (since Linux 4.3)" ++\" commit 45ac1403f564f411c6a383a2448688ba8dd705a4 ++This record indicates a context switch has happened. ++The ++.B PERF_RECORD_MISC_SWITCH_OUT ++bit in the ++.I misc ++field indicates whether it was a context switch into ++or away from the current process. ++.IP ++.in +4n ++.EX ++struct { ++ struct perf_event_header header; ++ struct sample_id sample_id; ++}; ++.EE ++.TP ++.BR PERF_RECORD_SWITCH_CPU_WIDE " (since Linux 4.3)" ++\" commit 45ac1403f564f411c6a383a2448688ba8dd705a4 ++As with ++.B PERF_RECORD_SWITCH ++this record indicates a context switch has happened, ++but it only occurs when sampling in CPU-wide mode ++and provides additional information on the process ++being switched to/from. ++The ++.B PERF_RECORD_MISC_SWITCH_OUT ++bit in the ++.I misc ++field indicates whether it was a context switch into ++or away from the current process. ++.IP ++.in +4n ++.EX ++struct { ++ struct perf_event_header header; ++ u32 next_prev_pid; ++ u32 next_prev_tid; ++ struct sample_id sample_id; ++}; ++.EE ++.RS ++.TP ++.I next_prev_pid ++The process ID of the previous (if switching in) ++or next (if switching out) process on the CPU. ++.TP ++.I next_prev_tid ++The thread ID of the previous (if switching in) ++or next (if switching out) thread on the CPU. ++.RE ++.RE ++.SS Overflow handling ++Events can be set to notify when a threshold is crossed, ++indicating an overflow. ++Overflow conditions can be captured by monitoring the ++event file descriptor with + .BR poll (2), + .BR select (2), +-.BR epoll (2) ++or ++.BR epoll (7). ++Alternatively, the overflow events can be captured via sa signal handler, ++by enabling I/O signaling on the file descriptor; see the discussion of the ++.BR F_SETOWN + and +-.BR fcntl (2), +-system calls. +- +-To generate signals, sampling must be enabled ++.BR F_SETSIG ++operations in ++.BR fcntl (2). ++.PP ++Overflows are generated only by sampling events + .RI ( sample_period +-must have a non-zero value). +- +-There are two ways to generate signals. +- ++must have a nonzero value). ++.PP ++There are two ways to generate overflow notifications. ++.PP + The first is to set a + .I wakeup_events + or + .I wakeup_watermark +-value that will generate a signal if a certain number of samples ++value that will trigger if a certain number of samples + or bytes have been written to the mmap ring buffer. +-In this case a signal of type ++In this case, + .B POLL_IN +-is sent. +- ++is indicated. ++.PP + The other way is by use of the + .B PERF_EVENT_IOC_REFRESH + ioctl. + This ioctl adds to a counter that decrements each time the event overflows. +-When non-zero, a ++When nonzero, + .B POLL_IN +-signal is sent on overflow, but +-once the value reaches 0, a signal is sent of type ++is indicated, but ++once the counter reaches 0 + .B POLL_HUP +-and ++is indicated and + the underlying event is disabled. +- +-Note: on newer kernels (definitely noticed with 3.2) +-.\" FIXME(Vince) : Find out when this was introduced +-a signal is provided for every overflow, even if +-.I wakeup_events +-is not set. ++.PP ++Refreshing an event group leader refreshes all siblings and ++refreshing with a parameter of 0 currently enables infinite ++refreshes; ++these behaviors are unsupported and should not be relied on. ++.\" See https://lkml.org/lkml/2011/5/24/337 ++.PP ++Starting with Linux 3.18, ++.\" commit 179033b3e064d2cd3f5f9945e76b0a0f0fbf4883 ++.B POLL_HUP ++is indicated if the event being monitored is attached to a different ++process and that process exits. + .SS rdpmc instruction + Starting with Linux 3.4 on x86, you can use the ++.\" commit c7206205d00ab375839bd6c7ddb247d600693c09 + .I rdpmc + instruction to get low-latency reads without having to enter the kernel. + Note that using + .I rdpmc + is not necessarily faster than other methods for reading event values. +- ++.PP + Support for this can be detected with the + .I cap_usr_rdpmc + field in the mmap page; documentation on how + to calculate event values can be found in that section. ++.PP ++Originally, when rdpmc support was enabled, any process (not just ones ++with an active perf event) could use the rdpmc instruction to access ++the counters. ++Starting with Linux 4.0, ++.\" 7911d3f7af14a614617e38245fedf98a724e46a9 ++rdpmc support is only allowed if an event is currently enabled ++in a process's context. ++To restore the old behavior, write the value 2 to ++.IR /sys/devices/cpu/rdpmc . + .SS perf_event ioctl calls + .PP + Various ioctls act on + .BR perf_event_open () +-file descriptors ++file descriptors: + .TP + .B PERF_EVENT_IOC_ENABLE +-Enables the individual event or event group specified by the ++This enables the individual event or event group specified by the + file descriptor argument. +- ++.IP + If the + .B PERF_IOC_FLAG_GROUP + bit is set in the ioctl argument, then all events in a group are +@@ -1843,16 +2830,16 @@ enabled, even if the event specified is not the group leader + (but see BUGS). + .TP + .B PERF_EVENT_IOC_DISABLE +-Disables the individual counter or event group specified by the ++This disables the individual counter or event group specified by the + file descriptor argument. +- ++.IP + Enabling or disabling the leader of a group enables or disables the + entire group; that is, while the group leader is disabled, none of the + counters in the group will count. + Enabling or disabling a member of a group other than the leader + affects only that counter; disabling a non-leader + stops that counter from counting but doesn't affect any other counter. +- ++.IP + If the + .B PERF_IOC_FLAG_GROUP + bit is set in the ioctl argument, then all events in a group are +@@ -1865,11 +2852,11 @@ to enable a counter for a number of overflows specified by the argument, + after which it is disabled. + Subsequent calls of this ioctl add the argument value to the current + count. +-A signal with ++An overflow notification with + .B POLL_IN + set will happen on each overflow until the +-count reaches 0; when that happens a signal with +-POLL_HUP ++count reaches 0; when that happens a notification with ++.B POLL_HUP + set is sent and the event is disabled. + Using an argument of 0 is considered undefined behavior. + .TP +@@ -1882,7 +2869,7 @@ multiplexing + or + .I time_running + values. +- ++.IP + If the + .B PERF_IOC_FLAG_GROUP + bit is set in the ioctl argument, then all events in a group are +@@ -1890,63 +2877,168 @@ reset, even if the event specified is not the group leader + (but see BUGS). + .TP + .B PERF_EVENT_IOC_PERIOD +-IOC_PERIOD is the command to update the period; it +-does not update the current period but instead defers until next. +- ++This updates the overflow period for the event. ++.IP ++Since Linux 3.7 (on ARM) ++.\" commit 3581fe0ef37ce12ac7a4f74831168352ae848edc ++and Linux 3.14 (all other architectures), ++.\" commit bad7192b842c83e580747ca57104dd51fe08c223 ++the new period takes effect immediately. ++On older kernels, the new period did not take effect until ++after the next overflow. ++.IP + The argument is a pointer to a 64-bit value containing the + desired new period. ++.IP ++Prior to Linux 2.6.36, ++.\" commit ad0cf3478de8677f720ee06393b3147819568d6a ++this ioctl always failed due to a bug ++in the kernel. + .TP + .B PERF_EVENT_IOC_SET_OUTPUT + This tells the kernel to report event notifications to the specified + file descriptor rather than the default one. + The file descriptors must all be on the same CPU. +- ++.IP + The argument specifies the desired file descriptor, or \-1 if + output should be ignored. + .TP +-.BR PERF_EVENT_IOC_SET_FILTER " (Since Linux 2.6.33)" ++.BR PERF_EVENT_IOC_SET_FILTER " (since Linux 2.6.33)" ++.\" commit 6fb2915df7f0747d9044da9dbff5b46dc2e20830 + This adds an ftrace filter to this event. +- ++.IP + The argument is a pointer to the desired ftrace filter. +-.SS Using prctl +-A process can enable or disable all the event groups that are +-attached to it using the ++.TP ++.BR PERF_EVENT_IOC_ID " (since Linux 3.12)" ++.\" commit cf4957f17f2a89984915ea808876d9c82225b862 ++This returns the event ID value for the given event file descriptor. ++.IP ++The argument is a pointer to a 64-bit unsigned integer ++to hold the result. ++.TP ++.BR PERF_EVENT_IOC_SET_BPF " (since Linux 4.1)" ++.\" commit 2541517c32be2531e0da59dfd7efc1ce844644f5 ++This allows attaching a Berkeley Packet Filter (BPF) ++program to an existing kprobe tracepoint event. ++You need ++.B CAP_SYS_ADMIN ++privileges to use this ioctl. ++.IP ++The argument is a BPF program file descriptor that was created by ++a previous ++.BR bpf (2) ++system call. ++.TP ++.BR PERF_EVENT_IOC_PAUSE_OUTPUT " (since Linux 4.7)" ++.\" commit 86e7972f690c1017fd086cdfe53d8524e68c661c ++This allows pausing and resuming the event's ring-buffer. ++A paused ring-buffer does not prevent generation of samples, ++but simply discards them. ++The discarded samples are considered lost, and cause a ++.BR PERF_RECORD_LOST ++sample to be generated when possible. ++An overflow signal may still be triggered by the discarded sample ++even though the ring-buffer remains empty. ++.IP ++The argument is an unsigned 32-bit integer. ++A nonzero value pauses the ring-buffer, while a ++zero value resumes the ring-buffer. ++.TP ++.BR PERF_EVENT_MODIFY_ATTRIBUTES " (since Linux 4.17)" ++.\" commit 32ff77e8cc9e66cc4fb38098f64fd54cc8f54573 ++This allows modifying an existing event without the overhead ++of closing and reopening a new event. ++Currently this is supported only for breakpoint events. ++.IP ++The argument is a pointer to a ++.I perf_event_attr ++structure containing the updated event settings. ++.TP ++.BR PERF_EVENT_IOC_QUERY_BPF " (since Linux 4.16)" ++.\" commit f371b304f12e31fe30207c41ca7754564e0ea4dc ++This allows querying which Berkeley Packet Filter (BPF) ++programs are attached to an existing kprobe tracepoint. ++You can only attach one BPF program per event, but you can ++have multiple events attached to a tracepoint. ++Querying this value on one tracepoint event returns the id ++of all BPF programs in all events attached to the tracepoint. ++You need ++.B CAP_SYS_ADMIN ++privileges to use this ioctl. ++.IP ++The argument is a pointer to a structure ++.in +4n ++.EX ++struct perf_event_query_bpf { ++ __u32 ids_len; ++ __u32 prog_cnt; ++ __u32 ids[0]; ++}; ++.EE ++.IP ++The ++.I ids_len ++field indicates the number of ids that can fit in the provided ++.I ids ++array. ++The ++.I prog_cnt ++value is filled in by the kernel with the number of attached ++BPF programs. ++The ++.I ids ++array is filled with the id of each attached BPF program. ++If there are more programs than will fit in the array, then the ++kernel will return ++.B ENOSPC ++and ++.I ids_len ++will indicate the number of program IDs that were successfully copied. ++.\" ++.SS Using prctl(2) ++A process can enable or disable all currently open event groups ++using the + .BR prctl (2) + .B PR_TASK_PERF_EVENTS_ENABLE + and + .B PR_TASK_PERF_EVENTS_DISABLE + operations. +-This applies to all counters on the current process, whether created by +-this process or by another, and does not affect any counters that this +-process has created on other processes. +-It enables or disables only +-the group leaders, not any other members in the groups. ++This applies only to events created locally by the calling process. ++This does not apply to events created by other processes attached ++to the calling process or inherited events from a parent process. ++Only group leaders are enabled and disabled, ++not any other members of the groups. + .SS perf_event related configuration files ++.PP + Files in + .I /proc/sys/kernel/ + .RS 4 + .TP + .I /proc/sys/kernel/perf_event_paranoid +- + The + .I perf_event_paranoid + file can be set to restrict access to the performance counters. +- +-2 - only allow user-space measurements +- +-1 - (default) allow both kernel and user measurements +- +-0 - allow access to CPU-specific data but not raw tracepoint samples +- +-\-1 - no restrictions +- ++.IP ++.PD 0 ++.RS ++.IP 2 4 ++allow only user-space measurements (default since Linux 4.6). ++.\" default changed in commit 0161028b7c8aebef64194d3d73e43bc3b53b5c66 ++.IP 1 ++allow both kernel and user measurements (default before Linux 4.6). ++.IP 0 ++allow access to CPU-specific data but not raw tracepoint samples. ++.IP \-1 ++no restrictions. ++.RE ++.PD ++.IP + The existence of the + .I perf_event_paranoid + file is the official method for determining if a kernel supports + .BR perf_event_open (). + .TP + .I /proc/sys/kernel/perf_event_max_sample_rate +- + This sets the maximum sample rate. + Setting this too high can allow + users to sample at a rate that impacts overall machine performance +@@ -1954,71 +3046,96 @@ and potentially lock up the machine. + The default value is + 100000 (samples per second). + .TP ++.I /proc/sys/kernel/perf_event_max_stack ++.\" Introduced in c5dfd78eb79851e278b7973031b9ca363da87a7e ++This file sets the maximum depth of stack frame entries reported ++when generating a call trace. ++.TP + .I /proc/sys/kernel/perf_event_mlock_kb +- +-Maximum number of pages an unprivileged user can mlock (2) . ++Maximum number of pages an unprivileged user can ++.BR mlock (2). + The default is 516 (kB). +- + .RE ++.PP + Files in + .I /sys/bus/event_source/devices/ ++.PP + .RS 4 +-Since Linux 2.6.34 the kernel supports having multiple PMUs ++Since Linux 2.6.34, the kernel supports having multiple PMUs + available for monitoring. + Information on how to program these PMUs can be found under + .IR /sys/bus/event_source/devices/ . + Each subdirectory corresponds to a different PMU. + .TP +-.IR /sys/bus/event_source/devices/*/type " (Since Linux 2.6.38)" ++.IR /sys/bus/event_source/devices/*/type " (since Linux 2.6.38)" ++.\" commit abe43400579d5de0078c2d3a760e6598e183f871 + This contains an integer that can be used in the + .I type +-field of perf_event_attr to indicate you wish to use this PMU. ++field of ++.I perf_event_attr ++to indicate that you wish to use this PMU. + .TP +-.IR /sys/bus/event_source/devices/*/rdpmc " (Since Linux 3.4)" ++.IR /sys/bus/event_source/devices/cpu/rdpmc " (since Linux 3.4)" ++.\" commit 0c9d42ed4cee2aa1dfc3a260b741baae8615744f + If this file is 1, then direct user-space access to the + performance counter registers is allowed via the rdpmc instruction. + This can be disabled by echoing 0 to the file. +-.TP +-.IR /sys/bus/event_source/devices/*/format/ " (Since Linux 3.4)" +-This sub-directory contains information on the architecture-specific +-sub-fields available for programming the various ++.IP ++As of Linux 4.0 ++.\" a66734297f78707ce39d756b656bfae861d53f62 ++.\" 7911d3f7af14a614617e38245fedf98a724e46a9 ++the behavior has changed, so that 1 now means only allow access ++to processes with active perf events, with 2 indicating the old ++allow-anyone-access behavior. ++.TP ++.IR /sys/bus/event_source/devices/*/format/ " (since Linux 3.4)" ++.\" commit 641cc938815dfd09f8fa1ec72deb814f0938ac33 ++This subdirectory contains information on the architecture-specific ++subfields available for programming the various + .I config +-fields in the perf_event_attr struct. +- ++fields in the ++.I perf_event_attr ++struct. ++.IP + The content of each file is the name of the config field, followed + by a colon, followed by a series of integer bit ranges separated by + commas. + For example, the file + .I event + may contain the value +-.I config1:1,6-10,44 +-which indicates that event is an attribute that occupies bits 1,6-10, and 44 +-of perf_event_attr::config1. ++.I config1:1,6\-10,44 ++which indicates that event is an attribute that occupies bits 1,6\(en10, and 44 ++of ++.IR perf_event_attr::config1 . + .TP +-.IR /sys/bus/event_source/devices/*/events/ " (Since Linux 3.4)" +-This sub-directory contains files with pre-defined events. ++.IR /sys/bus/event_source/devices/*/events/ " (since Linux 3.4)" ++.\" commit 641cc938815dfd09f8fa1ec72deb814f0938ac33 ++This subdirectory contains files with predefined events. + The contents are strings describing the event settings + expressed in terms of the fields found in the previously mentioned + .I ./format/ + directory. + These are not necessarily complete lists of all events supported by + a PMU, but usually a subset of events deemed useful or interesting. +- ++.IP + The content of each file is a list of attribute names + separated by commas. + Each entry has an optional value (either hex or decimal). +-If no value is specified than it is assumed to be a single-bit ++If no value is specified, then it is assumed to be a single-bit + field with a value of 1. + An example entry may look like this: +-.I event=0x2,inv,ldlat=3 ++.IR event=0x2,inv,ldlat=3 . + .TP + .I /sys/bus/event_source/devices/*/uevent + This file is the standard kernel device interface + for injecting hotplug events. + .TP +-.IR /sys/bus/event_source/devices/*/cpumask " (Since Linux 3.7)" +-The cpumask file contains a comma-separated list of integers that +-indicate a representative cpu number for each socket (package) ++.IR /sys/bus/event_source/devices/*/cpumask " (since Linux 3.7)" ++.\" commit 314d9f63f385096580e9e2a06eaa0745d92fe4ac ++The ++.I cpumask ++file contains a comma-separated list of integers that ++indicate a representative CPU number for each socket (package) + on the motherboard. + This is needed when setting up uncore or northbridge events, as + those PMUs present socket-wide events. +@@ -2030,34 +3147,172 @@ returns the new file descriptor, or \-1 if an error occurred + .I errno + is set appropriately). + .SH ERRORS ++The errors returned by ++.BR perf_event_open () ++can be inconsistent, and may ++vary across processor architectures and performance monitoring units. ++.TP ++.B E2BIG ++Returned if the ++.I perf_event_attr ++.I size ++value is too small ++(smaller than ++.BR PERF_ATTR_SIZE_VER0 ), ++too big (larger than the page size), ++or larger than the kernel supports and the extra bytes are not zero. ++When ++.B E2BIG ++is returned, the ++.I perf_event_attr ++.I size ++field is overwritten by the kernel to be the size of the structure ++it was expecting. ++.TP ++.B EACCES ++Returned when the requested event requires ++.B CAP_SYS_ADMIN ++permissions (or a more permissive perf_event paranoid setting). ++Some common cases where an unprivileged process ++may encounter this error: ++attaching to a process owned by a different user; ++monitoring all processes on a given CPU (i.e., specifying the ++.I pid ++argument as \-1); ++and not setting ++.I exclude_kernel ++when the paranoid setting requires it. ++.TP ++.B EBADF ++Returned if the ++.I group_fd ++file descriptor is not valid, or, if ++.B PERF_FLAG_PID_CGROUP ++is set, ++the cgroup file descriptor in ++.I pid ++is not valid. ++.TP ++.BR EBUSY " (since Linux 4.1)" ++.\" bed5b25ad9c8a2f5d735ef0bc746ec870c01c1b0 ++Returned if another event already has exclusive ++access to the PMU. ++.TP ++.B EFAULT ++Returned if the ++.I attr ++pointer points at an invalid memory address. + .TP + .B EINVAL +-Returned if the specified event is not available. ++Returned if the specified event is invalid. ++There are many possible reasons for this. ++A not-exhaustive list: ++.I sample_freq ++is higher than the maximum setting; ++the ++.I cpu ++to monitor does not exist; ++.I read_format ++is out of range; ++.I sample_type ++is out of range; ++the ++.I flags ++value is out of range; ++.I exclusive ++or ++.I pinned ++set and the event is not a group leader; ++the event ++.I config ++values are out of range or set reserved bits; ++the generic event selected is not supported; or ++there is not enough room to add the selected event. ++.TP ++.B EMFILE ++Each opened event uses one file descriptor. ++If a large number of events are opened, ++the per-process limit on the number of open file descriptors will be reached, ++and no more events can be created. ++.TP ++.B ENODEV ++Returned when the event involves a feature not supported ++by the current CPU. ++.TP ++.B ENOENT ++Returned if the ++.I type ++setting is not valid. ++This error is also returned for ++some unsupported generic events. + .TP + .B ENOSPC + Prior to Linux 3.3, if there was not enough room for the event, ++.\" commit aa2bc1ade59003a379ffc485d6da2d92ea3370a6 + .B ENOSPC + was returned. +-Linus did not like this, and this was changed to ++In Linux 3.3, this was changed to + .BR EINVAL . + .B ENOSPC +-is still returned if you try to read results into +-too small of a buffer. ++is still returned if you try to add more breakpoint events ++than supported by the hardware. ++.TP ++.B ENOSYS ++Returned if ++.B PERF_SAMPLE_STACK_USER ++is set in ++.I sample_type ++and it is not supported by hardware. ++.TP ++.B EOPNOTSUPP ++Returned if an event requiring a specific hardware feature is ++requested but there is no hardware support. ++This includes requesting low-skid events if not supported, ++branch tracing if it is not available, sampling if no PMU ++interrupt is available, and branch stacks for software events. ++.TP ++.BR EOVERFLOW " (since Linux 4.8)" ++.\" 97c79a38cd454602645f0470ffb444b3b75ce574 ++Returned if ++.B PERF_SAMPLE_CALLCHAIN ++is requested and ++.I sample_max_stack ++is larger than the maximum specified in ++.IR /proc/sys/kernel/perf_event_max_stack . ++.TP ++.B EPERM ++Returned on many (but not all) architectures when an unsupported ++.IR exclude_hv ", " exclude_idle ", " exclude_user ", or " exclude_kernel ++setting is specified. ++.IP ++It can also happen, as with ++.BR EACCES , ++when the requested event requires ++.B CAP_SYS_ADMIN ++permissions (or a more permissive perf_event paranoid setting). ++This includes setting a breakpoint on a kernel address, ++and (since Linux 3.13) setting a kernel function-trace tracepoint. ++.\" commit a4e95fc2cbb31d70a65beffeaf8773f881328c34 ++.TP ++.B ESRCH ++Returned if attempting to attach to a process that does not exist. + .SH VERSION + .BR perf_event_open () + was introduced in Linux 2.6.31 but was called +-.BR perf_counter_open () . ++.\" commit 0793a61d4df8daeac6492dbf8d2f3e5713caae5e ++.BR perf_counter_open (). + It was renamed in Linux 2.6.32. ++.\" commit cdd6c482c9ff9c55475ee7392ec8f672eddb7be6 + .SH CONFORMING TO + This + .BR perf_event_open () +-system call Linux- specific ++system call Linux-specific + and should not be used in programs intended to be portable. + .SH NOTES + Glibc does not provide a wrapper for this system call; call it using + .BR syscall (2). + See the example below. +- ++.PP + The official way of knowing if + .BR perf_event_open () + support is enabled is checking +@@ -2070,56 +3325,74 @@ option to + .BR fcntl (2) + is needed to properly get overflow signals in threads. + This was introduced in Linux 2.6.32. +- +-Prior to Linux 2.6.33 (at least for x86) the kernel did not check ++.\" commit ba0a6c9f6fceed11c6a99e8326f0477fe383e6b5 ++.PP ++Prior to Linux 2.6.33 (at least for x86), ++.\" commit b690081d4d3f6a23541493f1682835c3cd5c54a1 ++the kernel did not check + if events could be scheduled together until read time. + The same happens on all known kernels if the NMI watchdog is enabled. + This means to see if a given set of events works you have to + .BR perf_event_open (), + start, then read before you know for sure you + can get valid measurements. +- +-Prior to Linux 2.6.34 event constraints were not enforced by the kernel. ++.PP ++Prior to Linux 2.6.34, ++.\" FIXME . cannot find a kernel commit for this one ++event constraints were not enforced by the kernel. + In that case, some events would silently return "0" if the kernel + scheduled them in an improper counter slot. +- +-Prior to Linux 2.6.34 there was a bug when multiplexing where the ++.PP ++Prior to Linux 2.6.34, there was a bug when multiplexing where the + wrong results could be returned. +- ++.\" commit 45e16a6834b6af098702e5ea6c9a40de42ff77d8 ++.PP + Kernels from Linux 2.6.35 to Linux 2.6.39 can quickly crash the kernel if + "inherit" is enabled and many threads are started. +- ++.\" commit 38b435b16c36b0d863efcf3f07b34a6fac9873fd ++.PP + Prior to Linux 2.6.35, ++.\" commit 050735b08ca8a016bbace4445fa025b88fee770b + .B PERF_FORMAT_GROUP + did not work with attached processes. +- +-In older Linux 2.6 versions, +-refreshing an event group leader refreshed all siblings, +-and refreshing with a parameter of 0 enabled infinite refresh. +-This behavior is unsupported and should not be relied on. +- ++.PP + There is a bug in the kernel code between + Linux 2.6.36 and Linux 3.0 that ignores the + "watermark" field and acts as if a wakeup_event + was chosen if the union has a +-non-zero value in it. +- ++nonzero value in it. ++.\" commit 4ec8363dfc1451f8c8f86825731fe712798ada02 ++.PP + From Linux 2.6.31 to Linux 3.4, the + .B PERF_IOC_FLAG_GROUP + ioctl argument was broken and would repeatedly operate + on the event specified rather than iterating across + all sibling events in a group. +- ++.\" commit 724b6daa13e100067c30cfc4d1ad06629609dc4e ++.PP ++From Linux 3.4 to Linux 3.11, the mmap ++.\" commit fa7315871046b9a4c48627905691dbde57e51033 ++.I cap_usr_rdpmc ++and ++.I cap_usr_time ++bits mapped to the same location. ++Code should migrate to the new ++.I cap_user_rdpmc ++and ++.I cap_user_time ++fields instead. ++.PP + Always double-check your results! + Various generalized events have had wrong values. + For example, retired branches measured + the wrong thing on AMD machines until Linux 2.6.35. ++.\" commit f287d332ce835f77a4f5077d2c0ef1e3f9ea42d2 + .SH EXAMPLE + The following is a short example that measures the total + instruction count of a call to + .BR printf (3). +-.nf +- ++.PP ++.EX + #include + #include + #include +@@ -2128,7 +3401,7 @@ instruction count of a call to + #include + #include + +-long ++static long + perf_event_open(struct perf_event_attr *hw_event, pid_t pid, + int cpu, int group_fd, unsigned long flags) + { +@@ -2172,8 +3445,9 @@ main(int argc, char **argv) + + close(fd); + } +-.fi ++.EE + .SH SEE ALSO ++.BR perf (1), + .BR fcntl (2), + .BR mmap (2), + .BR open (2), +-- +2.17.1 + diff --git a/SOURCES/1642394-mpo-7.7.0-execve.2.patch b/SOURCES/1642394-mpo-7.7.0-execve.2.patch new file mode 100644 index 0000000..ba5e536 --- /dev/null +++ b/SOURCES/1642394-mpo-7.7.0-execve.2.patch @@ -0,0 +1,111 @@ +From f16317f50e663ac0343bc96c01496f6b94c6211c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Nikola=20Forr=C3=B3?= +Date: Mon, 26 Nov 2018 17:10:36 +0100 +Subject: [PATCH] execve.2: document EAGAIN error +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +--- + man-pages/man2/execve.2 | 78 +++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 78 insertions(+) + +diff --git a/man-pages/man2/execve.2 b/man-pages/man2/execve.2 +index 3343372..192b90a 100644 +--- a/man-pages/man2/execve.2 ++++ b/man-pages/man2/execve.2 +@@ -384,6 +384,16 @@ Execute permission is denied for the file or a script or ELF interpreter. + The file system is mounted + .IR noexec . + .TP ++.BR EAGAIN " (since Linux 3.1)" ++.\" commit 72fa59970f8698023045ab0713d66f3f4f96945c ++Having changed its real UID using one of the ++.BR set*uid () ++calls, the caller was\(emand is now still\(emabove its ++.BR RLIMIT_NPROC ++resource limit (see ++.BR setrlimit (2)). ++For a more detailed explanation of this error, see NOTES. ++.TP + .B EFAULT + .I filename + points outside your accessible address space. +@@ -530,6 +540,74 @@ command-line arguments and environment variables has changed. + .\" .BR execve () + .\" that could be exploited for denial of service by a suitably crafted + .\" ELF binary. There are no known problems with 2.0.34 or 2.2.15. ++.SS execve() and EAGAIN ++A more detailed explanation of the ++.BR EAGAIN ++error that can occur (since Linux 3.1) when calling ++.BR execve () ++is as follows. ++ ++The ++.BR EAGAIN ++error can occur when a ++.I preceding ++call to ++.BR setuid (2), ++.BR setreuid (2), ++or ++.BR setresuid (2) ++caused the real user ID of the process to change, ++and that change caused the process to exceed its ++.BR RLIMIT_NPROC ++resource limit (i.e., the number of processes belonging ++to the new real UID exceeds the resource limit). ++In Linux 3.0 and earlier, this caused the ++.BR set*uid () ++call to fail. ++ ++Since Linux 3.1, the scenario just described no longer causes the ++.BR set*uid () ++call to fail, ++because it too often led to security holes where buggy applications ++didn't check the return status and assumed ++that\(emif the caller had root privileges\(emthe call would always succeed. ++Instead, the ++.BR set*uid () ++calls now successfully change the real UID, ++but the kernel sets an internal flag, named ++.BR PF_NPROC_EXCEEDED , ++to note that the ++.BR RLIMIT_NPROC ++resource limit has been exceeded. ++If the resource limit is still exceeded at the time of a subsequent ++.BR execve () ++call, that call fails with the error ++.BR EAGAIN . ++This kernel logic ensures that the ++.BR RLIMIT_NPROC ++resource limit is still enforced for the ++common privileged daemon workflow\(emnamely, ++.BR fork (2) +++ ++.BR set*uid () +++ ++.BR execve (). ++ ++If the resource limit was not still exceeded at the time of the ++.BR execve () ++call ++(because other processes belonging to this real UID terminated between the ++.BR set*uid() ++call and the ++.BR execve () ++call), then the ++.BR execve () ++call succeeds and the kernel clears the ++.BR PF_NPROC_EXCEEDED ++process flag. ++The flag is also cleared if a subsequent call to ++.BR fork (2) ++by this process succeeds. + .SS Historical + With UNIX V6 the argument list of an + .BR exec () +-- +2.17.2 + diff --git a/SOURCES/1662503-mpo-7.7.0-resolv.conf.5.patch b/SOURCES/1662503-mpo-7.7.0-resolv.conf.5.patch new file mode 100644 index 0000000..85defcb --- /dev/null +++ b/SOURCES/1662503-mpo-7.7.0-resolv.conf.5.patch @@ -0,0 +1,29 @@ +From e8c2bbfb7eee73341ea2ae5b6e7f8bc0fa1d78cb Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Nikola=20Forr=C3=B3?= +Date: Thu, 3 Jan 2019 15:20:26 +0100 +Subject: [PATCH] resolv.conf.5: document use-vc option +--- + man-pages/man5/resolv.conf.5 | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/man-pages/man5/resolv.conf.5 b/man-pages/man5/resolv.conf.5 +index 8dc55c0..bd9371b 100644 +--- a/man-pages/man5/resolv.conf.5 ++++ b/man-pages/man5/resolv.conf.5 +@@ -269,6 +269,13 @@ as if it were a top level domain (TLD). + This option can cause problems if the site has ``localhost'' as a TLD + rather than having localhost on one or more elements of the search list. + This option has no effect if neither RES_DEFNAMES or RES_DNSRCH is set. ++.TP ++.BR use-vc " (since glibc 2.14)" ++sets ++.BR RES_USEVC ++in ++.IR _res.options . ++This option forces the usage of TCP for DNS resolutions. + .\" aef16cc8a4c670036d45590877d411a97f01e0cd + .TP + .BR no\-reload " (since glibc 2.26)" +-- +2.17.2 + diff --git a/SOURCES/1705157-mpo-7.8.0-core.5.patch b/SOURCES/1705157-mpo-7.8.0-core.5.patch new file mode 100644 index 0000000..4723c6b --- /dev/null +++ b/SOURCES/1705157-mpo-7.8.0-core.5.patch @@ -0,0 +1,28 @@ +From ae06adb134244369fb88e13c5cf81f7d495f5943 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Nikola=20Forr=C3=B3?= +Date: Thu, 8 Aug 2019 16:27:44 +0200 +Subject: [PATCH 1/6] core.5: RLIMIT_CORE is not enforced when piping core dump + to a program +--- + man-pages/man5/core.5 | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/man-pages/man5/core.5 b/man-pages/man5/core.5 +index e1f1373..59756b8 100644 +--- a/man-pages/man5/core.5 ++++ b/man-pages/man5/core.5 +@@ -218,6 +218,11 @@ the % specifiers listed above. + For example, to pass the PID of the process that is being dumped, specify + .I %p + in an argument. ++.IP * ++The ++.B RLIMIT_CORE ++limit is not enforced for core dumps that are piped to a program ++via this mechanism. + .SS Controlling which mappings are written to the core dump + Since kernel 2.6.23, the Linux-specific + .IR /proc/PID/coredump_filter +-- +2.21.0 + diff --git a/SOURCES/1730803-mpo-7.8.0-resolv.conf.5.patch b/SOURCES/1730803-mpo-7.8.0-resolv.conf.5.patch new file mode 100644 index 0000000..2b26230 --- /dev/null +++ b/SOURCES/1730803-mpo-7.8.0-resolv.conf.5.patch @@ -0,0 +1,27 @@ +From 4b3966a74c6c00f0356f14fdbffc95f80905f3d1 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Nikola=20Forr=C3=B3?= +Date: Thu, 8 Aug 2019 17:12:27 +0200 +Subject: [PATCH 3/6] resolv.conf.5: update information about search list +--- + man-pages/man5/resolv.conf.5 | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/man-pages/man5/resolv.conf.5 b/man-pages/man5/resolv.conf.5 +index 321a7e5..3364e97 100644 +--- a/man-pages/man5/resolv.conf.5 ++++ b/man-pages/man5/resolv.conf.5 +@@ -101,8 +101,10 @@ traffic if the servers for the listed domains are not local, + and that queries will time out if no server is available + for one of the domains. + .IP +-The search list is currently limited to six domains ++In glibc 2.25 and earlier, the search list is limited to six domains + with a total of 256 characters. ++.\" commit 3f853f22c87f0b671c0366eb290919719fa56c0e ++Since glibc 2.26, the search list is unlimited. + .TP + \fBsortlist\fP + This option allows addresses returned by +-- +2.21.0 + diff --git a/SOURCES/1733904-mpo-7.8.0-paperconf.1-papersize.5.patch b/SOURCES/1733904-mpo-7.8.0-paperconf.1-papersize.5.patch new file mode 100644 index 0000000..18f8ab8 --- /dev/null +++ b/SOURCES/1733904-mpo-7.8.0-paperconf.1-papersize.5.patch @@ -0,0 +1,82 @@ +From 825b33cf3e5b87b027d551094ef08324b8446dd6 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Nikola=20Forr=C3=B3?= +Date: Thu, 8 Aug 2019 17:53:28 +0200 +Subject: [PATCH 6/6] paperconf.1, papersize.5: fix grammar mistakes +--- + libpaper/man1/paperconf.1 | 14 +++++++------- + libpaper/man5/papersize.5 | 4 ++-- + 2 files changed, 9 insertions(+), 9 deletions(-) + +diff --git a/libpaper/man1/paperconf.1 b/libpaper/man1/paperconf.1 +index d455254..5e69625 100644 +--- a/libpaper/man1/paperconf.1 ++++ b/libpaper/man1/paperconf.1 +@@ -1,8 +1,8 @@ + .TH PAPERCONF 1 "24 April 2001" + .SH NAME + .B paperconf +-\- print paper configuration informations +-.SH SYNOPSYS ++\- print paper configuration information ++.SH SYNOPSIS + .B paperconf + [ + [ +@@ -38,8 +38,8 @@ + ] + .SH DESCRIPTION + .B paperconf +-prints informations about a given paper. +-The informations that can be obtaineed are the name of the paper, its ++prints information about a given paper. ++The information that can be obtained is the name of the paper, its + size and its width or height. + When called without arguments, + .B paperconf +@@ -61,7 +61,7 @@ By default, width and height of the paper are printed in PostScript points. + .BI \-p " paper" + Specify the name of the + .I paper +-about which informations are asked. ++about which information is asked. + .TP + .B \-d + Use the default builtin paper name. +@@ -89,10 +89,10 @@ Print the width of the paper. + Print the height of the paper. + .TP + .B \-c +-Use centimetres as unit for paper size. ++Use centimeters as unit for paper size. + .TP + .B \-m +-Use millimetres as unit for paper size. ++Use millimeters as unit for paper size. + .TP + .B \-i + Use inches as unit for paper size. +diff --git a/libpaper/man5/papersize.5 b/libpaper/man5/papersize.5 +index 86228e1..ab0d7ab 100644 +--- a/libpaper/man5/papersize.5 ++++ b/libpaper/man5/papersize.5 +@@ -2,7 +2,7 @@ + .SH NAME + .B papersize + \- specify preferred paper size +-.SH SYNOPSYS ++.SH SYNOPSIS + .B /etc/papersize + .SH DESCRIPTION + The +@@ -34,7 +34,7 @@ and + .PP + The value of the + .B papersize +-file can be overrideen by ++file can be overridden by + looking in order at the + .B PAPERSIZE + environment variable, then at the contents of the file specified by the +-- +2.21.0 + diff --git a/SPECS/man-pages-overrides.spec b/SPECS/man-pages-overrides.spec new file mode 100644 index 0000000..640bd19 --- /dev/null +++ b/SPECS/man-pages-overrides.spec @@ -0,0 +1,505 @@ +%global debug_package %{nil} + +Summary: Complementary and updated manual pages +Name: man-pages-overrides +Version: 7.8.1 +Release: 1%{?dist} +# license is the same as for the man-pages package +License: GPL+ and GPLv2+ and BSD and MIT and Copyright only and IEEE +Group: Documentation +# there is no public download location for this package +Source: man-pages-overrides-%{version}.tar.xz + +Patch0: 1073718-mpo-7.1.0-open.2.patch +Patch1: 1086994-mpo-7.1.0-proc.5.patch +Patch2: 1112307-mpo-7.3.0-cciss.4.patch +Patch3: 1619272-mpo-7.6.2-perf_event_open.2.patch +Patch4: 1131853-mpo-7.1.0-proc.5-proc-fs-not-empty.patch +Patch5: 1085531-mpo-7.4.0-ipvsadm.8.patch +Patch6: 1255283-mpo-7.3.0-captest.8.patch +Patch7: 1129235-mpo-7.1.0-flock.2.patch +# aarch64 specific patch +Patch8: 1361588-recv-for-aarch64.patch +Patch9: 1263575-mpo-7.3.1-libpng.3-png.5.patch +Patch10: 1263636-mpo-7.4.0-cp.1-install.1-mkdir.1-mkfifo.1-mknod.1.patch +Patch11: 1316009-mpo-7.4.0-mcstransd.8.patch +Patch12: 1131939-mpo-7.1.0-charsets.7-nl_langinfo.3.patch +Patch13: 1131859-mpo-7.1.0-host.conf.5.patch +Patch14: 1269549-mpo-7.3.0-socket.7.patch +Patch15: 1705157-mpo-7.8.0-core.5.patch +Patch16: 1278492-mpo-7.3.1-recv.2.patch +# aarch64 specific patch +Patch17: 1095371-clone-and-open-for-aarch64.patch +Patch18: 1197850-mpo-7.2.0-backport-thread-safety-information.patch +Patch19: 1120294-madvise.2-MADV_REMOVE-supports-more-filesystems.patch +Patch20: 1147718-resolv.conf.5-add-missing-no-tld-query.patch +Patch21: 1289915-mpo-7.3.0-nsswitch.conf.5.patch +Patch22: 1452424-mpo-7.4.2-stat.2.patch +Patch23: 1141874-mpo-7.2.0-mgetty-fix-typos-in-mgetty-s-man-pages.patch +Patch24: 1297898-mpo-7.3.0-prctl.2.patch +Patch25: 1222720-mpo-7.2.0-rtld-audit.7.patch +Patch26: 1312875-mpo-7.3.0-tcp.7.patch +Patch27: 1315605-mpo-7.3.1-recv.2-cmsg.3.patch +Patch28: 1330661-mpo-7.3.1-clone.2-fork.2.patch +Patch29: 1411979-mpo-7.4.0-memparse.1.patch +Patch30: 1595662-mpo-7.8.0-mmap.2.patch +Patch31: 1263629-mpo-7.3.0-cp.1-install.1-mkdir.1-mkfifo.1-mknod.1.patch +Patch32: 1263632-mpo-7.3.0-cp.1-install.1-mkdir.1-mkfifo.1-mknod.1.patch +Patch33: 1263635-mpo-7.3.0-cp.1-install.1-mkdir.1-mkfifo.1-mknod.1.patch +Patch34: 1263637-mpo-7.3.0-cp.1-install.1-mkdir.1-mkfifo.1-mknod.1.patch +Patch35: 1360898-mpo-7.3.2-prctl.2-capabilities.7.patch +Patch36: 1390935-mpo-7.4.0-nsswitch.conf.5.patch +Patch37: 1404478-mpo-7.4.0-packet.7.patch +Patch38: 1452368-mpo-7.4.2-clone.2.patch +Patch39: 1560191-mpo-7.6.0-madvise.2.patch +Patch41: 1573281-mpo-7.6.0-mlock.2-mlock2.2.patch +Patch42: 1577265-mpo-7.6.0-host.conf.5.patch +Patch43: 1437003-mpo-7.5.1-aide.1-aide.conf.5.patch +Patch44: 1422950-mpo-7.5.2-recvmmsg.2-sendmmsg.2.patch +Patch45: 1495572-mpo-7.6.0-mount.cifs.8.patch +Patch46: 1589421-mpo-7.8.0-iperf3.1.patch +Patch47: 1733904-mpo-7.8.0-paperconf.1-papersize.5.patch +Patch48: 1598288-mpo-7.6.2-resolv.conf.5.patch +Patch49: 1607318-mpo-7.6.2-proc.5.patch +Patch50: 1642394-mpo-7.7.0-execve.2.patch +Patch51: 1662503-mpo-7.7.0-resolv.conf.5.patch +Patch52: 1730803-mpo-7.8.0-resolv.conf.5.patch + +%description +A collection of manual ("man") pages to complement other packages or update +those contained therein. Always have the latest version of this package +installed. + +%prep +%autosetup -p1 +# remove unwanted *.orig files +find -name "*.orig" -delete + +%build +%ifarch aarch64 + deprecated_pages="access alarm bdflush chmod chown creat dup2 epoll_create epoll_wait eventfd fork futimesat getdents getpgrp inotify_init lchown link mkdir mknod pause pipe poll readlink rename rmdir select send signalfd symlink sysctl time umount unlink uselib ustat utime utimes vfork wait4" + cd man-pages/man2 + for page in $deprecated_pages; do + cp deprecated.2 $page.2 + done + mv ____clone.2 clone.2 + mv ____open.2 open.2 + mv ____recv.2 recv.2 +%else + rm man-pages/man2/deprecated.2 + rm man-pages/man2/____clone.2 + rm man-pages/man2/____open.2 + rm man-pages/man2/____recv.2 +%endif + + +%install +mkdir -p $RPM_BUILD_ROOT%{_mandir}/overrides +mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} +for i in *; do + if [[ -d "$i" ]]; then + for j in $(ls "$i"); do + if [[ -d "$i/$j" ]]; then + mkdir -p "$RPM_BUILD_ROOT%{_mandir}/overrides/$j" + for k in $(ls "$i/$j"); do + if [[ -d "$i/$j/$k" ]]; then + mkdir -p "$RPM_BUILD_ROOT%{_mandir}/overrides/$j/$k" + cp -f "$i/$j/$k"/* "$RPM_BUILD_ROOT%{_mandir}/overrides/$j/$k" + else + cp -f "$i/$j"/* "$RPM_BUILD_ROOT%{_mandir}/overrides/$j" + fi + done + else + mkdir -p "$RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/$i" + cp "$i/$j" "$RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/$i" + fi + done + fi +done + +%files +%doc %{_docdir}/%{name}-%{version} +%{_mandir}/overrides/ + +%changelog +* Tue Aug 27 2019 Nikola Forró - 7.8.1-1 +- Upload new tarball + related: #1739400 +- remove bug fixed in original component: #1738573 (adcli) + +* Fri Aug 09 2019 Nikola Forró - 7.8.0-1 +- Upload new tarball + resolves: #1739400 +- remove bug fixed in original component: #1508018 (cups-filters) +- core.5: RLIMIT_CORE is not enforced when piping core dump to a program + resolves: #1705157 +- mmap.2: fix EINVAL conditions + resolves: #1595662 +- resolv.conf.5: update information about search list + resolves: #1730803 +- adcli.8: extend description of adcli update --add-samba-data + resolves: #1665794 +- iperf3.1: remove unsupported options + resolves: #1589421 +- paperconf.1, papersize.5: fix grammar mistakes + resolves: #1733904 + +* Wed Mar 27 2019 Nikola Forró - 7.7.3-1 +- Upload new tarball + related: #1669129 +- remove bug fixed in original component: #1274949 (usermode) + +* Tue Feb 26 2019 Nikola Forró - 7.7.2-1 +- Upload new tarball + related: #1669129 +- remove bug fixed in original component: #1538499 (iproute) +- remove bug fixed in original component: #1543420 (iproute) + +* Thu Jan 24 2019 Nikola Forró - 7.7.1-1 +- Upload new tarball + resolves: #1669129 +- remove bug fixed in original component: #1508363 (cyrus-imapd) + +* Thu Jan 03 2019 Nikola Forró - 7.7.0-2 +- resolv.conf.5: document use-vc option + resolves: #1662503 + +* Mon Nov 26 2018 Nikola Forró - 7.7.0-1 +- Upload new tarball +- name_to_handle_at.2, open_by_handle_at.2: add new manpages + resolves: #1635584 +- execve.2: document EAGAIN error + resolves: #1642394 + +* Wed Aug 22 2018 Nikola Forró - 7.6.2-1 +- Upload new tarball + related: #1592800 +- remove bug fixed in original component: #1147562 (socat) +- perf_event_open.2: sync with upstream + resolves: #1619272 +- resolv.conf.5: document no-reload (RES_NORELOAD) option + resolves: #1598288 +- proc.5: document missing fields in /proc/[pid]/smaps and /proc/[pid]/status + resolves: #1607318 + +* Fri Aug 17 2018 Nikola Forró - 7.6.1-4 +- patch also localized madvise.2 man page + related: #1560191 + +* Mon Aug 13 2018 Nikola Forró - 7.6.1-3 +- remove spoof options also from description section of host.conf.5 + related: #1577265 + +* Mon Jul 09 2018 Nikola Forró - 7.6.1-2 +- remove unwanted (*.orig) files + related: #1278492, #1560191, #1577265 + +* Wed Jul 04 2018 Nikola Forró - 7.6.1-1 +- Upload new tarball +- move mlock2.2 to a proper directory + related: #1573281 + +* Tue Jun 19 2018 Nikola Forró - 7.6.0-1 +- Upload new tarball + resolves: #1592800 +- remove bug fixed in original component: #1508021 (vsftpd) +- remove bug fixed in original component: #1508022 (vsftpd) +- remove bug fixed in original component: #1517227 (vsftpd) +- madvise.2: document MADV_WIPEONFORK and MADV_KEEPONFORK + resolves: #1560191 +- mlock.2, mlock2.2: document mlock2(2) and MCL_ONFAULT + resolves: #1573281 +- host.conf.5: remove description of never-implemented spoof options + resolves: #1577265 +- membarrier.2: add new man page + resolves: #1566315 +- mount.cifs.8: describe seal option + resolves: #1495572 +- ip-route.8: fix synopsis of ssthresh parameter + resolves: #1538499 +- tc-vlan.8: fix incorrect example + resolves: #1543420 + +* Wed Jan 10 2018 Nikola Forró - 7.5.2-1 +- Upload new tarball +- remove obsolete patch + related: #1505892 +- recvmmsg.2, sendmmsg.2: point out that error handling is unreliable + resolves: #1422950 + +* Wed Jan 03 2018 Nikola Forró - 7.5.1-2 +- vsftpd.conf.5: update patch + related: #1517216 + +* Tue Dec 12 2017 Nikola Forró - 7.5.1-1 +- Upload new tarball +- aide.1, aide.conf.5: fix upstream URL + resolves: #1437003 + +* Tue Nov 28 2017 Nikola Forró - 7.5.0-2 +- vsftpd.conf.5: extend description of ascii_download_enable + and ascii_upload_enable + resolves: #1517216 + +* Wed Nov 01 2017 Nikola Forró - 7.5.0-1 +- Upload new tarball + resolves: #1505892 +- remove bug fixed in original component: #1349841 (acl) +- cups-browsed.8: fix paths to AUTHORS and README + resolves: #1430271 +- vsftpd.conf.5: mention conflict between chroot_local_user + and text_userdb_names options + resolves: #1439724 +- imtest.1, lmtptest.1, mupdatetest.1, nntptest.1, pop3test.1, sivtest.1, + smtptest.1: document -w option + resolves: #1488506 +- vsftpd.conf.5: document allow_writeable_chroot option + resolves: #1507143 + +* Mon Jun 05 2017 Nikola Forró - 7.4.3-1 +- Upload new tarball +- copy_file_range.2: add new manpage + resolves: #1458195 + +* Mon May 22 2017 Nikola Forró - 7.4.2-1 +- Upload new tarball + related: #1435590 +- stat.2: update to cover latest things used in RHEL7 + resolves: #1452424 +- clone.2: document features related to namespaces + resolves: #1452368 + +* Thu Apr 13 2017 Nikola Forró - 7.4.1-1 +- Upload new tarball + related: #1435590 +- remove bug fixed in original component: #1167833 (net-tools) + +* Tue Mar 28 2017 Nikola Forró - 7.4.0-1 +- Upload new tarball + resolves: #1435590 +- remove bug fixed in original component: #1147568 (mailx) +- remove bug fixed in original component: #1147570 (mailx) +- remove bug fixed in original component: #1147565 (ecj) +- remove bug fixed in original component: #1349833 (paflib) +- ipvsadm.8: add missing option + resolves: #1085531 +- cp.1, install.1, mkdir.1, mkfifo.1, mknod.1: update security context options + to reflect coreutils change + resolves: #1263636 +- mcstransd.8: fix typos + resolves: #1316009 +- memparse.1: remove incorrect description + resolves: #1411979 +- nsswitch.conf.5: add information about sss service + resolves: #1390935 +- packet.7: add missing socket options + resolves: #1404478 +- namespaces.7, pid_namespaces.7, user_namespaces.7: add new manpages + resolves: #1377583 + +* Thu Sep 22 2016 Nikola Forró - 7.3.2-2 +- open.2: revert documenting O_TMPFILE option + related: #1330740 + +* Wed Aug 03 2016 Nikola Forró - 7.3.2-1 +- Upload new tarball + related: #1343004 +- prctl.2, capabilities.7: document ambient capabilities + resolves: #1360898 + +* Thu Jul 28 2016 Nikola Forró - 7.3.1-1 +- Upload new tarball + related: #1343004 +- remove bug fixed in original component: #1240948 (psacct) +- recv.2: add deprecation note about recv() syscall on aarch64 + resolves: #1361588 +- libpng.3: fix invalid RFC URL + related: #1263575 +- recv.2: change description of flags argument also on aarch64 + related: #1278492 +- localedef.1: add missing --old-style option + related: #1301661 +- recv.2: fix type of cmsg_len member of cmsghdr structure also on aarch64 + related: #1315605 +- clone.2: document ERESTARTNOINTR error code also on aarch64 + related: #1330661 +- open.2: document O_TMPFILE option also on aarch64 + related: #1330740 + +* Fri Jun 24 2016 Nikola Forró - 7.3.0-1 +- Upload new tarball + resolves: #1343004 +- remove bug fixed in original component: #1147538 (xinetd) +- remove bug fixed in original component: #1147550 (vsftpd) +- remove bug fixed in original component: #1147551 (vsftpd) +- remove bug fixed in original component: #1147552 (pam_krb5) +- remove bug fixed in original component: #1147572 (wget) +- remove bug fixed in original component: #1155006 (mc) +- remove bug fixed in original component: #1218284 (stunnel) +- remove bug fixed in original component: #1147564 (edac-utils) +- __fpurge.3: add missing man page + resolves: #1267657 +- cciss.4: replace man page content with notice about driver removal + resolves: #1112307 +- libpaf-dsc.3, libpaf-ebb.3: fix formatting and examples + resolves: #1181670 +- captest.8: describe --init-grp option + resolves: #1255283 +- png.5: fix invalid RFC URL + resolves: #1263575 +- socket.7: document SO_REUSEPORT option + resolves: #1269549 +- userhelper.8: fix up exit status description and consistency + resolves: #1274949 +- recv.2: change description of flags argument to apply also to recvfrom and recvmsg + resolves: #1278492 +- nsswitch.conf.5: add list of files being read when "files" service is used + resolves: #1289915 +- prctl.2: add description of Intel MPX calls + resolves: #1297898 +- iconv.1, locale.1, localedef.1, repertoiremap.5, iconvconfig.8: add new man pages +- charmap.5, locale.5, charsets.7, locale.7: sync with upstream + resolves: #1301661 +- tcp.7: document TCP_USER_TIMEOUT + resolves: #1312875 +- recv.2, cmsg.3: fix type of cmsg_len member of cmsghdr structure + resolves: #1315605 +- clone.2, fork.2: document ERESTARTNOINTR error code + resolves: #1330661 +- open.2: document O_TMPFILE option + resolves: #1330740 +- setfacl.1: document the meaning of '-' in perms + resolves: #1337039 +- cp.1, install.1, mkdir.1, mkfifo.1, mknod.1: update security context options + to reflect coreutils change + resolves: #1263629 +- cp.1, install.1, mkdir.1, mkfifo.1, mknod.1: update security context options + to reflect coreutils change + resolves: #1263632 +- cp.1, install.1, mkdir.1, mkfifo.1, mknod.1: update security context options + to reflect coreutils change + resolves: #1263635 +- cp.1, install.1, mkdir.1, mkfifo.1, mknod.1: update security context options + to reflect coreutils change + resolves: #1263637 + +* Fri Sep 25 2015 jchaloup - 7.2.4-1 +- New patch for fpurge with MT introduced since the first evaluation +- Remove mkfifoat.3 man page +- Upload new tarball + related: #1197850 + +* Tue Sep 22 2015 jchaloup - 7.2.3-2 +- Add missing man pages with symlink +- Upload new tarball + related: #1197850 + +* Fri Sep 11 2015 jchaloup - 7.2.2-1 +- Add missing man pages to en/man3 directory +- Fix use of .SH ATTRIBUTE macro + related: #1197850 + +* Wed Jul 08 2015 jchaloup - 7.2.1-1 +- Upload new tarball + related: #1225032 +- removed bug fixed in original component: #1147556 (mt-st) +- fix dump utmp name in dump-utmp.8 + resolves: #1164846 + +* Tue May 26 2015 jchaloup - 7.2.0-1 +- Upload new tarball + resolves: #1225032 +- removed bug fixed in original component: #1152066 (bind) +- removed bug fixed in original component: #1147545 (zsh) +- backport MT info from man-pages 3.81 + resolves: #1197850 +- fix typoes in mgetty's man pages + resolves: #1141874 +- fix wrong usage of accept/connect options in stunnel.8 + resolves: #1155977 +- autoconf: add missing config.guess.1 and config.sub.1 (no patch) + resolves: #1162225 +- rtld-audit.7 fix the correct format for cookies + resolves: #1222720 +- Don't generate debuginfo subpackage + resolves: #1179262 + +* Tue Dec 16 2014 jchaloup - 7.1.3-1 +- resolver.5 is a redirection to resolv.conf + upload the latest tarball + related: #1147718 +- procng-ng contains pl/pkill.1 man page which reffers non-existing one, removing the pl mutation + related: #1150170 + +* Tue Nov 25 2014 jchaloup - 7.1.2-1 +- netstat.8 -S/--sctp options added + resolves: #1064756 +- latest tarball uploaded +- update ecj.1 man page to the latest upstream version + related: #948442 + +* Thu Oct 16 2014 jchaloup - 7.1.1-1 +- deprecated syscalls for aarch64 + related: #1095371 +- latest tarball uploaded +- delete system-config-bind text from named.8 + resolves: #1148758 +- madvise.2 MADV_REMOVE supports more filesystems + resolves: #1120294 +- resolv.conf.5 add missing no-tld-query + resolves: #1147718 +- mc.1 fixing typos + resolves: #948487 +- missing fanotify manual pages added (in tarball) + resolves: #1155260 +- missing localized man-pages in procps-ng 3.3.10 added (in tarball) + resolves: #1150170 + +* Mon Aug 11 2014 jchaloup - 7.1.0-1 +- resolves: #1095371 + deprecated syscalls for aarch64 (remove man page and its syscalls for non-aarch64 archs) + latest tarball uploaded +- resolves: #1073718 + clarification of open.2 man page about aligned buffer size +- resolves: #1086994 + adding missing proc fields description +- resolves: #1040023 + ssl_request_cert formating typo in vsftpd.conf man page +- resolves: #1021967 + socat formating typo in man page +- resolves: #1131853 + proc/fs is not an empty directory +- resolves: #1146259 + information about xinitd reload +- resolves: #1104994 + missing isolate options in vsftpd.conf man page +- resolves: #1129235 + flock.2 more info about locks over NFS +- resolves: #948457 + mt.1 missing option section +- resolves: #948599 + edac-ctl.1 missing options +- resolves: #1109291 + mailx.1 additional information about FROM syntax +- resolves: #1109294 + mailx.1 additional information about environment variables +- resolves: #1131939 + charset.7, nl_langinfo.3 information about implicit codeset +- resolves: #1131859 + host.conf.5. multi on by default +- resolves: #1066917 + zsh.1, zshall.1 missing option for emulation +- resolves: #964302 + ignore_afs missing options in pam_krb5.8 +- resolves: #1140589 + wget.1 duplicated options deleted +- resolves: #1069350 + wrong symlink in run-parts.4, cp crontabs.4 run-parts.4 (in tarball) +- resolves: #948442 + new man page for ecj.1 (in tarball) + +* Fri Dec 27 2013 Daniel Mach - 7.0.0-2 +- Mass rebuild 2013-12-27 + +* Thu Oct 18 2012 Peter Schiffer 7.0.0-1 +- initial package for RHEL-7.0