Commit Graph

16693 Commits

Author SHA1 Message Date
Mike Frysinger 9c72e3cad8 elf(5): document notes
Document the Elf{32,64}_Nhdr structure, the sections/segments that
contain notes, and how to interpret them.  I've been lazy and only
included the GNU extensions here, especially as others are not
defined in the elf.h header file as shipped by glibc.

I've mostly used binutils, glibc, breakpad, and the GABI ELF spec
as sources of data for these fields.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-11-27 11:15:37 +01:00
Michael Kerrisk 33e2220924 setsid.2: Improve wording of text on calling setsid() after fork()+_exit()
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-11-27 10:56:34 +01:00
Michael Kerrisk 983c70fcfc random.7: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-11-26 14:31:53 +01:00
Michael Kerrisk 289b177f0f random.7: Remove recommendation against consuming large amounts of randomness
From the email discussion:

> >    Usage recommendations
> >        The kernel random-number generator relies on  entropy  gathered
> >        from  device  drivers and other sources of environmental noise.
> >        It is designed to produce a small amount of  high-quality  seed
> >        material to seed a cryptographically secure pseudorandom number
> >        generator (CSPRNG).  It is designed for  security,  not  speed,
> >        and  is  poorly  suited  to generating large amounts of crypto‐
> >        graphic random data.  Users should be economical in the  amount
> >        of seed material that they consume via getrandom(2), /dev/uran‐
> >        dom, and /dev/random.
> >
> >        ┌─────────────────────────────────────────────────────┐
> >        │FIXME                                                │
> >        ├─────────────────────────────────────────────────────┤
> >        │Is it really  necessary  to  avoid  consuming  large │
> >        │amounts from /dev/urandom? Various sources linked to │
> >        │by https://bugzilla.kernel.org/show_bug.cgi?id=71211 │
> >        │suggest it is not.                                   │
> >        │                                                     │
> >        │And: has the answer to the previous question changed │
> >        │across kernel versions?                              │
> >        └─────────────────────────────────────────────────────┘
> >        Consuming unnecessarily large  quantities  of  data  via  these
> >        interfaces  will  have  a negative impact on other consumers of
> >        randomness.

[Ted T'so:]

> So "poorly suited" is definitely true.  Also true is that urandom is
> not engineered for use for non-cryptographic uses.  It's always going
> to be faster to use random(3) for those purposes.
>
> As far as whether or not it has a negative impact, it depends on how
> much you trust the underlying cryptographic algorithms.  If the CSPRNG
> is seeded correctly with at least 256 bits of entropy that can't be
> guessed by the attacker, and if the underlying cryptographic
> primitives are secure, then it won't matter.  But *if* there is an
> unknown vulnerability in the underlying primitive, and *if* large
> amounts of data generated by the CSPRNG would help exploit that
> vulnerability, and *if* that bulk amount of CSPRNG output is made
> available to an attacker with the capability to break the underlying
> cryptographic vulnerability, then there would be a problem.
>
> Obviously, no one knows of such a vulnerability, and I'm fairly
> confident that there won't be such a vulnerability across the
> different ways we've used to generate the urandom source --- but some
> people are professional paranoids, and would argue that we shouldn't
> make bulk output of the CSPRNG available for no good reason, just in
> case.

[Nikos Mavrogiannopoulos:]

The above is certainly accurate, however, I think that such a
discussion or text, when reflected to a man-page is going to
cause problems. The audience of a man-page are not crypto people,
and seeing such text would create confusion rather than clarify
how these devices/apis should be used. The *if* part is not put
into a perspective, suggesting that such an *if* is possible.
However, if one clarifies, i.e., in that case, your TLS or SSH
connection is most likely broken as well, and not because of any
attack on /dev/urandom, then one can see that we are heading
towards a theoretical discussion.

My suggestion, on that particular text would be to remove it,
but make it explicit somewhere in the text that all the
assurances for the devices depend on the crypto primitives,
rather than describing risks that may arise on particular
usage patterns *if* primitives are broken.

Reviewed-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Reported-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-11-26 14:31:53 +01:00
Darrick J. Wong c835f0e088 fideduperange.2: Fix the discussion of maximum sizes
Fix the discussion of the limitations on the dest_count and
src_length parameters to the fideduperange ioctl() to reflect
what's actually in the kernel.

Reviewed-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
2016-11-26 14:31:26 +01:00
Michael Kerrisk 5b711f5e45 mbsnrtowcs.3: Note behavior of mbsnrtowcs() for an incomplete character
Note the behavior of mbsnrtowcs() when an incomplete character
is found at end of the input buffer.

Reported-by: Igor Liferenko <igor.liferenko@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-11-26 14:15:59 +01:00
Michael Kerrisk 9caecea1f2 mbsnrtowcs.3: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-11-26 14:06:12 +01:00
Michael Kerrisk 88e28f78bd sched.7: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-11-22 14:44:07 +01:00
Michael Kerrisk 573ae2a478 proc.5: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-11-22 13:53:24 +01:00
Michael Kerrisk 3c61c8ac19 sched.7: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-11-22 13:42:49 +01:00
Michael Kerrisk cfd62fa259 sched.7: Give the page a more generic NAME
The page isn't just about APIs.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-11-22 13:21:32 +01:00
Michael Kerrisk 1f7fb9c057 sched.7: NOTES: mention cgroups CPU controller
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-11-22 13:19:20 +01:00
Michael Kerrisk 5ddb62b287 reboot.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-11-22 10:02:47 +01:00
Wang Long 90e072b633 reboot.2: Note errors for invalid commands inside a PID namespace
Signed-off-by: Wang Long <long.wanglong@huawei.com>
2016-11-22 09:53:14 +01:00
Michael Kerrisk e9477548b0 timerfd_create.2: Document TFD_TIMER_CANCEL_ON_SET
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-11-21 23:34:38 +01:00
Michael Kerrisk 510625764c timerfd_create.2: Rework discussion on relative and absolute timers
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-11-21 23:34:38 +01:00
Michael Kerrisk 4c7471193b timerfd_create.2: Document CLOCK_BOOTTIME, CLOCK_REALTIME_ALARM, and CLOCK_BOOTTIME_ALARM
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-11-21 23:34:38 +01:00
Michael Kerrisk 1bf5cb75dd timer_create.2: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-11-21 23:34:38 +01:00
Michael Kerrisk 4b76fffb6a timerfd_create.2: Rework description of clocks as a hanging list
Done in part as preparation for following patches.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-11-21 23:34:22 +01:00
Michael Kerrisk cc83f4d1bb clock_getres.2: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-11-21 14:59:43 +01:00
Michael Kerrisk 0bbe872f38 clock_getres.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-11-21 14:57:04 +01:00
Michael Kerrisk 8b047fe272 timer_create.2: Document CLOCK_REALTIME_ALARM and CLOCK_BOOTTIME_ALARM
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-11-21 14:53:44 +01:00
Michael Kerrisk 39c97bde31 timer_create.2: Document CLOCK_BOOTTIME
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-11-21 14:41:59 +01:00
Michael Kerrisk 5fe5d581c6 signalfd.2: Document ssi_addr_lsb field of signalfd_siginfo
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-11-21 14:31:06 +01:00
Michael Kerrisk 17be9ac5ad signalfd.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-11-21 14:29:11 +01:00
Michael Kerrisk 02326b5cce isalpha.3: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-11-21 13:20:29 +01:00
Michael Kerrisk a57bca4d34 mbstowcs.3: Add missing include to example program
See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=845172

Reported-by: Igor Liferenko <igor.liferenko@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-11-21 11:33:56 +01:00
Michael Kerrisk 176b1a7665 mmap.2: Add (much) more detail on MAP_GROWSDOWN
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-11-21 11:06:41 +01:00
Michael Kerrisk 86f12eb091 mmap.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-11-21 11:06:35 +01:00
Michael Kerrisk 3a06e3f7a8 mprotect.2: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-11-21 11:01:46 +01:00
Michael Kerrisk 93d210fd5a mprotect.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-11-21 11:01:46 +01:00
Michael Kerrisk d88d01c6b8 mprotect.2: Various fixes to Eugene Syromyatnikov's text
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-11-21 11:01:46 +01:00
Michael Kerrisk be232513a2 mprotect.2: srcfix: rewrap source lines
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-11-21 10:58:57 +01:00
Eugene Syromyatnikov a9799e8a86 mprotect.2: Document PROT_SEM, PROT_SAO, PROT_GROWSUP, and PROT_GROWSDOWN 2016-11-21 10:58:11 +01:00
Michael Kerrisk 50efeef8ca mmap.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-11-21 10:54:55 +01:00
Michael Kerrisk 55a51edbd7 bootparam.7: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-11-21 10:54:55 +01:00
Michael Kerrisk 0805a3dd37 close.2: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-11-21 10:54:55 +01:00
Michael Kerrisk 40382e5ec4 proc.5: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-11-21 08:31:01 +01:00
Michael Kerrisk 41a926bfa6 prctl.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-11-20 19:02:23 +01:00
Michael Kerrisk ffb0dafce7 prctl.2: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-11-20 18:28:02 +01:00
Michael Kerrisk 07d6076e59 prctl.2: Tweaks after comments from Eugene Syromyatnikov
Reported-by: Eugene Syromyatnikov <evgsyr@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-11-20 18:25:34 +01:00
Michael Kerrisk fb90e0c7ca prctl.2: Remove numeric definitions of PR_FP_MODE_FR and PR_FP_MODE_FRE bits
There's no obvious reason to supply the numeric values
for these bit-mask constants.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-11-20 12:25:12 +01:00
Michael Kerrisk 8950730593 prctl.2: Minor wording fixes
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-11-20 12:21:56 +01:00
Michael Kerrisk b3073df8f9 prctl.2: srcfix: rewrap lines
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-11-20 11:32:37 +01:00
Eugene Syromyatnikov 64a53a6768 prctl.2: Document PR_SET_FP_MODE and PR_GET_FP_MODE
Based on description provided in commit 9791554b and information in
https://dmz-portal.mips.com/wiki/MIPS_O32_ABI_-_FR0_and_FR1_Interlinking
2016-11-20 11:24:04 +01:00
Michael Kerrisk 7c896e1ece random.7: wfix
Reported-by: Jeremy Harris <jgh@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-11-19 11:28:46 +01:00
Michael Kerrisk 2e8302fca0 remainder.3: Note fix to remainder(nan(""), 0) handling
The bug https://www.sourceware.org/bugzilla/show_bug.cgi?id=6779
has been fixed in glibc 2.15.
2016-11-19 11:28:46 +01:00
Michael Kerrisk f5a9a2041a remainder.3: Document fixes for EDOM handling for range errors
The bug http://sources.redhat.com/bugzilla/show_bug.cgi?id=6783
was fixed in glibc 2.15.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-11-19 11:28:46 +01:00
Michael Kerrisk bde63f932d tgamma.3: Document fixes to give ERANGE for underflow range error
The bug https://www.sourceware.org/bugzilla/show_bug.cgi?id=6810
was fixed in glibc 2.19.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-11-18 20:18:03 +01:00
Michael Kerrisk a4439a507a inotify.7: srcfix: FIXME
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-11-18 10:41:26 +01:00