I noticed that the example in the readlink.2 man pages does error
checking for a race condition that would cause the value of the
symbolic link to get larger. However, it doesn't handle the
opposite case, in which the value gets shorter. (The NULL
terminator is always set at the old, longer offset.) This could
cause the program to operate on uninitialized data.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This improves the documentation of the various
perf_event_open()-related sysfs files.
Signed-off-by: Vince Weaver <vincent.weaver@maine.edu>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
It turns out PERF_IOC_FLAG_GROUP was broken from 75f937f24bd9
(in Linux 2.6.31, the initial perf_event release) until
724b6daa1 (Linux 3.4).
I've done some extensive kernel source code digging plus
running tests of various kernels and I hope the info
presented is accurate now.
(Patch edited somewhat by mtk.)
Signed-off-by: Vince Weaver <vincent.weaver@maine.edu>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
The functions fdim(), fdimf() and fdiml() are thread safe.
Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
For every PTRACE_O_TRACEfoo option, mention that old-style SIGSTOP
is replaced by PTRACE_EVENT_STOP if PTRACE_SEIZE attach was used.
Mention the same thing again in the description of
PTRACE_EVENT_STOP.
Acked-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Dmitry V. Levin <ldv@altlinux.org>
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
"The fabs() functions" should be replaced with "These functions".
Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
The functions fabs(), fabsf() and fabsl() are thread safe.
Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
The functions div(), ldiv(), lldiv() and imaxdiv() are thread
safe.
Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
The function clock_getcpuclockid() is thread safe.
Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This patch updates the perf_event_open() documentation to include
new interfaces added in the 3.10 kernel.
It also documents a few [To be documented] instances left over
from the 3.7 kernel.
Signed-off-by: Vince Weaver <vincent.weaver@maine.edu>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
The perf_event_open() ENABLE/DISABLE/RESET ioctls can take an
argument, PERF_IOC_FLAG_GROUP. This wasn't documented at all
until about a year ago (despite the support being there from
the beginning) so I missed this when initially writing
the man page.
Signed-off-by: Vince Weaver <vincent.weaver@maine.edu>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>