Commit Graph

12642 Commits

Author SHA1 Message Date
Michael Kerrisk dbc45ff182 tzset.3: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-01 17:04:21 +01:00
J William Piggott 343d131418 tzset.3: typos and version bump
Signed-off-by: J William Piggott <elseifthen@gmx.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-01 16:30:36 +01:00
J William Piggott 411dded247 tzset.3: There are only two TZ formats
tzset(3) currently states that there are three TZ formats. The
first two it lists are actually variations of the POSIX-style
TZ format, of which there are at least five variations.

This patch corrects this to match the POSIX specification of
TZ having only two formats.

http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html

Signed-off-by: J William Piggott <elseifthen@gmx.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-01 16:29:49 +01:00
J William Piggott a321c9154c tzset.3: Fix incorrect TZ string representation
The TZ string representation indicates that the start/end
rules are required; this is incorrect.

Updated the TZ string format to the POSIX specification and
improve its readability by having only the optional parts in
italics.

http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html

Signed-off-by: J William Piggott <elseifthen@gmx.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-01 16:28:59 +01:00
Masanari Iida 56b0fba442 localedef.1: tfix
Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-01 16:25:17 +01:00
Michael Kerrisk 1d2bf1840c capabilities.7: SEE ALSO: add setpriv(1)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-01 09:32:37 +01:00
Michael Kerrisk 35d82b2596 getopt.3: SEE ALSO: add getopt(1)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-01 09:27:24 +01:00
Michael Kerrisk c04700fb25 termios.3: SEE ALSO: add reset(1), setterm(1), tput(1)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-01 09:26:38 +01:00
Michael Kerrisk 64f7f61e8c passwd.5: SEE ALSO: add chfn(1), chsh(1)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-01 09:25:53 +01:00
Michael Kerrisk fd4b38534c personality.2: SEE ALSO: add setarch(8)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-01 09:13:57 +01:00
Michael Kerrisk 3907aed3a1 getrandom.2: srcfix: Update copyright for Heinrich
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-01-31 14:37:52 +01:00
Michael Kerrisk f86ee883f4 getrandom.2: Add mtk to copyright
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-01-31 14:37:30 +01:00
Michael Kerrisk e84195de1e kexec_load.2: ERRROS: add some details to kexec_file_load ENOEXEC error
Reported-by: Scot Doyle <lkml14@scotdoyle.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-01-30 16:23:45 +01:00
Michael Kerrisk 077e532d80 getrandom.2: Minor tweaks
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-01-29 23:28:58 +01:00
Michael Kerrisk bfa4433525 socket.2: Tweaks to Stephan Mueller's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-01-29 23:24:57 +01:00
Stephan Mueller 31d070f8b4 socket.2: document AF_ALG
Add a reference to the AF_ALG protocol accessible via socket(2).

Signed-off-by: Stephan Mueller <stephan.mueller@atsec.com>
CC: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-01-29 23:22:59 +01:00
J William Piggott 1cec674c72 tzset.3: Add description for posixrules file
Based upon reviewing the glibc source, the posixrules file is being used
for very specific TZ strings that can be represented as:

[:]stdoffsetdst[offset][,]

If anything follows the above string, even invalid data, posixrules will
not be used. Below is some shell output demonstrating this.

$ TZ="NZST-12:00:00NZDT-13:00:00,ANYTHING" \
strace -eopen date 2>&1 | grep -Ei 'posixrules|jan'
Thu Jan 29 06:53:35 NZDT 2015

$ TZ="NZST-12:00:00NZDT-13:00:00," \
strace -eopen date 2>&1 | grep -Ei 'posixrules|jan'
open("/usr/share/zoneinfo/posixrules", O_RDONLY|O_CLOEXEC) = 3
Thu Jan 29 05:54:58 NZST 2015

Signed-off-by: J William Piggott <elseifthen@gmx.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-01-29 23:19:19 +01:00
J William Piggott c1e90e15d3 tzset.3: Add ENVIRONMENT section + other rearrangements
FILES section was overly verbose and included
environment variables.  Added ENVIRONMENT section,
removing ENV VARS from the FILES section.

As stated in commit 2c7f200, /usr/share/zoneinfo/localtime
is not used, nor recommended by glibc.

Signed-off-by: J William Piggott <elseifthen@gmx.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-01-29 23:16:58 +01:00
Michael Kerrisk 0646abd614 getrandom.2: Rework GRND_RANDOM text
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-01-29 23:12:23 +01:00
Michael Kerrisk 3426471b46 getrandom.2: Rework discussion of blocking section on interuption by signals
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-01-29 23:12:23 +01:00
Michael Kerrisk 8f891eb06d semget.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-01-29 11:12:44 +01:00
Michael Kerrisk 6b5e7695be getrandom.2: Reads from /dev/urandom can block for large request sizes
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-01-29 09:12:48 +01:00
Michael Kerrisk 2cc7c11a89 getrandom.2: SEE ALSO: add signal(7)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-01-29 09:03:32 +01:00
Michael Kerrisk 3168ff2db7 signal.7: Add getrandom(2) to list of restartable system calls
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-01-29 09:03:32 +01:00
Michael Kerrisk a66935bad6 getrandom.2: Give the reader a hint about when /dev/urandom is initialized
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-01-29 09:03:32 +01:00
Michael Kerrisk 2c7135dbfb getrandom.2: Minor tweaks to Heinrich's text
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-01-29 09:03:32 +01:00
Heinrich Schuchardt 11353d7b62 getrandom.2: Clarification of open questions
With his last patches for getrandom.2 Michael Kerrisk posed a few
questions and left some comments in the man-page. This patch
seeks to clarify the open issues.

 72 For example, if the call is interrupted by a signal handler,
 73 it may return a partially filled buffer, or fail with the error
 74 .BR EINTR .
 75 .\" Tested with buffer sizes > 256 bytes: both partial reads
 76 .\" and EINTR can occur, with the former being more frequent.
 77 .\"

Michael's observation agrees with the code.
For buffer size > 256: If the buffer is still empty EINTR occurs.
If any number of bytes has been read to the buffer, that number
is returned.  The comment can be removed.

 78 .\" mtk: In the absence of signals, in my testing, even very large reads
 79 .\" return full buffers. I found that reads of up to 33554431 always
 80 .\" returned a filled buffer. Specifying 'buflen' > 33554431 always
 81 .\" returned just 33554431 bytes. (I'm not sure where that number comes
        from.

The maximum number of bytes transferred is limited for
/dev/urandom to:

    nbytes = min_t(size_t, nbytes, INT_MAX >> (ENTROPY_SHIFT + 3));
    // <= 0x1fffff

and for /dev/random to
nbytes = min_t(size_t, nbytes, SEC_XFER_SIZE); // <= 0x200

Lets put this into the NOTES section.

 224 When reading from
 225 .IR /dev/random ,
 226 blocking requests of any size can be interrupted by a signal
 227 (the call fails with the error
 228 .BR EINTR ).

Thats ok.

 82 If the pool has not yet been initialized, then the call blocks, unless
 83 .B GRND_RANDOM
 84 is specified in
 85 .IR flags .
 86 .\" FIXME We need a bit more information here.
 87 .\"       The reader will ask: when is /dev/urandom initialized?
 88 .\"       There should be some text here to explain that.

Entropy is collected from different sources, e.g.
 - time of reaping a thread
 - MAC address of a network interfaces
 - Allwinner security ID
 - ROM content of a firewire device
 - ...

When more than 128 bits have been collected, the pool is set
to initialized.

I suggest that detailed information about the initialization
should be provided on the random.4 page.

I added a paragraph in the NOTES section.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-01-29 09:02:41 +01:00
Michael Kerrisk 053e5e6914 getrandom.2: Enhance discussion of /dev/urandom reads in DESCRIPTION
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-01-29 09:02:41 +01:00
Michael Kerrisk 652febf0d9 getrandom.2: Clarify interaction of GRND_RANDOM and signals
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-01-29 09:02:41 +01:00
Michael Kerrisk 05e4d7afa9 getrandom.2: NOTES: clarify discussion of EINTR error
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-01-29 09:02:41 +01:00
Michael Kerrisk 473844a13d getrandom.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-01-29 09:02:41 +01:00
Michael Kerrisk f350b993d0 getrandom.2: srcfix: add FIXME
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-01-29 09:02:41 +01:00
Michael Kerrisk 973ff2fc67 getrandom.2: Clarify text with respect to GRND_NONBLOCK
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-01-29 09:02:41 +01:00
Michael Kerrisk 28ef3452e4 getrandom.2: Clarify sentence on getrandom() and partial GRND_RANDOM reads
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-01-29 09:02:41 +01:00
Michael Kerrisk 978323c72e getrandom.2: Reword sentence on blocked getrandom() and interruption by signals
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-01-29 09:02:41 +01:00
Michael Kerrisk 81d43c5023 getrandom.2: Minor wording fixes
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-01-29 09:02:41 +01:00
Michael Kerrisk 3851c7aa65 getrandom.2: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-01-29 09:02:41 +01:00
Heinrich Schuchardt e14ee946e8 getrandom.2: Rework paragraphs marked with FIXME
The patch clarifies when blocking may occur while calling
getrandom().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-01-29 09:02:41 +01:00
Heinrich Schuchardt 16199698a6 getrandom.2: Mention bug concerning treatment of interrupts
Theodore Ts'o confirmed the bug described in
https://lkml.org/lkml/2014/11/29/16

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-01-29 09:02:41 +01:00
Michael Kerrisk e8009a53e8 getrandom.2: Reword GRND_RANDOM description
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-01-29 09:02:41 +01:00
Michael Kerrisk d2a1b46b62 getrandom.2: Reword GRND_NONBLOCK description
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-01-29 09:02:41 +01:00
Michael Kerrisk 7028ce50ab getrandom.2: Add a sentence to clarify the default behavior of getrandom()
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-01-29 09:02:41 +01:00
Michael Kerrisk a550a24de3 getrandom.2: srcfix: added FIXME
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-01-29 09:02:41 +01:00
Michael Kerrisk 01a6407427 getrandom.2: Minor wording fixes
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-01-29 09:02:40 +01:00
Heinrich Schuchardt dcd72baa13 random.4: SEE ALSO: add getrandom(2)
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-01-29 09:02:40 +01:00
Heinrich Schuchardt d929b8016b random.3: SEE ALSO: add getrandom(2)
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-01-29 09:02:40 +01:00
Heinrich Schuchardt 18647599c7 getrandom.2: New page documenting getrandom(2)
Kernel 3.17 introduces a new system call getrandom(2).

The man page in this patch is based on the commit message by
Theodore Ts'o and suggestions by Michael Kerrisk.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-01-29 09:02:40 +01:00
Michael Kerrisk 6f0dcebc96 signal.7: Add F_OFD_SETLKW to list of restartable operations
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-01-29 08:51:21 +01:00
Michael Kerrisk 91907c29c0 kexec_load.2: srcfix: add mtk to copyright list
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-01-28 21:56:38 +01:00
Michael Kerrisk 32a7f2ba0a kexec_load.2: ERRORS: add some further error cases
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-01-28 21:56:38 +01:00