Commit Graph

13923 Commits

Author SHA1 Message Date
Marko Myllynen e4bcd97145 locale.5: Sort according to the standard
Sort the options so that those defined in POSIX are listed first,
then followed by those defined in ISO/IEC TR 14652 in the order
of common convention in many widely used glibc locales.

Actual descriptions are unchanged.

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

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-06-12 18:31:19 +02:00
Marko Myllynen cc7279ff2e locale.5: Remove the FIXME for timezone
The timezone of LC_TIME is not in POSIX, only 6 (out of ~300)
glibc locales define it, the glibc code comment below from
glibc.git/programs/ld-time.c seems to suggest it's not a good
idea, and there's been a proposal in upstream [1] to remove the
existing timezone definitions from glibc locales so I think
it's actually better to leave this one undocumented:

/* XXX We don't perform any tests on the timezone value since this is
   simply useless, stupid $&$!@...  */

1) https://sourceware.org/ml/libc-alpha/2015-06/msg00098.html

Move the remaining LC_COLLATE FIXMEs together while at it.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-06-12 18:30:09 +02:00
Marko Myllynen ea7208a6aa locale.5: Refer to strftime(3) where appropriate
The relationship between the locale time format syntax
and strftime() cannot be considered as obvious.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-06-12 18:27:55 +02:00
Marko Myllynen ab601e67b9 locale.5: Refer to locale(7) more prominently
It's probably a good idea to refer to locale(7) so that a reader
can check what a category is about before describing them in
detail.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-06-12 18:27:14 +02:00
Marko Myllynen 5f756e5ba5 setlocale.3: Update CONFORMING TO
http://pubs.opengroup.org/onlinepubs/9699919799/functions/setlocale.html

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-06-12 18:27:09 +02:00
Marko Myllynen 9ce8a1e00e setlocale.3: Tweak C/POSIX locale portability description
As discussed earlier, the current description might be a little
bit too stringent, let's avoid the issue by describing the
portability aspect on a slightly higher level.

References:

http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap06.html
http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap07.html
http://pubs.opengroup.org/onlinepubs/9699919799/functions/setlocale.html

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-06-12 18:24:46 +02:00
Michael Kerrisk 29c4533cd3 _exit.2: Open stdio frames are not flushed, temporary files are deleted
Many years ago, text was added to the page saying that it is
implementation-dependent whether stdio streams are flushed and
whether temporary are removed. In part, this change appears to
be because POSIX.1-2001 added text related to this point.
However, that seems to have been an error in POSIX, and the
text was subsequently removed for POSIX.1-2008. See
https://collaboration.opengroup.org/austin/interps/documents/9984/AI-085.txt
Austin Group Interpretation reference 1003.1-2001 #085

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-06-10 12:55:49 +02:00
Nathan Lynch ebfc361134 vdso.7: Update for ARM
The 32-bit ARM architecture in Linux has gained a vDSO as of the
4.1 release.  (I was the primary author.)

Document the symbols exported by the ARM VDSO.

Accepted kernel submission:
http://lists.infradead.org/pipermail/linux-arm-kernel/2015-March/332573.html

Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Nathan Lynch <nathan_lynch@mentor.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-06-05 09:25:00 +02:00
Michael Kerrisk be6b243ae2 epoll.7: tfix
See http://bugs.debian.org/787625

Reported-by: Uwe Kleine-König <uwe+debian@kleine-koenig.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-06-05 09:24:20 +02:00
Michael Kerrisk a41c3eccb2 elf.5: wfix
Reported-by: Hack NDo <hackndo@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-29 20:31:41 +02:00
Michael Kerrisk 70a9fec73b __ppc_get_timebase.3: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-27 10:32:12 +02:00
Michael Kerrisk 56aa9a9535 __ppc_get_timebase.3: Minor tweaks to example program
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-27 10:31:58 +02:00
Tulio Magno Quites Machado Filho 1e6e376298 __ppc_get_timebase_freq.3: Document the Power-specific __ppc_get_timebase_freq(3)
Glibc 2.17 adds a function to read the frequency at which the Time
Base Register of Power processors is updated.

Signed-off-by: Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-27 10:23:15 +02:00
Michael Kerrisk 1290b94b1c llseek.2: tfix
Reported-by: Namhyung Kim <namhyung@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-27 10:16:59 +02:00
Michael Kerrisk 728aff57dd fcntl.2: OFD locks are proposed for inclusion in the next POSIX revision
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-20 16:38:09 +02:00
Zeng Linggang 47f06c7567 utimensat.2: ATTRIBUTES: Note functions that are thread-safe
After research, We think utimensat() and futimens() are thread-safe.
But, there are not markings of utimensat() and futimens() in glibc
document.

Signed-off-by: Zeng Linggang <zenglg.jy@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-20 16:13:32 +02:00
Zeng Linggang 412793f9ff pthread_setname_np.3: ATTRIBUTES: Note functions that are thread-safe
After research, We think pthread_setname_np() and pthread_getname_np()
are thread-safe. But, there are not markings of pthread_setname_np()
and pthread_getname_np() in glibc document.

Signed-off-by: Zeng Linggang <zenglg.jy@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-20 16:13:27 +02:00
Zeng Linggang acc271be11 pthread_join.3: ATTRIBUTES: Note function that is thread-safe
After research, We think pthread_join() is thread-safe. But, there
is not marking of pthread_join() in glibc document.

Signed-off-by: Zeng Linggang <zenglg.jy@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-20 16:13:22 +02:00
Zeng Linggang bf0fbbcdd2 pthread_detach.3: ATTRIBUTES: Note function that is thread-safe
After research, We think pthread_detach() is thread-safe. But, there
is not marking of pthread_detach() in glibc document.

Signed-off-by: Zeng Linggang <zenglg.jy@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-20 16:13:17 +02:00
Zeng Linggang a7930e0d3d pthread_create.3: ATTRIBUTES: Note function that is thread-safe
After research, We think pthread_create() is thread-safe. But, there
is not marking of pthread_create() in glibc document.

Signed-off-by: Zeng Linggang <zenglg.jy@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-20 16:13:10 +02:00
Zeng Linggang ed6d44f8b4 pthread_cancel.3: ATTRIBUTES: Note function that is thread-safe
After research, We think pthread_cancel() is thread-safe. But, there
is not marking of pthread_cancel() in glibc document.

Signed-off-by: Zeng Linggang <zenglg.jy@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-20 16:13:02 +02:00
Zeng Linggang cdb9dd9e21 pthread_attr_init.3: ATTRIBUTES: Note functions that are thread-safe
After research, We think pthread_attr_init() and pthread_attr_destroy()
are thread-safe. But, there are not markings of pthread_attr_init()
and pthread_attr_destroy() in glibc document.

Signed-off-by: Zeng Linggang <zenglg.jy@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-20 16:12:54 +02:00
Zeng Linggang 5b53f4bac6 fpurge.3: ATTRIBUTES: Note function that is thread-safe
The marking matches glibc marking.
The marking of functions in glibc is:
- __fpurge: MT-Safe race:stream

Signed-off-by: Zeng Linggang <zenglg.jy@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-20 16:12:49 +02:00
Zeng Linggang 288c1a09dd eventfd.2: ATTRIBUTES: Note function that is thread-safe
After research, We think eventfd() is thread-safe. But, there
is not marking of eventfd() in glibc document.

Signed-off-by: Zeng Linggang <zenglg.jy@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-20 16:12:43 +02:00
Zeng Linggang 546e17cef9 clock_getres.2: ATTRIBUTES: Note functions that are thread-safe
After research, We think clock_getres(), clock_gettime() and
clock_settime() are thread-safe. But, there are not markings of
clock_getres(), clock_gettime() and clock_settime() in glibc document.

Signed-off-by: Zeng Linggang <zenglg.jy@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-20 16:12:36 +02:00
Michael Kerrisk e4b153acf5 mkstemp.3: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-20 12:56:22 +02:00
Michael Kerrisk 7626d2ce34 prctl.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-19 09:51:24 +02:00
Michael Kerrisk 1113f852f1 pthread_attr_init.3: Use "%zd" for printing size_t in example code
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-19 08:58:10 +02:00
Ben Woodard 8e83cef60d rtld-audit.7: Use correct printf() specifier for pointer types
In the example code you used %x rather than %p in the example
code for an audit library. The problem is that it truncates the
pointers on 64b platforms. So you get something like:

la_symbind64(): symname = strrchr sym->st_value = 0x7f4b8a3f8960
ndx = 222 flags = 0x0 refcook = 8b53e5c8 defcook = 8b537e30

rather than:

la_symbind64(): symname = fclose sym->st_value = 0x7fa452dd49b0
ndx = 1135 flags = 0x0 refcook = 0x7fa453f395c8 defcook = 0x7fa453f32e30

This has bitten me a handful of times when playing around with
audit test libraries to investigate its behavior.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-19 08:48:08 +02:00
Marko Myllynen d850c7e08f repertoiremap.5: Symbolic names AKA mnemonics
A long time ago in glibc, repertoire maps were used (but they
were removed already in 2000), those mapping files were named
as mnemonics, so "mnemonic" is a term that would almost
certainly come up if somebody studies glibc side (perhaps even
the related standards like ISO 9945 [which I don't have access
to]) so I thought it's worth to mention to term in the man page
to make sure we're talking about the same thing, otherwise
someone might wonder is that something different or not.

IOW, symbolic names and mnemonics are often used interchangeably,
let's mention the other often used term in the page, too.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-15 16:20:37 +02:00
Michael Kerrisk 6aeda2ec3f locale.5: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-15 16:03:26 +02:00
Marko Myllynen 89fca3422e charmap.5: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-15 15:49:55 +02:00
Michael Kerrisk 6b693d86d3 write.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-15 15:42:10 +02:00
Michael Kerrisk 577c0e20bb proc.5: Add /proc/crypto entry with a pointer to further information
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-15 15:42:07 +02:00
Michael Kerrisk 3434fb0b46 proc.5: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-15 11:27:58 +02:00
Michael Kerrisk b1aad373f2 proc.5: Move misordered /proc/[pid]/timers entry
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-15 09:28:05 +02:00
Michael Kerrisk 40e259bc36 proc.5: Tweak /proc/vmstat text
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-15 09:24:18 +02:00
Michael Kerrisk 1693f1368a proc.5: List /proc/vmstat fields
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-14 23:21:27 +02:00
Michal Hocko bbebbb6d56 mmap2: Clarify MAP_POPULATE
David Rientjes has noticed that MAP_POPULATE wording might promise
much more than the kernel actually provides and intend to provide.
The primary usage of the flag is to pre-fault the range. There is
no guarantee that no major faults will happen later on. The pages
might have been reclaimed by the time the process tries to access
them.

Reviewed-by: Eric B Munson <emunson@akamai.com>
Signed-off-by: Michal Hocko <mhocko@suse.cz>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-14 15:34:06 +02:00
Michal Hocko 7e3786bcdc mmap.2: Clarify MAP_LOCKED semantics
MAP_LOCKED had a subtly different semantic from mmap(2)+mlock(2)
since it has been introduced.
mlock(2) fails if the memory range cannot get populated to
guarantee that no future major faults will happen on the range.
mmap(MAP_LOCKED) on the other hand silently succeeds even if
the range was populated only partially.

Fixing this subtle difference in the kernel is rather awkward
because the memory population happens after mm locks have been
dropped and so the cleanup before returning failure (munlock)
could operate on something else than the originally mapped area.

E.g. speculative userspace page fault handler catching SEGV and
doing mmap(fault_addr, MAP_FIXED|MAP_LOCKED) might discard portion
of a racing mmap and lead to lost data. Although it is not clear
whether such a usage would be valid, mmap page doesn't explicitly
describe requirements for threaded applications so we cannot
exclude this possibility.

This patch makes the semantic of MAP_LOCKED explicit and suggests
using mmap + mlock as the only way to guarantee no later major
page faults.

Reviewed-by: Eric B Munson <emunson@akamai.com>
Signed-off-by: Michal Hocko <mhocko@suse.cz>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-14 15:31:11 +02:00
Michael Kerrisk 79ae0b1fbd MB_LEN_MAX.3: srcfix: add pointer to discussion of why glibc has MB_LEN_MAX==16
Reported-by: Pádraig Brady <P@draigBrady.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-14 15:20:57 +02:00
Zeng Linggang 8d53768435 sigaltstack.2: ATTRIBUTES: Note function that is thread-safe
The marking matches glibc marking.
The marking of functions in glibc is:
- sigaltstack: MT-Safe

Signed-off-by: Zeng Linggang <zenglg.jy@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-13 17:15:43 +02:00
Zeng Linggang be409be4e7 shm_open.3: ATTRIBUTES: Note functions that are thread-safe
The marking matches glibc marking.
markings of functions in glibc are:
- shm_open:   MT-Safe locale
- shm_unlink: MT-Safe locale

Signed-off-by: Zeng Linggang <zenglg.jy@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-13 17:15:39 +02:00
Zeng Linggang ca6b4c15e4 sem_open.3: ATTRIBUTES: Note function that is thread-safe
The marking matches glibc marking.
The marking of functions in glibc is:
- sem_open: MT-Safe

Signed-off-by: Zeng Linggang <zenglg.jy@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-13 17:15:34 +02:00
Zeng Linggang d71055dbde psignal.3: ATTRIBUTES: Note functions that are thread-safe
After research, We think psiginfo() is thread-safe. But, there
is not marking of psiginfo() in glibc document.
psignal() matches glibc marking.
- psignal:  MT-Safe locale
- psiginfo: MT-Safe locale

Signed-off-by: Zeng Linggang <zenglg.jy@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-13 17:15:29 +02:00
Zeng Linggang 3964d56df6 mq_notify.3: ATTRIBUTES: Note function that is thread-safe
After research, We think mq_notify() is thread-safe. But, there
is not marking of mq_notify() in glibc document.
- mq_notify: MT-Safe

Signed-off-by: Zeng Linggang <zenglg.jy@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-13 17:15:24 +02:00
Zeng Linggang 72dd4c2fe1 malloc_stats.3: ATTRIBUTES: Note function that is thread-safe
After research, We think malloc_stats() is thread-safe. But, there
is not marking of malloc_stats() in glibc document.
- malloc_stats: MT-Safe

Signed-off-by: Zeng Linggang <zenglg.jy@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-13 17:15:20 +02:00
Zeng Linggang 1cd7128b92 malloc_info.3: ATTRIBUTES: Note function that is thread-safe
After research, We think malloc_info() is thread-safe. But, there
is not marking of malloc_info() in glibc document.
- malloc_info: MT-Safe

Signed-off-by: Zeng Linggang <zenglg.jy@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-13 17:15:15 +02:00
Zeng Linggang 47e94221ff getrusage.2: ATTRIBUTES: Note function that is thread-safe
The marking matches glibc marking.
The marking of functions in glibc is:
- getrusage: MT-Safe

Signed-off-by: Zeng Linggang <zenglg.jy@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-13 17:15:11 +02:00
Zeng Linggang 57ba9747f4 getrlimit.2: ATTRIBUTES: Note functions that are thread-safe
After research, We think prlimit() is thread-safe. But, there
is not marking of prlimit() in glibc document.
getrlimit() and setrlimit() match glibc markings.
- getrlimit: MT-Safe
- setrlimit: MT-Safe
- prlimit:   MT-Safe

Signed-off-by: Zeng Linggang <zenglg.jy@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-13 17:15:06 +02:00