]> git.ipfire.org Git - thirdparty/man-pages.git/log
thirdparty/man-pages.git
4 years agoclock_nanosleep.2, timer_create.2, timerfd_create.2: Add various missing errors
Michael Kerrisk [Thu, 2 Apr 2020 06:39:08 +0000 (08:39 +0200)] 
clock_nanosleep.2, timer_create.2, timerfd_create.2: Add various missing errors

Mostly verified by testing and reading the code.

There is unfortunately quite a bit of inconsistency across API~s:

                  clock_gettime  clock_settime  clock_nanosleep  timer_create  timerfd_create

CLOCK_BOOTTIME            y        n (EINVAL)     y                y             y
CLOCK_BOOTTIME_ALARM      y        n (EINVAL)     y [1]            y [1]         y [1]
CLOCK_MONOTONIC           y        n (EINVAL)     y                y             y
CLOCK_MONOTONIC_COARSE    y        n (EINVAL)     n (ENOTSUP)      n (ENOTSUP)   n (EINVAL)
CLOCK_MONOTONIC_RAW       y        n (EINVAL)     n (ENOTSUP)      n (ENOTSUP)   n (EINVAL)
CLOCK_REALTIME            y        y              y                y             y
CLOCK_REALTIME_ALARM      y        n (EINVAL)     y [1]            y [1]         y [1]
CLOCK_REALTIME_COARSE     y        n (EINVAL)     n (ENOTSUP)      n (ENOTSUP)   n (EINVAL)
CLOCK_TAI                 y        n (EINVAL)     y                y             n (EINVAL)
CLOCK_PROCESS_CPUTIME_ID  y        n (EINVAL)     y                y             n (EINVAL)
CLOCK_THREAD_CPUTIME_ID   y        n (EINVAL)     n (EINVAL [2])   y             n (EINVAL)
pthread_getcpuclockid()   y        n (EINVAL)     y                y             n (EINVAL)

[1] The caller must have CAP_WAKE_ALARM, or the error EPERM results.

[2] This error is generated in the glibc wrapper.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agotimerfd_create.2: Rework text for EINVAL for invalid clock ID
Michael Kerrisk [Thu, 2 Apr 2020 10:12:11 +0000 (12:12 +0200)] 
timerfd_create.2: Rework text for EINVAL for invalid clock ID

The error description was crufty. There are more valid
clock IDs these days.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoclock_nanosleep.2: srcfix
Michael Kerrisk [Thu, 2 Apr 2020 08:52:26 +0000 (10:52 +0200)] 
clock_nanosleep.2: srcfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoclock_nanosleep.2: clock_nanosleep() can also sleep against CLOCK_TAI
Michael Kerrisk [Thu, 2 Apr 2020 08:49:26 +0000 (10:49 +0200)] 
clock_nanosleep.2: clock_nanosleep() can also sleep against CLOCK_TAI

Presumably since Linux 3.10, when CLOCK_TAI was added to the
kernel.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoclock_nanosleep.2: srcfix
Michael Kerrisk [Thu, 2 Apr 2020 08:26:46 +0000 (10:26 +0200)] 
clock_nanosleep.2: srcfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoclock_getres.2: CLOCK_REALTIME_COARSE is not settable
Michael Kerrisk [Thu, 2 Apr 2020 08:11:15 +0000 (10:11 +0200)] 
clock_getres.2: CLOCK_REALTIME_COARSE is not settable

In kernel/time/posix-timers.c, 'CLOCK_REALTIME_COARSE' has
no 'timer_set' method.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoclock_getres.2: wfix
Michael Kerrisk [Thu, 2 Apr 2020 08:09:24 +0000 (10:09 +0200)] 
clock_getres.2: wfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoclock_getres.2: tfix
Michael Kerrisk [Thu, 2 Apr 2020 08:08:06 +0000 (10:08 +0200)] 
clock_getres.2: tfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoclock_getres.2: Add CLOCK_REALTIME_ALARM and CLOCK_BOOTTIME_ALARM
Michael Kerrisk [Thu, 2 Apr 2020 07:28:57 +0000 (09:28 +0200)] 
clock_getres.2: Add CLOCK_REALTIME_ALARM and CLOCK_BOOTTIME_ALARM

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agotimer_create.2: timer_create(2) also supports CLOCK_TAI
Michael Kerrisk [Thu, 2 Apr 2020 07:02:30 +0000 (09:02 +0200)] 
timer_create.2: timer_create(2) also supports CLOCK_TAI

Presumably (and from a quick glance at the source code)
since Linux 3.10. when CLOCK_TAI was introduced.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agotimer_create.2: Mention clock_getres(2) for further details on the various clocks
Michael Kerrisk [Thu, 2 Apr 2020 07:00:11 +0000 (09:00 +0200)] 
timer_create.2: Mention clock_getres(2) for further details on the various clocks

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoclock_nanosleep.2: clock_nanosleep() also supports CLOCK_BOOTTIME
Michael Kerrisk [Thu, 2 Apr 2020 06:31:41 +0000 (08:31 +0200)] 
clock_nanosleep.2: clock_nanosleep() also supports CLOCK_BOOTTIME

Presumably (and from a quick glance at the source code)
since Linux 2.6.39, when CLOCK_BOOTTIME was introduced.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoclock_getres.2: wfix
Michael Kerrisk [Wed, 1 Apr 2020 19:30:37 +0000 (21:30 +0200)] 
clock_getres.2: wfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agotimerfd_create.2: wfix
Michael Kerrisk [Wed, 1 Apr 2020 08:04:32 +0000 (10:04 +0200)] 
timerfd_create.2: wfix

See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=947091

Reported-by: Marc Lehmann <debian-reportbug@plan9.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoopenat2.2: srcfix: remove a FIXME
Michael Kerrisk [Wed, 1 Apr 2020 06:36:49 +0000 (08:36 +0200)] 
openat2.2: srcfix: remove a FIXME

Aleksa Sarai is okay with my text changes.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoopenat2.2: wfix
Michael Kerrisk [Wed, 1 Apr 2020 06:18:45 +0000 (08:18 +0200)] 
openat2.2: wfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoopenat2.2: Improve text describing caveat for use of RESOLVE_NO_XDEV
Michael Kerrisk [Wed, 1 Apr 2020 06:16:40 +0000 (08:16 +0200)] 
openat2.2: Improve text describing caveat for use of RESOLVE_NO_XDEV

From email discussions with Aleksa Sarai:

> .\" FIXME I find the "previously-functional systems" in the previous
> .\" sentence a little odd (since openat2() ia new sysycall), so I would
> .\" like to clarify a little...
> .\" Are you referring to the scenario where someone might take an
> .\" existing application that uses openat() and replaces the uses
> .\" of openat() with openat2()? In which case, is it correct to
> .\" understand that you mean that one should not just indiscriminately
> .\" add the RESOLVE_NO_XDEV flag to all of the openat2() calls?
> .\" If I'm not on the right track, could you point me in the right
> .\" direction please.

This is mostly meant as a warning to hopefully avoid applications
because the developer didn't realise that system paths may contain
symlinks or bind-mounts. For an application which has switched to
openat2() and then uses RESOLVE_NO_SYMLINKS for a non-security reason,
it's possible that on some distributions (or future versions of a
distribution) that their application will stop working because a system
path suddenly contains a symlink or is a bind-mount.

This was a concern which was brought up on LWN some time ago. If you can
think of a phrasing that makes this more clear, I'd appreciate it.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoopenat2.2: Various tweaks to the dicussion of 'resolve' flags
Michael Kerrisk [Tue, 31 Mar 2020 07:39:22 +0000 (09:39 +0200)] 
openat2.2: Various tweaks to the dicussion of 'resolve' flags

Some tweaks inspired by https://lwn.net/Articles/796868/

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoopenat2.2: wfix
Michael Kerrisk [Tue, 31 Mar 2020 07:11:20 +0000 (09:11 +0200)] 
openat2.2: wfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoopenat2.2: Place 'resolve' flags in alphabetical order
Michael Kerrisk [Tue, 31 Mar 2020 07:10:05 +0000 (09:10 +0200)] 
openat2.2: Place 'resolve' flags in alphabetical order

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agotimerfd_create.2: Negetive changes to CLOCK_REALTIME may cause read() to return 0
Michael Kerrisk [Mon, 30 Mar 2020 20:52:58 +0000 (22:52 +0200)] 
timerfd_create.2: Negetive changes to CLOCK_REALTIME may cause read() to return 0

Devi R K reported this issue, and went on to note:

> We have written a program using real time clock and it has been raised to
> the community.
>
> https://lore.kernel.org/lkml/alpine.DEB.2.21.1908191943280.1796@nanos.tec.linutronix.de/T/

[...]

Thanks for pointing me at that thread. In particular, the test
program at
https://lore.kernel.org/lkml/alpine.DEB.2.21.1908191943280.1796@nanos.tec.linutronix.de/T/#m489d81abdfbb2699743e18c37657311f8d52a4cd

[...]

I think this patch does not really capture the details
properly. The immediately preceding paragraph says:

         If  the  associated  clock  is  either  CLOCK_REALTIME   or
         CLOCK_REALTIME_ALARM,     the     timer     is     absolute
         (TFD_TIMER_ABSTIME), and the  flag  TFD_TIMER_CANCEL_ON_SET
         was  specified when calling timerfd_settime(), then read(2)
         fails with the  error  ECANCELED  if  the  real-time  clock
         undergoes a discontinuous change.  (This allows the reading
         application to discover such discontinuous changes  to  the
         clock.)

Following on from that, I think we should have a paragraph that says
something like:

         If  the  associated  clock  is  either  CLOCK_REALTIME   or
         CLOCK_REALTIME_ALARM,     the     timer     is     absolute
         (TFD_TIMER_ABSTIME), and the  flag  TFD_TIMER_CANCEL_ON_SET
         was not specified when calling timerfd_settime(), then a
         discontinuous negative change to the clock
         (e.g., clock_settime(2)) may cause read(2) to unblock, but
         return a value of 0 (i.e., no bytes read), if the clock
         change occurs after the time expired, but before the
         read(2) on the timerfd file descriptor.

This seems consistent with Thomas's observations in
https://lore.kernel.org/lkml/alpine.DEB.2.21.1908191943280.1796@nanos.tec.linutronix.de/T/#m49b78122b573a2749a05b720dc9fa036546db490

==
Thomas Gleixner replied:

Yes, that's correct. Accurate as always!

This is pretty much in line with clock_nanosleep(CLOCK_REALTIME,
TIMER_ABSTIME) which has a similar problem vs. observability in user
space.

clock_nanosleep(2) mutters:

  "POSIX.1 specifies that after changing the value of the CLOCK_REALTIME
   clock via clock_settime(2), the new clock value shall be used to
   determine the time at which a thread blocked on an absolute
   clock_nanosleep() will wake up; if the new clock value falls past the
   end of the sleep interval, then the clock_nanosleep() call will return
   immediately."

which can be interpreted as guarantee that clock_nanosleep() never
returns prematurely, i.e. the assert() in the below code would indicate
a kernel failure:

   ret = clock_nanosleep(CLOCK_REALTIME, TIMER_ABSTIME, &expiry, NULL);
   if (!ret) {
         clock_gettime(CLOCK_REALTIME, &now);
         assert(now >= expiry);
   }

But that assert can trigger when CLOCK_REALTIME was modified after the
timer fired and the kernel decided to wake up the task and let it return
to user space.

   clock_nanosleep(..., &expiry)
     arm_timer(expires);
     schedule();

   -> timer interrupt
      now = ktime_get_real();
      if (expires <= now)
              -------------------------------- After this point
         wakeup();                             clock_settime(2) or
                                               adjtimex(2) which
                                               makes CLOCK_REALTIME
                                               jump back far enough will
                                               cause the above assert
                                               to trigger.

   ...
   return from syscall (retval == 0)

There is no guarantee against clock_settime() coming after the
wakeup. Even if we put another check into the return to user path then
we won't catch a clock_settime() which comes right after that and before
user space invokes clock_gettime().

POSIX spec Issue 7 (2018 edition) says:

 The suspension for the absolute clock_nanosleep() function (that is,
 with the TIMER_ABSTIME flag set) shall be in effect at least until the
 value of the corresponding clock reaches the absolute time specified by
 rqtp.

And that's what the kernel implements for clock_nanosleep() and timerfd
behaves exactly the same way.

The wakeup of the waiter, i.e. task blocked in clock_nanosleep(2),
read(2), poll(2), is not happening _before_ the absolute time specified
is reached.

If clock_settime() happens right before the expiry check, then it does
the right thing, but any modification to the clock after the wakeup
cannot be mitigated. At least not in a way which would make the assert()
in the example code above a reliable indicator for a kernel fail.

That's the reason why I rejected the attempt to mitigate that particular
0 tick issue in timerfd as it would just scratch a particular itch but
still not provide any guarantee. So having the '0' return documented is
the right way to go.

Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Reported-by: devi R.K <devi.feb27@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoopenat2.2: srcfix
Michael Kerrisk [Mon, 30 Mar 2020 20:41:25 +0000 (22:41 +0200)] 
openat2.2: srcfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agopath_resolution.7: srcfix: semantic newlines
Michael Kerrisk [Mon, 30 Mar 2020 20:36:13 +0000 (22:36 +0200)] 
path_resolution.7: srcfix: semantic newlines

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agopath_resolution.7: Update to mention openat2(2) features
Aleksa Sarai [Sun, 2 Feb 2020 15:19:06 +0000 (02:19 +1100)] 
path_resolution.7: Update to mention openat2(2) features

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoopenat2.2: Minor tweaks to the text
Michael Kerrisk [Mon, 30 Mar 2020 20:19:36 +0000 (22:19 +0200)] 
openat2.2: Minor tweaks to the text

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoopenat2.2: Further tweaks to the RESOLVE_IN_ROOT text
Michael Kerrisk [Mon, 30 Mar 2020 19:52:32 +0000 (21:52 +0200)] 
openat2.2: Further tweaks to the RESOLVE_IN_ROOT text

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoopenat2.2: Minor tweaks to RESOLVE_IN_ROOT text
Michael Kerrisk [Mon, 30 Mar 2020 19:41:47 +0000 (21:41 +0200)] 
openat2.2: Minor tweaks to RESOLVE_IN_ROOT text

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoopenat2.2: Minor change: reword a sentence
Michael Kerrisk [Mon, 30 Mar 2020 19:20:41 +0000 (21:20 +0200)] 
openat2.2: Minor change: reword a sentence

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoopenat2.2: tfix
Michael Kerrisk [Mon, 30 Mar 2020 19:17:52 +0000 (21:17 +0200)] 
openat2.2: tfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoopenat2.2: srcfix: Disfavor multiargument .BR and .IR usage
Michael Kerrisk [Mon, 30 Mar 2020 12:49:20 +0000 (14:49 +0200)] 
openat2.2: srcfix: Disfavor multiargument .BR and .IR usage

For me, source lines such as:

    .BR perf_setattr "(2), " perf_event_open "(2), and " clone3 (2).

is harder to read than:

    .BR perf_setattr (2),
    .BR perf_event_open (2),
    and
    .BR clone3 (2).

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoopenat2.2: Rework RESOLVE_IN_ROOT text
Michael Kerrisk [Mon, 30 Mar 2020 12:41:07 +0000 (14:41 +0200)] 
openat2.2: Rework RESOLVE_IN_ROOT text

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoopenat2.2: Reorganize and rework introductory text a little
Michael Kerrisk [Mon, 30 Mar 2020 11:43:32 +0000 (13:43 +0200)] 
openat2.2: Reorganize and rework introductory text a little

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoopenat2.2: Remove one of the forward references to the "Extensibility" subsection
Michael Kerrisk [Mon, 30 Mar 2020 11:33:57 +0000 (13:33 +0200)] 
openat2.2: Remove one of the forward references to the "Extensibility" subsection

There are currently three of these forward references (two in
DESCRIPTION, one in ERRORS). This is a little redundant.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoopenat2.2: Various wording improvements to Aleksa Sarai's text
Michael Kerrisk [Mon, 30 Mar 2020 10:28:41 +0000 (12:28 +0200)] 
openat2.2: Various wording improvements to Aleksa Sarai's text

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoopen.2: Clarify that O_NOFOLLOW is relevant (only) for basename of 'pathname'
Michael Kerrisk [Mon, 30 Mar 2020 10:20:08 +0000 (12:20 +0200)] 
open.2: Clarify that O_NOFOLLOW is relevant (only) for basename of 'pathname'

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoopenat2.2: wfix: explicitly qualify fields of 'how' argument with "how."
Michael Kerrisk [Mon, 30 Mar 2020 09:48:03 +0000 (11:48 +0200)] 
openat2.2: wfix: explicitly qualify fields of 'how' argument with "how."

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoopenat2.2: ffix
Michael Kerrisk [Mon, 30 Mar 2020 08:22:48 +0000 (10:22 +0200)] 
openat2.2: ffix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoopenat2.2: Place ERRORS in alphabetical order
Michael Kerrisk [Mon, 30 Mar 2020 08:17:22 +0000 (10:17 +0200)] 
openat2.2: Place ERRORS in alphabetical order

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoopenat2.2: ffix
Michael Kerrisk [Mon, 30 Mar 2020 07:54:06 +0000 (09:54 +0200)] 
openat2.2: ffix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoopenat2.2: ffix (mainly: replace blank lines by .IP or .PP)
Michael Kerrisk [Mon, 30 Mar 2020 07:37:03 +0000 (09:37 +0200)] 
openat2.2: ffix (mainly: replace blank lines by .IP or .PP)

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoopenat2.2: spfix
Michael Kerrisk [Mon, 30 Mar 2020 06:53:59 +0000 (08:53 +0200)] 
openat2.2: spfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoopenat2.2: srcfix: eliminate redundant blank lines
Michael Kerrisk [Mon, 30 Mar 2020 06:51:21 +0000 (08:51 +0200)] 
openat2.2: srcfix: eliminate redundant blank lines

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoopenat2.2: srcfix: semantic newlines and rewrap some long source lines
Michael Kerrisk [Mon, 30 Mar 2020 06:46:16 +0000 (08:46 +0200)] 
openat2.2: srcfix: semantic newlines and rewrap some long source lines

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoopen.2: Minor tweaks to Aleksa Sarai's patch
Michael Kerrisk [Mon, 30 Mar 2020 06:45:58 +0000 (08:45 +0200)] 
open.2: Minor tweaks to Aleksa Sarai's patch

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoopen.2: Add references to new openat2(2) page
Aleksa Sarai [Mon, 30 Mar 2020 06:37:02 +0000 (08:37 +0200)] 
open.2: Add references to new openat2(2) page

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoopenat2.2: Document new openat2(2) syscall
Aleksa Sarai [Mon, 30 Mar 2020 06:34:45 +0000 (08:34 +0200)] 
openat2.2: Document new openat2(2) syscall

Rather than trying to merge the new syscall documentation into
open.2 (which would probably result in the man-page being
incomprehensible), instead the new syscall gets its own dedicated
page with links between open(2) and openat2(2) to avoid
duplicating information such as the list of O_* flags or common
errors.

In addition to describing all of the key flags, information about
the extensibility design is provided so that users can better
understand why they need to pass sizeof(struct open_how) and how
their programs will work across kernels. After some discussions
with David Laight, I also included explicit instructions to zero
the structure to avoid issues when recompiling with new headers.

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoclock_getres.2: ERRORS: add EINVAL for attempt to set a nonsettable clock
Michael Kerrisk [Sun, 29 Mar 2020 20:36:19 +0000 (22:36 +0200)] 
clock_getres.2: ERRORS: add EINVAL for attempt to set a nonsettable clock

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoclock_getres.2: Improve description of CPU-time clocks
Michael Kerrisk [Sun, 29 Mar 2020 20:14:00 +0000 (22:14 +0200)] 
clock_getres.2: Improve description of CPU-time clocks

The current descriptions are a bit terse. Make the description
a little clearer.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoclock_getres.2: Note that CPU-time clocks are not settable.
Michael Kerrisk [Sun, 29 Mar 2020 20:11:24 +0000 (22:11 +0200)] 
clock_getres.2: Note that CPU-time clocks are not settable.

Explicitly note that CLOCK_PROCESS_CPUTIME_ID and
CLOCK_PROCESS_CPUTIME_ID are not settable.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoclock_getres.2: Move text in BUGS to NOTES
Michael Kerrisk [Sun, 29 Mar 2020 20:08:10 +0000 (22:08 +0200)] 
clock_getres.2: Move text in BUGS to NOTES

The fact that CLOCK_PROCESS_CPUTIME_ID and
CLOCK_PROCESS_CPUTIME_ID are not settable isn't a bug,
since POSIX does allow the possibility that these clocks
are not settable.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoclock_getres.2: Minor wording improvement
Michael Kerrisk [Sun, 29 Mar 2020 19:42:21 +0000 (21:42 +0200)] 
clock_getres.2: Minor wording improvement

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agosignal.7: wfix
Michael Kerrisk [Sun, 29 Mar 2020 07:22:38 +0000 (09:22 +0200)] 
signal.7: wfix

Reported-by: Pablo M. Ronchi <pmronchi@yahoo.com.ar>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoclock_getres.2: tfix
Benjamin Peterson [Fri, 27 Mar 2020 04:17:49 +0000 (23:17 -0500)] 
clock_getres.2: tfix

Signed-off-by: Benjamin Peterson <benjamin@python.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agofutex.2: wfix
André Almeida [Mon, 16 Mar 2020 20:47:57 +0000 (17:47 -0300)] 
futex.2: wfix

The sixth argument of futex is uaddr2, instead of uaddr.

Signed-off-by: André Almeida <andrealmeid@collabora.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agounits.7: tfix
Jakub Wilk [Mon, 23 Mar 2020 08:57:50 +0000 (09:57 +0100)] 
units.7: tfix

Escape hyphens.

Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoprintf.3: ffix
Jakub Wilk [Mon, 23 Mar 2020 09:00:38 +0000 (10:00 +0100)] 
printf.3: ffix

Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoclock_getres.2: Minor tweaks to Benjamin Peterson's patch
Michael Kerrisk [Thu, 26 Mar 2020 07:45:20 +0000 (08:45 +0100)] 
clock_getres.2: Minor tweaks to Benjamin Peterson's patch

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoclock_getres.2: srcfix
Michael Kerrisk [Thu, 26 Mar 2020 07:44:37 +0000 (08:44 +0100)] 
clock_getres.2: srcfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoclock_getres.2: Document CLOCK_TAI
Benjamin Peterson [Sat, 21 Mar 2020 22:08:09 +0000 (17:08 -0500)] 
clock_getres.2: Document CLOCK_TAI

Signed-off-by: Benjamin Peterson <benjamin@python.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agovsock.7: srcfix: semantic newlines
Michael Kerrisk [Sat, 14 Mar 2020 18:34:56 +0000 (19:34 +0100)] 
vsock.7: srcfix: semantic newlines

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agovsock.7: Minor tweaks to Stefano Garzarella's patch
Michael Kerrisk [Sat, 14 Mar 2020 18:36:20 +0000 (19:36 +0100)] 
vsock.7: Minor tweaks to Stefano Garzarella's patch

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agovsock.7: Add VMADDR_CID_LOCAL description
Stefano Garzarella [Tue, 18 Feb 2020 15:54:35 +0000 (16:54 +0100)] 
vsock.7: Add VMADDR_CID_LOCAL description

Linux 5.6 added the new well-known VMADDR_CID_LOCAL for
local communication.

This patch explains how to use it and removes the legacy
VMADDR_CID_RESERVED no longer available.

Reviewed-by: Jorgen Hansen <jhansen@vmware.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agosem_post.3: Add a reference to code example code in shm_open(3)
Michael Kerrisk [Fri, 28 Feb 2020 15:10:40 +0000 (16:10 +0100)] 
sem_post.3: Add a reference to code example code in shm_open(3)

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agosem_init.3: Add references to example code in shm_open(3) and sem_wait(3)
Michael Kerrisk [Fri, 28 Feb 2020 15:09:20 +0000 (16:09 +0100)] 
sem_init.3: Add references to example code in shm_open(3) and sem_wait(3)

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoshm_open.3: EXAMPLE: add some example programs
Michael Kerrisk [Fri, 28 Feb 2020 15:07:24 +0000 (16:07 +0100)] 
shm_open.3: EXAMPLE: add some example programs

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agotimerfd_create.2: srcfix: remove obsolete FIXME
Michael Kerrisk [Fri, 28 Feb 2020 12:30:07 +0000 (13:30 +0100)] 
timerfd_create.2: srcfix: remove obsolete FIXME

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agotimer_getoverrun.2: srcfix: Update FIXME
Michael Kerrisk [Fri, 28 Feb 2020 12:29:35 +0000 (13:29 +0100)] 
timer_getoverrun.2: srcfix: Update FIXME

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agogettid.2: Remove obsolete FIXME
Michael Kerrisk [Fri, 28 Feb 2020 12:20:11 +0000 (13:20 +0100)] 
gettid.2: Remove obsolete FIXME

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoexecve.2: ERRORS: ENOENT does not occur for missing shared libraries
Michael Kerrisk [Fri, 28 Feb 2020 12:12:53 +0000 (13:12 +0100)] 
execve.2: ERRORS: ENOENT does not occur for missing shared libraries

See http://sourceware.org/bugzilla/show_bug.cgi?id=12241.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoshmget.2: Add a reference to the example in shmop(2)
Michael Kerrisk [Fri, 28 Feb 2020 10:56:07 +0000 (11:56 +0100)] 
shmget.2: Add a reference to the example in shmop(2)

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agosemctl.2: Add a reference to the example in shmop(2)
Michael Kerrisk [Fri, 28 Feb 2020 10:55:30 +0000 (11:55 +0100)] 
semctl.2: Add a reference to the example in shmop(2)

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agosemop.2: Add a reference to the semop(2) example in shmop(2)
Michael Kerrisk [Fri, 28 Feb 2020 10:54:23 +0000 (11:54 +0100)] 
semop.2: Add a reference to the semop(2) example in shmop(2)

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoshmop.2: EXAMPLE: add a pair of example programs
Michael Kerrisk [Fri, 28 Feb 2020 10:47:33 +0000 (11:47 +0100)] 
shmop.2: EXAMPLE: add a pair of example programs

Add example programs demonstrating usage of shmget(2), shmat(2),
semget(2), semctl(2), and semop(2).

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoftok.3: EXAMPLE: add a reference to the example in semget(2)
Michael Kerrisk [Fri, 28 Feb 2020 09:13:01 +0000 (10:13 +0100)] 
ftok.3: EXAMPLE: add a reference to the example in semget(2)

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agosemget.2: EXAMPLE: add an example program
Michael Kerrisk [Fri, 28 Feb 2020 09:12:03 +0000 (10:12 +0100)] 
semget.2: EXAMPLE: add an example program

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agostatx.2: Minor tweaks to Eric Bigger's patch
Michael Kerrisk [Thu, 12 Mar 2020 08:20:50 +0000 (09:20 +0100)] 
statx.2: Minor tweaks to Eric Bigger's patch

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agostatx.2: Document STATX_ATTR_VERITY
Eric Biggers [Tue, 28 Jan 2020 19:24:49 +0000 (11:24 -0800)] 
statx.2: Document STATX_ATTR_VERITY

Document the verity attribute for statx(), which was added in
Linux 5.5.

For more context, see the fs-verity documentation:
https://www.kernel.org/doc/html/latest/filesystems/fsverity.html

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agosocket.7: tfix
Jakub Wilk [Fri, 6 Mar 2020 11:41:04 +0000 (12:41 +0100)] 
socket.7: tfix

Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agosemctl.2: tfix
Jakub Wilk [Fri, 6 Mar 2020 11:41:03 +0000 (12:41 +0100)] 
semctl.2: tfix

Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoChanges.old: tfix
Jakub Wilk [Fri, 6 Mar 2020 11:41:02 +0000 (12:41 +0100)] 
Changes.old: tfix

Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoclone.2: tfix
Krzysztof Małysa [Thu, 5 Mar 2020 21:35:37 +0000 (22:35 +0100)] 
clone.2: tfix

Fix clone3() syscall description for CLONE_PARENT_SETTID: kernel uses
cl_args.parent_tid instead of the specified cl_args.child_tid.

Signed-off-by: Krzysztof Małysa <varqox@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agomlock.2: ffix
Mike Frysinger [Fri, 6 Mar 2020 06:00:57 +0000 (01:00 -0500)] 
mlock.2: ffix

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoproc.5: tfix
Jakub Wilk [Wed, 11 Mar 2020 22:56:32 +0000 (23:56 +0100)] 
proc.5: tfix

Escape hyphens.

Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years ago_exit.2: Clarify that raw _exit() system call terminates only the calling thread
Michael Kerrisk [Wed, 4 Mar 2020 21:36:31 +0000 (22:36 +0100)] 
_exit.2: Clarify that raw _exit() system call terminates only the calling thread

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years ago_exit.2: Minor wording tweaks
Michael Kerrisk [Wed, 4 Mar 2020 21:33:41 +0000 (22:33 +0100)] 
_exit.2: Minor wording tweaks

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agostat.2: Clarify definitions of timestamp fields
Michael Kerrisk [Mon, 2 Mar 2020 16:45:05 +0000 (17:45 +0100)] 
stat.2: Clarify definitions of timestamp fields

In particular, make it clear that atime and mtime relate to the
file *data*.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agogetifaddrs.3: EXAMPLE: remove unneeded loop variable
Michael Kerrisk [Sat, 29 Feb 2020 21:41:15 +0000 (22:41 +0100)] 
getifaddrs.3: EXAMPLE: remove unneeded loop variable

Reported-by: Michael Galassi <michael@galassi.us>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agopoll.2: ffix
Michael Kerrisk [Fri, 28 Feb 2020 21:12:33 +0000 (22:12 +0100)] 
poll.2: ffix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoinotify_add_watch.2: EXAMPLE: add referecne to example in inotify(7)
Michael Kerrisk [Fri, 28 Feb 2020 21:08:38 +0000 (22:08 +0100)] 
inotify_add_watch.2: EXAMPLE: add referecne to example in inotify(7)

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agosocket.7: Add more details on SO_SELECT_ERR_QUEUE
Michael Kerrisk [Mon, 29 Jul 2019 18:51:22 +0000 (20:51 +0200)] 
socket.7: Add more details on SO_SELECT_ERR_QUEUE

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agosocket.7: srcfix
Michael Kerrisk [Mon, 29 Jul 2019 13:14:40 +0000 (15:14 +0200)] 
socket.7: srcfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agosocket.7: Add description of SO_SELECT_ERR_QUEUE
Ricardo Biehl Pasquali [Mon, 24 Jun 2019 01:40:47 +0000 (22:40 -0300)] 
socket.7: Add description of SO_SELECT_ERR_QUEUE

Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agosemctl.2: wfix
Michael Kerrisk [Fri, 28 Feb 2020 07:46:58 +0000 (08:46 +0100)] 
semctl.2: wfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoexecve.2: wfix
Michael Kerrisk [Fri, 28 Feb 2020 07:41:51 +0000 (08:41 +0100)] 
execve.2: wfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoexecve.2: wfix
Michael Kerrisk [Fri, 28 Feb 2020 07:37:51 +0000 (08:37 +0100)] 
execve.2: wfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoexecve.2: Explicitly note that argv[argc] == NULL in the new program
Michael Kerrisk [Fri, 28 Feb 2020 07:36:53 +0000 (08:36 +0100)] 
execve.2: Explicitly note that argv[argc] == NULL in the new program

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoexecve.2: wfix
Michael Kerrisk [Fri, 28 Feb 2020 07:32:32 +0000 (08:32 +0100)] 
execve.2: wfix

4 years agomsgop.2: ffix
Michael Kerrisk [Thu, 27 Feb 2020 13:00:09 +0000 (14:00 +0100)] 
msgop.2: ffix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agosemop.2: ffix
Michael Kerrisk [Tue, 25 Feb 2020 20:48:53 +0000 (21:48 +0100)] 
semop.2: ffix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoshmop.2: ffix
Michael Kerrisk [Tue, 25 Feb 2020 20:47:57 +0000 (21:47 +0100)] 
shmop.2: ffix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>