]> git.ipfire.org Git - thirdparty/man-pages.git/log
thirdparty/man-pages.git
3 years agoin_addr-struct.3, in_addr_t.3, in_port_t.3, sockaddr-struct.3: Document in_addr,...
Alejandro Colomar [Thu, 24 Feb 2022 23:43:56 +0000 (00:43 +0100)] 
in_addr-struct.3, in_addr_t.3, in_port_t.3, sockaddr-struct.3: Document in_addr, in_addr_t, and in_port_t

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agosockaddr-struct.3, sockaddr_in-struct.3: Document sockaddr_in
Alejandro Colomar [Thu, 24 Feb 2022 23:24:09 +0000 (00:24 +0100)] 
sockaddr-struct.3, sockaddr_in-struct.3: Document sockaddr_in

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agosockaddr-struct.3, sockaddr_un-struct.3: Document sockaddr_un
Alejandro Colomar [Thu, 24 Feb 2022 23:02:02 +0000 (00:02 +0100)] 
sockaddr-struct.3, sockaddr_un-struct.3: Document sockaddr_un

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agosockaddr-struct.3, sockaddr_storage-struct.3: Document sockaddr_storage
Alejandro Colomar [Thu, 24 Feb 2022 21:58:36 +0000 (22:58 +0100)] 
sockaddr-struct.3, sockaddr_storage-struct.3: Document sockaddr_storage

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agosockaddr-struct.3, socklen_t.3, system_data_types.7: Move socklen_t to sockaddr-struct.3
Alejandro Colomar [Thu, 24 Feb 2022 22:25:25 +0000 (23:25 +0100)] 
sockaddr-struct.3, socklen_t.3, system_data_types.7: Move socklen_t to sockaddr-struct.3

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agosockaddr-struct.3, system_data_types.3: Move sockaddr to sockaddr-struct.3
Alejandro Colomar [Thu, 24 Feb 2022 22:12:58 +0000 (23:12 +0100)] 
sockaddr-struct.3, system_data_types.3: Move sockaddr to sockaddr-struct.3

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agomode_t.3, system_data_types.7: Move text to a separate page
Alejandro Colomar [Tue, 2 Nov 2021 17:42:53 +0000 (18:42 +0100)] 
mode_t.3, system_data_types.7: Move text to a separate page

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agodiv_t.3, lldiv_t.3, system_data_types.7: Move lldiv_t to div_t.3
Alejandro Colomar [Tue, 2 Nov 2021 17:39:04 +0000 (18:39 +0100)] 
div_t.3, lldiv_t.3, system_data_types.7: Move lldiv_t to div_t.3

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agodiv_t.3, ldiv_t.3, system_data_types.7: Move ldiv_t to div_t.3
Alejandro Colomar [Tue, 2 Nov 2021 17:35:42 +0000 (18:35 +0100)] 
div_t.3, ldiv_t.3, system_data_types.7: Move ldiv_t to div_t.3

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agolconv-struct.3, system_data_types.7: Move text to a separate page
Alejandro Colomar [Tue, 2 Nov 2021 17:32:00 +0000 (18:32 +0100)] 
lconv-struct.3, system_data_types.7: Move text to a separate page

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agointN_t.3: Document the [U]INTN_* macros
Alejandro Colomar [Tue, 2 Nov 2021 17:23:02 +0000 (18:23 +0100)] 
intN_t.3: Document the [U]INTN_* macros

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agointN_t.3, uint16_t.3, uint32_t.3, uint64_t.3, uint8_t.3, uintN_t.3, system_data_types...
Alejandro Colomar [Tue, 2 Nov 2021 16:27:17 +0000 (17:27 +0100)] 
intN_t.3, uint16_t.3, uint32_t.3, uint64_t.3, uint8_t.3, uintN_t.3, system_data_types.7: Move uintN_t to intN_t.3

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agointN_t.3, system_data_types.7: Move text to a separate page
Alejandro Colomar [Tue, 2 Nov 2021 16:15:34 +0000 (17:15 +0100)] 
intN_t.3, system_data_types.7: Move text to a separate page

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agointmax_t.3: Document the [U]INTMAX_* macros
Alejandro Colomar [Tue, 2 Nov 2021 15:59:47 +0000 (16:59 +0100)] 
intmax_t.3: Document the [U]INTMAX_* macros

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agointmax_t.3, uintmax_t.3, system_data_types.7: Move uintmax_t to intmax_t.3
Alejandro Colomar [Tue, 2 Nov 2021 14:51:05 +0000 (15:51 +0100)] 
intmax_t.3, uintmax_t.3, system_data_types.7: Move uintmax_t to intmax_t.3

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agointmax_t.3, system_data_types.7: Move text to a separate page
Alejandro Colomar [Tue, 2 Nov 2021 13:25:52 +0000 (14:25 +0100)] 
intmax_t.3, system_data_types.7: Move text to a separate page

I also reworded the text slightly to talk about 'basic integer
types', not 'integer types', to more clearly exclude 'extended
integer types'.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agodiv_t.3, imaxdiv_t.3, system_data_types.7: Move imaxdiv_t to div_t.3
Alejandro Colomar [Tue, 2 Nov 2021 13:12:59 +0000 (14:12 +0100)] 
div_t.3, imaxdiv_t.3, system_data_types.7: Move imaxdiv_t to div_t.3

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agoid_t.3, uid_t.3, system_data_types.7: Move uid_t to id_t.3
Alejandro Colomar [Tue, 2 Nov 2021 13:08:43 +0000 (14:08 +0100)] 
id_t.3, uid_t.3, system_data_types.7: Move uid_t to id_t.3

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agoid_t.3, pid_t.3, system_data_types.7: Move pid_t to id_t.3
Alejandro Colomar [Tue, 2 Nov 2021 13:03:22 +0000 (14:03 +0100)] 
id_t.3, pid_t.3, system_data_types.7: Move pid_t to id_t.3

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agogid_t.3, id_t.3, system_data_types.7: Move gid_t to id_t.3
Alejandro Colomar [Tue, 2 Nov 2021 12:56:28 +0000 (13:56 +0100)] 
gid_t.3, id_t.3, system_data_types.7: Move gid_t to id_t.3

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agoid_t.3, system_data_types.7: Move text to a separate page
Alejandro Colomar [Tue, 2 Nov 2021 12:49:23 +0000 (13:49 +0100)] 
id_t.3, system_data_types.7: Move text to a separate page

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agoFILE.3, system_data_types.7: Move text to a separate page
Alejandro Colomar [Tue, 2 Nov 2021 12:42:56 +0000 (13:42 +0100)] 
FILE.3, system_data_types.7: Move text to a separate page

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agofenv_t.3, system_data_types.7: Move fexcept_t to fenv_t.3
Alejandro Colomar [Tue, 2 Nov 2021 12:36:26 +0000 (13:36 +0100)] 
fenv_t.3, system_data_types.7: Move fexcept_t to fenv_t.3

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agofenv_t.3, system_data_types.7: Move text to a separate page
Alejandro Colomar [Tue, 2 Nov 2021 12:33:25 +0000 (13:33 +0100)] 
fenv_t.3, system_data_types.7: Move text to a separate page

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agoselect.2, system_data_types.7: Move fd_set to select.2
Alejandro Colomar [Tue, 2 Nov 2021 12:29:34 +0000 (13:29 +0100)] 
select.2, system_data_types.7: Move fd_set to select.2

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agodouble_t.3, float_t.3, system_data_types.7: Move float_t to double_t.3
Alejandro Colomar [Tue, 2 Nov 2021 12:16:13 +0000 (13:16 +0100)] 
double_t.3, float_t.3, system_data_types.7: Move float_t to double_t.3

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agodouble_t.3, system_data_types.7: Move text to a separate page
Alejandro Colomar [Tue, 2 Nov 2021 11:43:55 +0000 (12:43 +0100)] 
double_t.3, system_data_types.7: Move text to a separate page

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agodiv_t.3, system_data_types.7: Move text to a separate page
Alejandro Colomar [Tue, 2 Nov 2021 11:35:55 +0000 (12:35 +0100)] 
div_t.3, system_data_types.7: Move text to a separate page

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agodev_t.3, system_data_types.7: Move text to a separate page
Alejandro Colomar [Tue, 2 Nov 2021 11:30:05 +0000 (12:30 +0100)] 
dev_t.3, system_data_types.7: Move text to a separate page

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agoclockid_t.3, system_data_types.7: Move text to a separate page
Alejandro Colomar [Tue, 2 Nov 2021 11:25:14 +0000 (12:25 +0100)] 
clockid_t.3, system_data_types.7: Move text to a separate page

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agoclock_t.3, system_data_types.7: Move text to a separate page
Alejandro Colomar [Tue, 2 Nov 2021 11:18:52 +0000 (12:18 +0100)] 
clock_t.3, system_data_types.7: Move text to a separate page

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agocc_t.3, system_data_types.7: Move text to a separate page
Alejandro Colomar [Tue, 2 Nov 2021 11:09:06 +0000 (12:09 +0100)] 
cc_t.3, system_data_types.7: Move text to a separate page

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agoblksize_t.3, system_data_types.7: Move text to a separate page
Alejandro Colomar [Tue, 2 Nov 2021 11:01:34 +0000 (12:01 +0100)] 
blksize_t.3, system_data_types.7: Move text to a separate page

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agoblkcnt_t.3, system_data_types.7: Move text to a separate page
Alejandro Colomar [Tue, 2 Nov 2021 10:56:22 +0000 (11:56 +0100)] 
blkcnt_t.3, system_data_types.7: Move text to a separate page

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agoaiocb-struct.3, system_data_types.7: Move text to a separate page
Alejandro Colomar [Tue, 2 Nov 2021 10:35:47 +0000 (11:35 +0100)] 
aiocb-struct.3, system_data_types.7: Move text to a separate page

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agousleep.3: Remove incorrect portability note
Alejandro Colomar [Sat, 30 Oct 2021 13:54:29 +0000 (15:54 +0200)] 
usleep.3: Remove incorrect portability note

That note against using useconds_t if portability is important was
probably true before POSIX, but since POSIX specifies the type in
<sys/types.h>, as recently documented in useconds_t(3), the type
should be fine to use portably.  Moreover, using it helps document
the code, so we better completely remove that warning.

Add a SEE ALSO entry for useconds_t(3).

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agouseconds_t.3: New link to system_data_types(7)
Alejandro Colomar [Sat, 30 Oct 2021 13:48:48 +0000 (15:48 +0200)] 
useconds_t.3: New link to system_data_types(7)

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agosystem_data_types.7: Document useconds_t
Alejandro Colomar [Sat, 30 Oct 2021 13:47:38 +0000 (15:47 +0200)] 
system_data_types.7: Document useconds_t

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agosystem_data_types.7: ssize_t: Note that some headers only provide the type since...
Alejandro Colomar [Wed, 7 Jul 2021 19:30:33 +0000 (21:30 +0200)] 
system_data_types.7: ssize_t: Note that some headers only provide the type since POSIX.1-2008

Signed-off-by: Alejandro Colomar <alejandro.colomar@exfo.com>
3 years agosystem_data_types.7: Link to the stat structure definition
Alejandro Colomar [Sat, 30 Oct 2021 14:08:02 +0000 (16:08 +0200)] 
system_data_types.7: Link to the stat structure definition

The definition of 'struct stat' is not in stat(2) anymore.  It is
in the same system_data_types(7) page, so link to it.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agoaiocb-struct.3, lconv-struct.3, sigevent-struct.3, sigval-union.3, sockaddr-struct...
Alejandro Colomar [Mon, 24 May 2021 07:52:59 +0000 (09:52 +0200)] 
aiocb-struct.3, lconv-struct.3, sigevent-struct.3, sigval-union.3, sockaddr-struct.3, timespec-struct.3, timeval-struct.3: Rename some links to system_data_types.7 to add -{struct,union} suffix

This avoids shadowing other pages, and clearly differentiates
function pages from type pages (both are in man3).

Do this for struct/union types, and not for typedefs.  This makes
sense because typedefs in C are in the same namespace as function
identifiers, but struct and union (and enum) tags are in a
different one, and can have the same name as a function.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Cc: G. Branden Robinson <g.branden.robinson@gmail.com>
3 years agostat-struct.3: New link to system_data_types(7)
Alejandro Colomar [Mon, 24 May 2021 07:35:26 +0000 (09:35 +0200)] 
stat-struct.3: New link to system_data_types(7)

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Cc: G. Branden Robinson <g.branden.robinson@gmail.com>
3 years agostat.2, system_data_types.7: Document 'struct stat' in system_data_types(7)
Alejandro Colomar [Mon, 24 May 2021 07:32:12 +0000 (09:32 +0200)] 
stat.2, system_data_types.7: Document 'struct stat' in system_data_types(7)

Move the definition of the struct present in stat(2), and put
there a reference to stat-struct(3) instead.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Cc: G. Branden Robinson <g.branden.robinson@gmail.com>
3 years agopacket.7: add description of zero protocol for socket
Grzegorz Szpetkowski [Tue, 25 Jan 2022 15:22:17 +0000 (16:22 +0100)] 
packet.7: add description of zero protocol for socket

According to packet(7), whenever raw packet is created by
socket(), it's immediately running, meaning that internal
packet_rcv() handler will be triggered and socket buffer will
begin allocation of sk_buff until sk_rcvbuf limit is reached.

However, by examination of kernel's internal handler
packet_create() it looks that kernel handles case of zero protocol
in a special manner.  When packet_create() is called with arg
protocol = 0, __register_prot_hook is not executed, meaning
running state is still 0 and most notably, packet handler is not
added to kernel list (vide dev_add_pack).

I found this behavior invaluable for solving a subtle issue.  When
process creates raw packet socket to listen for (let's say) all
protocols, but limited to a single network interface, then while
this interface can set by bind, it may to be too late due to
preemption (e.g. if real-time scheduling is used) and/or high-rate
of packets on other interfaces, meaning that undesired packets
(any count) may be pulled into the socket buffer.

The idea is that protocol zero means no packets on receive and an
optional call to bind with nonzero sll_procol will act "as if" the
originating socket API was called with this (nonzero) protocol.

The call to bind(2) is optional.  As an example, if user intends
to treat the socket as Tx-only, then bind(2) may be skipped.

Reported-by: Grzegorz Szpetkowski <gszpetkowski@gmail.com>
Link: linux-man@ <https://lore.kernel.org/linux-man/CAMW=dumhWDu6LdhaQCJMskA4yNRBtOHs4iyrG6TP7xRv28AVWA@mail.gmail.com/>
Cowritten-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by Grzegorz Szpetkowski <gszpetkowski@gmail.com>:

3 years agocapabilities.7: improve internal references
Kir Kolyshkin [Fri, 4 Feb 2022 21:00:21 +0000 (13:00 -0800)] 
capabilities.7: improve internal references

Trying to make this man page easier to navigate.

Fix a few cases of "see above/below" without a specific reference to a
subsection by quoting the subsection name (making it easier to look it up).
Use the same formatting rule as used by some of the other existing
references, i.e. italicise it.

For uniformity, remove words such as "the subsection" and "under", using
"(see|described in) <subsection title> (above|below)" template.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agofmemopen.3: wfix
Alejandro Colomar [Fri, 4 Feb 2022 12:41:55 +0000 (13:41 +0100)] 
fmemopen.3: wfix

Fix incorrect identifier.

Reported-by: Lucien Gentis <lucien.gentis@waika9.com>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agofsync.2: ERRORS: Document EINTR
Alejandro Colomar [Tue, 1 Feb 2022 14:42:53 +0000 (15:42 +0100)] 
fsync.2: ERRORS: Document EINTR

Reported-by: Mathnerd314 <mathnerd314.gph@gmail.com>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Cc: <linux-fsdevel@vger.kernel.org>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
3 years agotime.7: tfix
наб [Sat, 29 Jan 2022 22:59:47 +0000 (23:59 +0100)] 
time.7: tfix

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agotime.7: tfix
наб [Sat, 29 Jan 2022 22:59:29 +0000 (23:59 +0100)] 
time.7: tfix

"HZ" is the constant, and has nothing to do with the
50 Hz PAL/60 Hz NTSC mains frequencies

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agounits.7: SEE ALSO: Add link to 'The International System of Units'
Alejandro Colomar [Sat, 29 Jan 2022 22:59:40 +0000 (23:59 +0100)] 
units.7: SEE ALSO: Add link to 'The International System of Units'

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Cc: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
3 years agoman-pages.7: wfix
Alejandro Colomar [Wed, 26 Jan 2022 20:47:53 +0000 (21:47 +0100)] 
man-pages.7: wfix

'clauses' is clearer than 'sentence clauses' in this case; there's
no ambiguity.

Reported-by: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agoswapon.2: CONFIG_DEVICE_PRIVATE decreases number of available swap files by 4
Alejandro Colomar [Tue, 25 Jan 2022 18:23:28 +0000 (19:23 +0100)] 
swapon.2: CONFIG_DEVICE_PRIVATE decreases number of available swap files by 4

[Aleksander]:
I noticed that swapon docs are missing some newer information
about CONFIG_DEVICE_PRIVATE that decreases the number of available
swap files.  When it comes to kernel versions that I used
<https://elixir.bootlin.com/linux/v5.14/source/include/linux/swap.h>
and
<https://elixir.bootlin.com/linux/v4.14/source/include/linux/swap.h>
to check when the changes were introduced.

Reported-by: Aleksander Baranowski <alex@euro-linux.com>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agotermios.3: Clarify ONLRET
Simon Branch [Sat, 1 Jan 2022 22:55:23 +0000 (14:55 -0800)] 
termios.3: Clarify ONLRET

While perusing various termios(3) and termios(4) manpages, I
noticed the following inconsistency for ONLRET.  FreeBSD and
NetBSD say this:

   If ONLRET is set, the NL character is assumed to do the
   carriage-return function; the column pointer will be set to 0.

OpenBSD says this:

   If ONLRET is set, NL also performs CR on output, and reset
   current column to 0.

POSIX says this:

   NL performs CR function.

The current Linux manpage says this (!):

   Don't output CR.

Here's a snippet that demonstrates Linux's behavior (tl;dr it's
just like the other operating systems):

   $ stty -icanon -onlcr -icrnl -echo onlret onocr; cat
   this is some text (^J pressed)
                    and some more (^M pressed before additional text)

The first flags (-icanon -onlcr -icrnl -echo), combined with cat,
ensure that our keys are sent directly back to the terminal
emulator without any translation or buffering.  The last two
(ONLRET and ONOCR) are the important ones: ONLRET makes Linux
think that the cursor is at column 0 after the ^J, and ONOCR makes
Linux ignore the following ^M.

Signed-off-by: Simon Branch <simonmbranch@gmail.com>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Cc: Pali Rohár <pali@kernel.org>
3 years agostrsep.3: Minor tweaks to наб's patch
Alejandro Colomar [Tue, 25 Jan 2022 16:14:54 +0000 (17:14 +0100)] 
strsep.3: Minor tweaks to наб's patch

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agostrsep.3: port strtok(3) example
наб [Mon, 24 Jan 2022 22:43:17 +0000 (23:43 +0100)] 
strsep.3: port strtok(3) example

Each time I use strsep I want something like this;
this serves to snappily highlight the programming model,
esp. in contrast to strtok_r ‒ I elided the long
(and, frankly, gratuitous, even there) argv explanation
‒ if you need it, you can read the original
(or the usage string, or the seven-line main)

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agostrtok.3: fix \t literal instead of \et in example
наб [Sun, 23 Jan 2022 00:19:31 +0000 (01:19 +0100)] 
strtok.3: fix \t literal instead of \et in example

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agostrsep.3: tfix
наб [Sat, 22 Jan 2022 23:52:54 +0000 (00:52 +0100)] 
strsep.3: tfix

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agomemfd_secret.2: mention ENOSYS is also returned when secretmem_enable=0
наб [Sun, 23 Jan 2022 12:36:42 +0000 (13:36 +0100)] 
memfd_secret.2: mention ENOSYS is also returned when secretmem_enable=0

Ref: https://lore.kernel.org/all/20210518072034.31572-5-rppt@kernel.org/
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Cc: Mike Rapoport <rppt@linux.ibm.com>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agomemfd_secret.2: mention that it inhibits hibernation
наб [Sun, 23 Jan 2022 12:34:28 +0000 (13:34 +0100)] 
memfd_secret.2: mention that it inhibits hibernation

Ref: https://lore.kernel.org/all/20210518072034.31572-6-rppt@kernel.org/
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Cc: Mike Rapoport <rppt@linux.ibm.com>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years ago.gitignore, Makefile, scripts/bash_aliases: Adapt to the recently added section 0...
Alejandro Colomar [Sun, 23 Jan 2022 14:38:07 +0000 (15:38 +0100)] 
.gitignore, Makefile, scripts/bash_aliases: Adapt to the recently added section 0 (man0/)

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agosysexits.h.0: New page documenting <sysexits.h>
Alejandro Colomar [Sun, 23 Jan 2022 14:22:55 +0000 (15:22 +0100)] 
sysexits.h.0: New page documenting <sysexits.h>

Based on OpenBSD's and FreeBSD's sysexits(3) manual pages,
and on the <sysexits.h> file itself.

Relevant differences from those manual pages:
- Rewritten using man(7) macros.
- Since this documents a header file (similar to <limits.h>), use
  section 0, as the man-pages-posix project does (limits.h(0p)).
- Remove a statement that these error codes are non-portable
  and should not be used.  Instead, it's more clarifying to say
  that these are not in POSIX, but are on the BSDs.  Let users
  decide what to do based on that.  Probably, it's portable enough
  these days.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agoepoll_ctl.2: replace input flag footnotes with a list section
наб [Thu, 13 Jan 2022 15:14:10 +0000 (16:14 +0100)] 
epoll_ctl.2: replace input flag footnotes with a list section

This is shorter, clearly separates the events from the flags,
and more consistent (cf. EPOLLEXCLUSIVE which has a different message
than the rest)

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agoepoll_wait.2: epoll_pwait2(2) wrapper added to glibc
Alejandro Colomar [Thu, 13 Jan 2022 12:49:17 +0000 (13:49 +0100)] 
epoll_wait.2: epoll_pwait2(2) wrapper added to glibc

glibc's wrapper has the already documented prototype, so no need
to change anything.  Just remove the FIXME.

Reported-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Cc: Florian Weimer <fweimer@redhat.com>
Cc: Carlos O'Donell <carlos@redhat.com>
3 years agoglob.3: srcfix
наб [Tue, 11 Jan 2022 18:28:27 +0000 (19:28 +0100)] 
glob.3: srcfix

For consistency: this is the only non-false-positive for ", and",
which now reads:
  $ git grep '", and"'
  man2/ioctl_tty.2:.BR "#include <termios.h>" "      /* Definition of " CLOCAL ", and"

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agopkeys.7: wfix
наб [Tue, 11 Jan 2022 18:27:42 +0000 (19:27 +0100)] 
pkeys.7: wfix

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agopersonality.2: WHOLE_SECONDS never did anything
наб [Mon, 10 Jan 2022 18:53:42 +0000 (19:53 +0100)] 
personality.2: WHOLE_SECONDS never did anything

git log -SWHOLE_SECONDS on a unified pre-2.6 linux repository
reveals the following three releases:
  Author: Andrew Morton <akpm@osdl.org>
  Date:   Sun Aug 31 04:30:04 2003 -0700

      [PATCH] abi doc update

      From: <ffrederick@prov-liege.be>

      Update the abi sysctl documentation.

  Author: Linus Torvalds <torvalds@athlon.transmeta.com>
  Date:   Mon Feb 4 20:17:27 2002 -0800

      v2.4.9.7 -> v2.4.9.8

        - Christoph Hellwig: clean up personality handling a bit
        - Robert Love: update sysctl/vm documentation
        - make the three-argument (that everybody hates) "min()" be "min_t()",
        and introduce a type-anal "min()" that complains about arguments of
        different types.

  Author: Linus Torvalds <torvalds@linuxfoundation.org>
  Date:   Fri Nov 23 15:09:30 2007 -0500

      Import 1.1.14

1.1.14 adds personality.h:
  diff --git a/include/linux/personality.h b/include/linux/personality.h
  new file mode 100644
  index 0000000000..714a5a66b5
  --- /dev/null
  +++ b/include/linux/personality.h
  @@ -0,0 +1,12 @@
  +/* Flags for bug emulation. These occupy the top three bytes. */
  +#define STICKY_TIMEOUTS                0x8000000
  +#define WHOLE_SECONDS          0x4000000
  +
  +/* Personality types. These go in the low byte. */
  +#define PER_MASK               (0x00ff)
  +#define PER_LINUX              (0x0000)
  +#define PER_SVR4               (0x0001 | STICKY_TIMEOUTS)
  +#define PER_SVR3               (0x0002 | STICKY_TIMEOUTS)
  +#define PER_SCOSVR3            (0x0003 | STICKY_TIMEOUTS | WHOLE_SECONDS)
  +#define PER_WYSEV386           (0x0004 | STICKY_TIMEOUTS)
  +#define PER_ISCR4              (0x0005 | STICKY_TIMEOUTS)

2.4.9.8 shuffles it around with no substantial changes
(hunk enhanced to show texture):
  diff --git a/include/linux/personality.h b/include/linux/personality.h
  index 58cab509e3..230d394603 100644
  --- a/include/linux/personality.h
  +++ b/include/linux/personality.h
  @@ -1,68 +1,126 @@
  -/* Flags for bug emulation. These occupy the top three bytes. */
  -#define STICKY_TIMEOUTS                0x4000000
  -#define WHOLE_SECONDS          0x2000000
  -#define ADDR_LIMIT_32BIT       0x0800000

  -/* Personality types. These go in the low byte. Avoid using the top bit,
  - * it will conflict with error returns.
  +/*
  + * Flags for bug emulation.
  + *
  + * These occupy the top three bytes.
    */
  -#define PER_MASK               (0x00ff)
  -#define PER_LINUX              (0x0000)
  -#define PER_LINUX_32BIT                (0x0000 | ADDR_LIMIT_32BIT)
  -#define PER_SVR4               (0x0001 | STICKY_TIMEOUTS)
  -#define PER_SVR3               (0x0002 | STICKY_TIMEOUTS)
  -#define PER_SCOSVR3            (0x0003 | STICKY_TIMEOUTS | WHOLE_SECONDS)
  -#define PER_WYSEV386           (0x0004 | STICKY_TIMEOUTS)
  -#define PER_ISCR4              (0x0005 | STICKY_TIMEOUTS)
  -#define PER_BSD                        (0x0006)
  -#define PER_SUNOS              (PER_BSD | STICKY_TIMEOUTS)
  -#define PER_XENIX              (0x0007 | STICKY_TIMEOUTS)
  -#define PER_LINUX32            (0x0008)
  -#define PER_IRIX32              (0x0009 | STICKY_TIMEOUTS) /* IRIX5 32-bit     */
  -#define PER_IRIXN32             (0x000a | STICKY_TIMEOUTS) /* IRIX6 new 32-bit */
  -#define PER_IRIX64              (0x000b | STICKY_TIMEOUTS) /* IRIX6 64-bit     */
  -#define PER_RISCOS             (0x000c)
  -#define PER_SOLARIS            (0x000d | STICKY_TIMEOUTS)
  -
  -/* Description of an execution domain - personality range supported,
  - * lcall7 syscall handler, start up / shut down functions etc.
  - * N.B. The name and lcall7 handler must be where they are since the
  - * offset of the handler is hard coded in kernel/sys_call.S.
  +enum {
  +       MMAP_PAGE_ZERO =        0x0100000,
  +       ADDR_LIMIT_32BIT =      0x0800000,
  +       SHORT_INODE =           0x1000000,
  +       WHOLE_SECONDS =         0x2000000,
  +       STICKY_TIMEOUTS =       0x4000000,
  +};
  +
  +/*
  + * Personality types.
  + *
  + * These go in the low byte.  Avoid using the top bit, it will
  + * conflict with error returns.
  + */
  +enum {
  +       PER_LINUX =             0x0000,
  +       PER_LINUX_32BIT =       0x0000 | ADDR_LIMIT_32BIT,
  +       PER_SVR4 =              0x0001 | STICKY_TIMEOUTS | MMAP_PAGE_ZERO,
  +       PER_SVR3 =              0x0002 | STICKY_TIMEOUTS | SHORT_INODE,
  +       PER_SCOSVR3 =           0x0003 | STICKY_TIMEOUTS |
  +                                        WHOLE_SECONDS | SHORT_INODE,
  +       PER_OSR5 =              0x0003 | STICKY_TIMEOUTS | WHOLE_SECONDS,
  +       PER_WYSEV386 =          0x0004 | STICKY_TIMEOUTS | SHORT_INODE,
  +       PER_ISCR4 =             0x0005 | STICKY_TIMEOUTS,
  +       PER_BSD =               0x0006,
  +       PER_SUNOS =             0x0006 | STICKY_TIMEOUTS,
  +       PER_XENIX =             0x0007 | STICKY_TIMEOUTS | SHORT_INODE,
  +       PER_LINUX32 =           0x0008,
  +       PER_IRIX32 =            0x0009 | STICKY_TIMEOUTS,/* IRIX5 32-bit */
  +       PER_IRIXN32 =           0x000a | STICKY_TIMEOUTS,/* IRIX6 new 32-bit */
  +       PER_IRIX64 =            0x000b | STICKY_TIMEOUTS,/* IRIX6 64-bit */
  +       PER_RISCOS =            0x000c,
  +       PER_SOLARIS =           0x000d | STICKY_TIMEOUTS,
  +       PER_UW7 =               0x000e | STICKY_TIMEOUTS | MMAP_PAGE_ZERO,
  +       PER_UW7 =               0x000e | STICKY_TIMEOUTS | MMAP_PAGE_ZERO,
  +       PER_MASK =              0x00ff,
  +};

And the ABI doc creates Documentation/sysctl/abi.txt, noting
  +defhandler_coff:
  +defined value :
  +PER_SCOSVR3
  +0x0003 | STICKY_TIMEOUTS | WHOLE_SECONDS | SHORT_INODE

The same log of mainline reveals, apart from the original 2.6.12-rc2
import:
  1. 607ca46e97a1b6594b29647d98a32d545c24bdff ("UAPI: (Scripted)
     Disintegrate include/linux") ‒ include/linux/{=> uapi/}personality.h
  2. 53b9537509654a6267c3f56b4d2e7409b9089686 ("docs: sysctl: convert to
     ReST") ‒ Documentation/sysctl/abi.{rst => txt}
  3. 9f35cf8bd7e3347b0679c3f9b5e0bc5493925a1f ("docs: rewrite
     admin-guide/sysctl/abi.rst") ‒ rewrites
     Documentation/admin-guide/sysctl/abi.rst entirely, removing all
     personality bits ("all the existing entries are no longer present,
     so this removes them;")

Current mainline contains WHOLE_SECONDS thrice:
  include/uapi/linux/personality.h:       WHOLE_SECONDS =         0x2000000,
  include/uapi/linux/personality.h-       PER_SCOSVR3 =           0x0003 | STICKY_TIMEOUTS |
  include/uapi/linux/personality.h:                                        WHOLE_SECONDS | SHORT_INODE,
  include/uapi/linux/personality.h:       PER_OSR5 =              0x0003 | STICKY_TIMEOUTS | WHOLE_SECONDS,

It never did anything.

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Cc: Jakub Wilk <jwilk@jwilk.net>
3 years agostrtok.3: Fix j/str1 declaration
Stephen Kitt [Sat, 8 Jan 2022 15:43:04 +0000 (16:43 +0100)] 
strtok.3: Fix j/str1 declaration

    for (int j = 1, str1 = argv[1]; ...

declares two variables of type int, j and str1; the pre-existing
char * str1 isn't used. This causes compiler warnings. Declaring j
outside the loop fixes everything.

Signed-off-by: Stephen Kitt <steve@sk2.org>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agopkeys.7: Rely on the glibc implementations
Stephen Kitt [Sat, 8 Jan 2022 15:43:03 +0000 (16:43 +0100)] 
pkeys.7: Rely on the glibc implementations

glibc 2.27 added implementations of pkey_set(), pkey_mprotect(),
pkey_alloc(), and pkey_free(); rely on those instead of defining them
in the example. wrpkru() is only used in pkey_set() and can be removed
too (it's the internal-use-only pkey_write() in glibc).

Signed-off-by: Stephen Kitt <steve@sk2.org>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agopkeys.7: Update the example to match glibc
Stephen Kitt [Sat, 8 Jan 2022 15:43:02 +0000 (16:43 +0100)] 
pkeys.7: Update the example to match glibc

glibc 2.27 introduced support for the pkeys functions, but the glibc
versions don't match those declared in the example. Update the example
to match glibc, and avoid declaring the functions if glibc is new
enough.

Signed-off-by: Stephen Kitt <steve@sk2.org>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agomq_notify.3: Add signal.h for SIGEV_ constants
Stephen Kitt [Sat, 8 Jan 2022 15:43:00 +0000 (16:43 +0100)] 
mq_notify.3: Add signal.h for SIGEV_ constants

The example program needs signal.h to build correctly, since the
SIGEV_ constants are defined through signal.h; also document that in
the synopsis.

Signed-off-by: Stephen Kitt <steve@sk2.org>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agonewlocale.3: Use LC_GLOBAL_LOCALE, not ..._HANDLE
Stephen Kitt [Fri, 7 Jan 2022 16:46:18 +0000 (17:46 +0100)] 
newlocale.3: Use LC_GLOBAL_LOCALE, not ..._HANDLE

LC_GLOBAL_HANDLE has never existed; the locale object handle to use to
refer to the global locale determined by setlocale(3) is
LC_GLOBAL_LOCALE. See uselocale(3) for details.

[Jakub]:
$ cc -Wall newlocale-example.c
newlocale-example.c: In function 'main':
newlocale-example.c:67:15: error: 'LC_GLOBAL_HANDLE' undeclared (first use in this function); did you mean 'LC_GLOBAL_LOCALE'?
   67 |     uselocale(LC_GLOBAL_HANDLE);    /* So 'loc' is no longer in use */
      |               ^~~~~~~~~~~~~~~~
      |               LC_GLOBAL_LOCALE
newlocale-example.c:67:15: note: each undeclared identifier is reported only once for each function it appears in

Signed-off-by: Stephen Kitt <steve@sk2.org>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Cc: Jakub Wilk <jwilk@jwilk.net>
3 years agoinet.3: Switch to _DEFAULT_SOURCE in the example
Stephen Kitt [Fri, 7 Jan 2022 16:46:15 +0000 (17:46 +0100)] 
inet.3: Switch to _DEFAULT_SOURCE in the example

_BSD_SOURCE has been obsolete for long enough that it seems reasonable
to update the example program to use _DEFAULT_SOURCE instead.

Signed-off-by: Stephen Kitt <steve@sk2.org>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agoseccomp.2: Use syscall() in the example code
Stephen Kitt [Fri, 7 Jan 2022 16:46:14 +0000 (17:46 +0100)] 
seccomp.2: Use syscall() in the example code

Since seccomp() doesn't exist in glibc, avoid relying on it, and use
syscall() instead. This updates the example program to match the
documentation, which was updated in commit 5945cd7bd3c3 ("seccomp.2:
Use syscall(SYS_...); for system calls without a wrapper").

Signed-off-by: Stephen Kitt <steve@sk2.org>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agotee.2: ffix
наб [Mon, 3 Jan 2022 17:03:32 +0000 (18:03 +0100)] 
tee.2: ffix

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agotee.2: Remove unnecessary else
Alejandro Colomar [Mon, 3 Jan 2022 17:19:29 +0000 (18:19 +0100)] 
tee.2: Remove unnecessary else

Both continue and exit(3) jump out of the normal flow, so there's
no need for an else.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agotee.2: always fail after perror() in example
наб [Mon, 3 Jan 2022 17:03:56 +0000 (18:03 +0100)] 
tee.2: always fail after perror() in example

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agotee.2: use for(;;) instead of do{}while(1)
наб [Mon, 3 Jan 2022 17:03:44 +0000 (18:03 +0100)] 
tee.2: use for(;;) instead of do{}while(1)

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agotee.2: use proper types in example
наб [Mon, 3 Jan 2022 17:03:32 +0000 (18:03 +0100)] 
tee.2: use proper types in example

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agosystem_data_types.7: note struct timespec::tv_nsec type for x32 and portability
наб [Mon, 6 Dec 2021 23:31:38 +0000 (00:31 +0100)] 
system_data_types.7: note struct timespec::tv_nsec type for x32 and portability

There are three files that govern userspace struct timespec on glibc:
1. bits/wordsize.h, defining:
   (a) __WORDSIZE to 32 on ILP32 and 64 on LP64
   (b) on x32: __SYSCALL_WORDSIZE to 64
2. bits/timesize.h, defining
   (a) __TIMESIZE to __WORDSIZE, except on x32 where it's 64
3. bits/types/struct_timespec.h, declaring struct timespec as:
     struct timespec
     {
      __time_t tv_sec;      /* Seconds.  */
     #if __WORDSIZE == 64 \
      || (defined __SYSCALL_WORDSIZE && __SYSCALL_WORDSIZE == 64) \
      || __TIMESIZE == 32
      __syscall_slong_t tv_nsec;    /* Nanoseconds.  */
     #else
     # if __BYTE_ORDER == __BIG_ENDIAN
      int: 32;           /* Padding.  */
      long int tv_nsec;  /* Nanoseconds.  */
     # else
      long int tv_nsec;  /* Nanoseconds.  */
      int: 32;           /* Padding.  */
     # endif
     #endif
     };
   this has two side-effects: struct timespec
   (a) is always sizeof==time_t+8, and
   (b) has tv_nsec as __syscall_slong_t
       *and* !is_same<__syscall_slong_t, long>
       if using LP64 syscalls on an ILP32 system, i.e. on x32.

This means, that the simplified
  struct timespec {
      time_t  tv_sec;  /* Seconds */
      long    tv_nsec; /* Nanoseconds [0 .. 999999999] */
  };
declaration is *invalid* for x32,
where struct timespec::tv_nsec is an int64_t (long long).

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agotee.2: ffix
наб [Mon, 3 Jan 2022 15:33:53 +0000 (16:33 +0100)] 
tee.2: ffix

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agoioctl_tty.2: Update the section number of ldattach
Masatake YAMATO [Fri, 31 Dec 2021 08:36:07 +0000 (17:36 +0900)] 
ioctl_tty.2: Update the section number of ldattach

The man page for ldattach was added to util-linux(-ng?)
as a part of the section 8, not the section 1.

    commit 1e8d11c459ae93a4d8d7976a8530ae5198206a26
    Author: Tilman Schmidt <tilman@imap.cc>
    Date:   Mon Mar 10 14:20:26 2008 +0100

ldattach: new command

Add an ldattach(8) utility program similar to the one in OpenBSD.

Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agoencrypt.3: encrypt/encrypt_r, not crypt/crypt_r were deleted from 2.28
Huang Pei [Thu, 30 Dec 2021 09:42:51 +0000 (17:42 +0800)] 
encrypt.3: encrypt/encrypt_r, not crypt/crypt_r were deleted from 2.28

See sysdeps/unix/sysv/linux/riscv/rv{32,64}/libcrypt.abilist from
glibc

[alx]:

Confirmed.  See the following:

$ git checkout glibc-2.28
Previous HEAD position was 23158b08a0 Update for 2.27 release
HEAD is now at 3c03baca37 Update NEWS, version.h, and features.h for glibc 2.28.
$
$ grep_glibc_prototype crypt
crypt/crypt.h:36:
extern char *crypt (const char *__phrase, const char *__salt)
     __THROW __nonnull ((1, 2));
posix/unistd.h:1124:
extern char *crypt (const char *__key, const char *__salt)
     __THROW __nonnull ((1, 2));
$
$ grep_glibc_prototype encrypt
$
$ git checkout glibc-2.27
Previous HEAD position was 3c03baca37 Update NEWS, version.h, and features.h for glibc 2.28.
HEAD is now at 23158b08a0 Update for 2.27 release
$
$ grep_glibc_prototype crypt
crypt/crypt.h:32:
extern char *crypt (const char *__key, const char *__salt)
     __THROW __nonnull ((1, 2));
posix/unistd.h:1126:
extern char *crypt (const char *__key, const char *__salt)
     __THROW __nonnull ((1, 2));
$
$ grep_glibc_prototype encrypt
crypt/crypt.h:40:
extern void encrypt (char *__glibc_block, int __edflag)
     __THROW __nonnull ((1));
posix/unistd.h:1131:
extern void encrypt (char *__glibc_block, int __edflag)
     __THROW __nonnull ((1));
$

Signed-off-by: Huang Pei <huangpei@loongson.cn>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agoprintf.3: Add VERSIONS
Alejandro Colomar [Wed, 22 Dec 2021 18:11:58 +0000 (19:11 +0100)] 
printf.3: Add VERSIONS

CONFORMING TO contained info that should be in VERSIONS.
Add a new VERSIONS section and move that text.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agoprintf.3: Document %#m as strerrorname_np(errno)
Alejandro Colomar [Wed, 22 Dec 2021 18:00:20 +0000 (19:00 +0100)] 
printf.3: Document %#m as strerrorname_np(errno)

Reported-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Cc: libc-alpha@sourceware.org
Cc: Florian Weimer <fweimer@redhat.com>
Cc: Michael Kerrisk <mtk.manpages@gmail.com>
3 years agoaccess.2: Document EPERM error code
Alejandro Colomar [Sat, 18 Dec 2021 18:44:55 +0000 (19:44 +0100)] 
access.2: Document EPERM error code

[Todd]:

If a file/directory has the immutable flag set, access/faccessat
will return EPERM if write access is requested.  This is not
currently documented, presumably because it is Linux-specific
(though BSD has similar behavior that is documented).  Perhaps
something like the following in the ERRORS section.

EPERM Write permission was requested and pathname has the
immutable flag set.  (See also ioctl_iflags(2).)

Also perhaps add ioctl_iflags(2) to the SEE ALSO section.

This came up in reference to:
<https://github.com/sudo-project/sudo/issues/122>

Reported-by: "Todd C. Miller" <Todd.Miller@sudo.ws>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agomount_setattr.2, proc.5, netlink.7, tcp.7: tfix
Samanta Navarro [Wed, 24 Nov 2021 11:59:27 +0000 (11:59 +0000)] 
mount_setattr.2, proc.5, netlink.7, tcp.7: tfix

Typos found with codespell.

Signed-off-by: Samanta Navarro <ferivoz@riseup.net>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agopthread_cancel.3, pthread_cleanup_push_defer_np.3, pthread_setcancelstate.3, pthread_...
Samanta Navarro [Wed, 24 Nov 2021 11:58:58 +0000 (11:58 +0000)] 
pthread_cancel.3, pthread_cleanup_push_defer_np.3, pthread_setcancelstate.3, pthread_testcancel.3, pthreads.7: tfix

Changed cancellation to cancelation.

Signed-off-by: Samanta Navarro <ferivoz@riseup.net>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agokcmp.2: still depends on kconfig
Jann Horn [Wed, 8 Dec 2021 23:44:33 +0000 (00:44 +0100)] 
kcmp.2: still depends on kconfig

The manpage claims that kcmp() is now available unconditionally. That's
not true; from kernel/Makefile:

    obj-$(CONFIG_KCMP) += kcmp.o

This new Kconfig flag is forced on by CONFIG_CHECKPOINT_RESTORE as
before, but also by CONFIG_DRM, which means that pretty much any kernel
built to support desktop systems will implicitly have it available.

But if you compiled some kind of server/embedded kernel without DRM and
without CHECKPOINT_RESTORE, you'd have to flip on the expert config
option to get KCMP.

Signed-off-by: Jann Horn <jannh@google.com>
[alx: semantic newlines]
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agosystem_data_types.7: timespec: Add tv_nsec range to comment
наб [Mon, 6 Dec 2021 20:12:09 +0000 (21:12 +0100)] 
system_data_types.7: timespec: Add tv_nsec range to comment

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agoMany pages: replace in-line struct timespec declarations with "timespec(3) structure...
наб [Mon, 6 Dec 2021 20:12:02 +0000 (21:12 +0100)] 
Many pages: replace in-line struct timespec declarations with "timespec(3) structure" references

Also stripped "as specified in <time.h>" from clock_getres.2,
as it already lives in <time.h>.

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agomadvise.2: tfix
Matheus Tavares [Fri, 3 Dec 2021 17:28:07 +0000 (14:28 -0300)] 
madvise.2: tfix

Add a missing period.

Signed-off-by: Matheus Tavares <matheus.bernardino@usp.br>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agogetpwnam.3: EXAMPLES: Fix signedness
Alejandro Colomar [Tue, 23 Nov 2021 11:16:43 +0000 (12:16 +0100)] 
getpwnam.3: EXAMPLES: Fix signedness

sysconf(3) returns a long.  Since it can return -1 (and we're
making use of that value), we can't use size_t for bufsize.
Use long.

Link: <https://bugzilla.kernel.org/show_bug.cgi?id=215097>
Reported-by: Fabian <fabian@ritter-vogt.de>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agoinit_module.2: Add ETXTBSY error for finit_module
Yang Xu [Tue, 23 Nov 2021 00:59:09 +0000 (08:59 +0800)] 
init_module.2: Add ETXTBSY error for finit_module

Since kernel commit[1], finit_module fails with ETXTBSY error if fd has write permission.
Since kernel commit[2], finit_module fails with EBADF error if fd doesn't have read permission.

So we can use read-write permission to trigger ETXTBSY error all the time since linux 4.7.

[1]https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=39d637af
[2]https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=032146cd

Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agoquotactl.2: Add buggy version for Q_XQUOTARM ioctl
Yang Xu [Mon, 15 Nov 2021 02:26:07 +0000 (10:26 +0800)] 
quotactl.2: Add buggy version for Q_XQUOTARM ioctl

Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agopthread_atfork.3: wfix.
Elliott Hughes [Tue, 9 Nov 2021 22:20:32 +0000 (14:20 -0800)] 
pthread_atfork.3: wfix.

Clarify that the pthread_atfork() callback list is a global, not
per-thread.

The use of "this thread" implied to some readers that pthread_atfork()
maintained per-thread lists of callbacks. Given that the next sentence
already explains that the callbacks are run in the context of the thread
that calls fork(), I actually think it would be fine not to mention
threads at all in the earlier sentence, but for now I've gone with what
I think was intended to be written.

This patch also attempts to clarify other references to "thread",
and fixes a trivial typo "form" instead of "fork".

Signed-off-by: Elliott Hughes <enh@google.com>
Cc: Florian Weimer <fweimer@redhat.com>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agommap.2: ENOMEM possible when exceeding VA space
Topi Miettinen [Thu, 11 Nov 2021 18:04:17 +0000 (20:04 +0200)] 
mmap.2: ENOMEM possible when exceeding VA space

A bit surprisingly, mmap(2) returns ENOMEM when the virtual address
space of the CPU is exceeded.

The expectation could be EINVAL instead ("We don't like _addr_,
length, or offset (e.g., they are _too large_, or not aligned on a
page boundary)").

This is demonstrated with the following program:

 #include <stdio.h>
 #include <sys/mman.h>

 int main(void) {
  for (int i = 12; i < 64; i++) {
void *addr = mmap((void *)(1UL << i), 4096, PROT_NONE,
  MAP_ANON | MAP_FIXED_NOREPLACE | MAP_PRIVATE,
  -1, 0);
if (addr == MAP_FAILED)
fprintf(stderr, "mmap %lx: %m\n", (1UL << i));
continue;
munmap(addr, 4096);
}
 }

It gives the following output when running on CPU with 48 bit VA
space:

mmap 800000000000: Cannot allocate memory
mmap 1000000000000: Cannot allocate memory
mmap 2000000000000: Cannot allocate memory
mmap 4000000000000: Cannot allocate memory
mmap 8000000000000: Cannot allocate memory
mmap 10000000000000: Cannot allocate memory
mmap 20000000000000: Cannot allocate memory
mmap 40000000000000: Cannot allocate memory
mmap 80000000000000: Cannot allocate memory
mmap 100000000000000: Cannot allocate memory
mmap 200000000000000: Cannot allocate memory
mmap 400000000000000: Cannot allocate memory
mmap 800000000000000: Cannot allocate memory
mmap 1000000000000000: Cannot allocate memory
mmap 2000000000000000: Cannot allocate memory
mmap 4000000000000000: Cannot allocate memory
mmap 8000000000000000: Cannot allocate memory

Signed-off-by: Topi Miettinen <toiwoton@gmail.com>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agofanotify_init.2: Minor tweaks to Matthew's patch
Alejandro Colomar [Mon, 22 Nov 2021 16:54:48 +0000 (17:54 +0100)] 
fanotify_init.2: Minor tweaks to Matthew's patch

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Cc: Matthew Bobrowski <mbobrowski@mbobrowski.org>
Cc: Amir Goldstein <amir73il@gmail.com>
3 years agofanotify_init.2: Document kernel commits
Amir Goldstein [Sat, 20 Nov 2021 17:12:53 +0000 (19:12 +0200)] 
fanotify_init.2: Document kernel commits

Document the kernel commits that added support for FAN_REPORT_DIR_FID
and FAN_REPORT_NAME.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agofanotify_mark.2: Update w.r.t tmpfs support
Amir Goldstein [Sat, 20 Nov 2021 17:12:52 +0000 (19:12 +0200)] 
fanotify_mark.2: Update w.r.t tmpfs support

tmpfs can be watched with FAN_REPORT_FID since kernel v5.13.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agofanotify_init.2, fanotify_mark.2, fanotify.7: Configurable limits
Amir Goldstein [Sat, 20 Nov 2021 17:12:51 +0000 (19:12 +0200)] 
fanotify_init.2, fanotify_mark.2, fanotify.7: Configurable limits

Update documentation about the new configurable fanotify limits
that will be available from Linux kernel 5.13.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>