Commit Graph

8735 Commits

Author SHA1 Message Date
Michael Kerrisk 548f91f86e memusage.1, pldd.1, sprof.1, add_key.2, bind.2, bpf.2, clone.2, dup.2, epoll_ctl.2, eventfd.2, fanotify_init.2, fanotify_mark.2, futex.2, getdents.2, getpid.2, getrlimit.2, intro.2, ioctl_fat.2, ioctl_ns.2, kcmp.2, keyctl.2, membarrier.2, memfd_create.2, mprotect.2, msgctl.2, msgop.2, nfsservctl.2, open.2, open_by_handle_at.2, openat2.2, outb.2, perf_event_open.2, pivot_root.2, recv.2, recvmmsg.2, request_key.2, sched_setaffinity.2, sched_setattr.2, seccomp.2, select.2, send.2, signalfd.2, spu_run.2, sysctl.2, timer_create.2, userfaultfd.2, wait.2, CPU_SET.3, abs.3, argz_add.3, backtrace.3, bsearch.3, bswap.3, clock_getcpuclockid.3, cmsg.3, dl_iterate_phdr.3, dlinfo.3, dlopen.3, drand48.3, drand48_r.3, duplocale.3, encrypt.3, endian.3, envz_add.3, errno.3, ffs.3, fopencookie.3, get_phys_pages.3, getaddrinfo.3, getaddrinfo_a.3, getdate.3, getgrent_r.3, getgrouplist.3, getifaddrs.3, getline.3, getprotoent_r.3, getpwent_r.3, getpwnam.3, getservent_r.3, hsearch.3, insque.3, intro.3, lrint.3, lround.3, lseek64.3, mallinfo.3, malloc_hook.3, malloc_info.3, mbsinit.3, mbstowcs.3, mtrace.3, newlocale.3, ntp_gettime.3, offsetof.3, perror.3, posix_fallocate.3, posix_spawn.3, printf.3, psignal.3, pthread_attr_init.3, pthread_create.3, pthread_getattr_np.3, pthread_getcpuclockid.3, pthread_setaffinity_np.3, pthread_setname_np.3, pthread_sigmask.3, qsort.3, rand.3, random.3, rpc.3, rtnetlink.3, scalbln.3, shm_open.3, stdarg.3, strcat.3, strerror.3, strfmon.3, strptime.3, strsignal.3, strtod.3, strtok.3, strtol.3, strtoul.3, tsearch.3, wordexp.3, loop.4, vcs.4, veth.4, core.5, locale.5, slabinfo.5, cgroup_namespaces.7, cpuset.7, credentials.7, fanotify.7, feature_test_macros.7, inotify.7, ip.7, kernel_lockdown.7, man.7, mount_namespaces.7, namespaces.7, pid_namespaces.7, rtld-audit.7, sigevent.7, sock_diag.7, standards.7, unix.7, user_namespaces.7: tstamp
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-11-01 21:06:59 +01:00
Alejandro Colomar 23a74bd771 openat.2: SYNOPSIS: return long
The Linux kernel uses long as the return type for this syscall.
As glibc provides no wrapper, use the same type the kernel uses.

Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-11-01 19:04:11 +01:00
Alejandro Colomar a024704790 mq_getsetattr.2: Use 'const' when appropriate
The Linux kernel uses the following:

ipc/mqueue.c:1480:
SYSCALL_DEFINE3(mq_getsetattr, mqd_t, mqdes,
		const struct mq_attr __user *, u_mqstat,
		struct mq_attr __user *, u_omqstat)

Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-11-01 18:23:38 +01:00
Michael Kerrisk 2e33563284 statx.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-11-01 07:17:20 +01:00
Alejandro Colomar 68219aba7f futex.2: ffix
That comment wrapped on an 80-column terminal.
Divide it into two lines.

Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-30 21:05:10 +01:00
Alejandro Colomar 2253ecf016 futex.2: Use appropriate types
The Linux kernel uses the following:

kernel/futex.c:3778:
SYSCALL_DEFINE6(futex, u32 __user *, uaddr, int, op, u32, val,
		struct __kernel_timespec __user *, utime, u32 __user *, uaddr2,
		u32, val3)

Since there is no glibc wrapper, use the same types the kernel uses.

Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-30 20:16:08 +01:00
Alejandro Colomar 8a60718ef0 futex.2: srcfix
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-30 20:15:59 +01:00
Alejandro Colomar 13e88b7070 getdents.2: Use appropriate types
[mtk: Applied patch manually]

getdents():
This function has no glibc wrapper.
As such, we should use the same types the Linux kernel uses:
Use 'long' as the return type.

getdents64():
The glibc wrapper uses:
ssize_t getdents64(int, void *, size_t);

Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-29 20:10:56 +01:00
Michael Kerrisk 833ba57027 getdents.2: Minor tweak to Alex's patch
The text in NOTES doesn't really relate specifically to
the #include, so remove the comment on the #include.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-28 22:17:53 +01:00
Alejandro Colomar 2adfdd7795 getdents.2: SYNOPSIS: Add missing header and feature test macro
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-28 22:16:41 +01:00
Alejandro Colomar d70361dab7 getdents.2: wfix
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-28 22:14:02 +01:00
Alejandro Colomar 276dc9a3cc clock_getres.2: EXAMPLES: Use 'const' when appropriate
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-28 22:13:50 +01:00
Michael Kerrisk 4111ac7675 perf_event_open.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-27 17:59:36 +01:00
Michael Kerrisk 0f66701491 perf_event_open.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-27 17:55:07 +01:00
Alexey Budankov d19b29a5bc perf_event_open.2: Update the man page with CAP_PERFMON related information
Extend this page with the information about CAP_PERFMON capability
designed to secure performance monitoring and observability
operation in a system according to the principle of least
privilege [1] (POSIX IEEE 1003.1e, 2.2.2.39).

[1] https://sites.google.com/site/fullycapable/, posix_1003.1e-990310.pdf

Signed-off-by: Alexey Budankov <alexey.budankov@linux.intel.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-27 17:53:10 +01:00
Michael Kerrisk 1e4d6750e0 clone.2: CAP_CHECKPOINT_RESTORE can now be used to employ 'set_tid'
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-27 14:51:44 +01:00
Michael Kerrisk 11fd5e7c2a membarrier.2, openat2.2, insque.3, proc.5, tzfile.5, hier.7: Minor grammar fix
Don't hyphenate after adjective ending in "ly". See, for example:
https://www.dragoman.ist/compound-modifiers-with-words-ending-in-ly/
https://www.merriam-webster.com/words-at-play/6-common-hypercorrections-and-how-to-avoid-them/between-you-and-i

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-25 13:12:57 +01:00
Alejandro Colomar 6280809fb8 openat2.2, loop.4: tfix: s/non-zero/nonzero/
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-22 23:06:02 +02:00
Michael Kerrisk 2009b72758 setns.2: Correct the version for time namespace support
Time namespaces were added in kernel 5.6, but setns() support
for time namespaces was added only starting with kernel 5.8:

    commit 76c12881a38aaa83e1eb4ce2fada36c3a732bad4
    Author: Christian Brauner <christian.brauner@ubuntu.com>
    Date:   Mon Jul 6 17:49:11 2020 +0200

        nsproxy: support CLONE_NEWTIME with setns()

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-20 12:54:32 +02:00
Michael Kerrisk 02667b1ee5 link.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-16 08:47:15 +02:00
Michael Kerrisk 4b6e3782e1 seccomp.2: Warn reader that SECCOMP_RET_TRACE can be overridden
Highlight to the reader that if another filter returns a
higher-precedence action value, then the ptracer will not
be notified.

Reported-by: Jann Horn <jannh@google.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-15 13:06:36 +02:00
Michael Kerrisk 5d771a4a9d futex.2, quotactl.2: wfix: use "bitwise" rather than "bit-wise"
Most manual pages already use "bitwise".

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-14 18:34:45 +02:00
Michael Kerrisk 2c1b51b14b epoll_ctl.2: epoll instances can be nested to a maximum depth of 5
This limit appears to be an off-by-one count against
EP_MAX_NESTS (4).

Verified by experiment.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-09 23:49:54 +02:00
Michael Kerrisk be1586b2f6 epoll_ctl.2: Move some version info from CONFORMING TO to VERSIONS
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-09 23:06:43 +02:00
Michael Kerrisk 2650e82753 recv.2, send.2: Add cross references to pages with further info about ancillary data
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-08 07:42:24 +02:00
Michael Kerrisk 0f849717a9 send.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-08 07:00:11 +02:00
Samanta Navarro 9d4976ce7d mmap.2, proc.5, bpf-helpers.7, cpuset.7: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-07 19:24:59 +02:00
Aleksa Sarai bbed82c069 openat2.2: tfix: fix minor reference typo
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-30 21:45:57 +02:00
Aleksa Sarai 1953608d8a sched_getattr.2: Update to include changed size semantics
Due to a userspace breakage, commit 1251201c0d34 ("sched/core: Fix
uclamp ABI bug, clean up and robustify sched_read_attr() ABI logic
and code") changed the semantics of sched_getattr(2) when the
userspace struct is smaller than the kernel struct. Now, any
trailing non-zero data in the kernel structure is ignored when
copying to userspace. We also document the original error code
correctly (it was EFBIG not E2BIG) in the BUGS section.

Ref: 1251201c0d34 ("sched/core: Fix uclamp ABI bug, clean up and
                 robustify sched_read_attr() ABI logic and code")

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-30 21:45:23 +02:00
Michael Kerrisk c089afee8b perf_event_open.2: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-29 16:41:26 +02:00
Michael Kerrisk 3cf6149060 adjtimex.2, futex.2, semop.2, slabinfo.5, feature_test_macros.7, keyrings.7: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-29 16:34:29 +02:00
Michael Kerrisk d39ad78f73 _exit.2, access.2, acct.2, brk.2, chdir.2, chmod.2, chown.2, chroot.2, clock_getres.2, clock_nanosleep.2, fsync.2, futimesat.2, getdomainname.2, getgroups.2, gethostname.2, getpagesize.2, getrlimit.2, getsid.2, gettimeofday.2, kill.2, link.2, madvise.2, mincore.2, mkdir.2, mknod.2, nanosleep.2, nice.2, open.2, posix_fadvise.2, pread.2, process_vm_readv.2, readlink.2, readv.2, rename.2, select.2, semop.2, seteuid.2, setpgid.2, setreuid.2, sigaction.2, sigaltstack.2, sigpending.2, sigprocmask.2, sigsuspend.2, sigwaitinfo.2, stat.2, stime.2, symlink.2, sync.2, syscall.2, timer_create.2, timer_delete.2, timer_getoverrun.2, timer_settime.2, truncate.2, unlink.2, utimensat.2, vfork.2, vhangup.2, wait.2, wait4.2, a64l.3, abs.3, acos.3, acosh.3, addseverity.3, adjtime.3, asin.3, asinh.3, atan.3, atan2.3, atanh.3, atoi.3, bsd_signal.3, cbrt.3, ceil.3, cfree.3, clearenv.3, clock_getcpuclockid.3, confstr.3, copysign.3, cos.3, cosh.3, ctermid.3, ctime.3, daemon.3, dirfd.3, div.3, drand48.3, drand48_r.3, duplocale.3, dysize.3, ecvt.3, ecvt_r.3, endian.3, erf.3, erfc.3, exec.3, exp.3, exp2.3, expm1.3, fabs.3, fdim.3, ferror.3, fexecve.3, ffs.3, fgetgrent.3, fgetpwent.3, finite.3, flockfile.3, floor.3, fma.3, fmax.3, fmemopen.3, fmin.3, fmod.3, fopen.3, fpclassify.3, frexp.3, fseeko.3, ftw.3, futimes.3, fwide.3, gamma.3, gcvt.3, getaddrinfo.3, getcwd.3, getdate.3, getdirentries.3, getdtablesize.3, getentropy.3, getenv.3, getgrent.3, getgrent_r.3, getgrnam.3, getgrouplist.3, gethostbyname.3, gethostid.3, getline.3, getloadavg.3, getlogin.3, getmntent.3, getnameinfo.3, getnetent_r.3, getopt.3, getpass.3, getprotoent_r.3, getpwent.3, getpwent_r.3, getpwnam.3, getrpcent_r.3, getservent_r.3, getspnam.3, getsubopt.3, getusershell.3, getw.3, grantpt.3, group_member.3, gsignal.3, hypot.3, ilogb.3, inet.3, inet_net_pton.3, initgroups.3, insque.3, isalpha.3, isfdtype.3, isgreater.3, iswblank.3, j0.3, killpg.3, ldexp.3, lgamma.3, lockf.3, log.3, log10.3, log1p.3, log2.3, logb.3, lrint.3, lround.3, malloc.3, mbsnrtowcs.3, memchr.3, mkdtemp.3, mkfifo.3, mkstemp.3, mktemp.3, modf.3, mq_receive.3, mq_send.3, nan.3, newlocale.3, nextafter.3, nl_langinfo.3, on_exit.3, open_memstream.3, opendir.3, perror.3, popen.3, posix_fallocate.3, posix_madvise.3, posix_memalign.3, posix_openpt.3, pow.3, printf.3, profil.3, psignal.3, pthread_attr_setstack.3, pthread_cleanup_push_defer_np.3, pthread_kill.3, pthread_mutex_consistent.3, pthread_mutexattr_setrobust.3, pthread_rwlockattr_setkind_np.3, pthread_sigmask.3, pthread_sigqueue.3, pthread_spin_init.3, pthread_spin_lock.3, ptsname.3, putenv.3, putpwent.3, qecvt.3, qsort.3, rand.3, random.3, random_r.3, rcmd.3, readdir_r.3, realpath.3, remainder.3, remquo.3, rint.3, round.3, rpmatch.3, scalb.3, scalbln.3, scandir.3, scanf.3, sched_getcpu.3, seekdir.3, sem_wait.3, setbuf.3, setenv.3, setjmp.3, setnetgrent.3, siginterrupt.3, signbit.3, significand.3, sigqueue.3, sigset.3, sigsetops.3, sigvec.3, sigwait.3, sin.3, sinh.3, sockatmark.3, sqrt.3, stpcpy.3, stpncpy.3, strdup.3, strerror.3, strfromd.3, strnlen.3, strsep.3, strsignal.3, strtod.3, strtok.3, strtol.3, strtoul.3, syslog.3, tan.3, tanh.3, telldir.3, tempnam.3, termios.3, tgamma.3, timegm.3, timeradd.3, tmpnam.3, toascii.3, toupper.3, towlower.3, towupper.3, trunc.3, ttyslot.3, tzset.3, ualarm.3, unlocked_stdio.3, unlockpt.3, uselocale.3, usleep.3, wcpcpy.3, wcpncpy.3, wcscasecmp.3, wcsdup.3, wcsncasecmp.3, wcsnlen.3, wcsnrtombs.3, wordexp.3, wprintf.3, y0.3: srcfix: use better macros in SYNOPSIS
Around the text:
"Feature Test Macro Requirements for glibc..."
replace ".in -4n/.in" with ".RS -4/.RE".
The latter form is more idiomatic use of man macros.
The nroff output is unchanged.

Reported-by: G. Branden Robinson <g.branden.robinson@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-29 15:12:12 +02:00
Michael Kerrisk 281dca499e chmod.2, connect.2, recv.2: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-29 14:46:56 +02:00
Michael Kerrisk 161b8eda4d clone.2, io_submit.2, select.2, shmget.2, getcontext.3, malloc_info.3, mtrace.3, posix_spawn.3, strfromd.3, proc.5: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-29 14:24:12 +02:00
Michael Kerrisk c9e6c5abc9 statx.2: Minor edits to Ira Weiny's
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-29 10:27:10 +02:00
Ira Weiny 38ad6a8808 statx.2: Add STATX_ATTR_DAX
Linux 5.8 adds STATX_ATTR_DAX support.

https://lore.kernel.org/lkml/20200428002142.404144-4-ira.weiny@intel.com/
https://lore.kernel.org/lkml/20200504161352.GA13783@magnolia/

Add the text to the statx man page.

Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-29 10:21:21 +02:00
Michael Kerrisk e9a0682b18 ioctl_fslabel.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-28 12:40:13 +02:00
Michael Kerrisk 9076359f0e seccomp.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-26 15:49:32 +02:00
Alejandro Colomar 59a1988b25 seccomp.2: Use ARRAY_SIZE() macro instead of raw sizeof division
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-25 11:25:12 +02:00
Alejandro Colomar c9cedb53b2 seccomp.2: Remove unneeded cast
From the email discussion:

> Hi Alex,
>
> On 9/25/20 9:31 AM, Alejandro Colomar wrote:
>> Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
>> ---
>>   man2/seccomp.2 | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/man2/seccomp.2 b/man2/seccomp.2
>> index 58033da1c..d6b856c32 100644
>> --- a/man2/seccomp.2
>> +++ b/man2/seccomp.2
>> @@ -1101,7 +1101,7 @@ install_filter(int syscall_nr, int t_arch, int f_errno)
>>       };
>>
>>       struct sock_fprog prog = {
>> -        .len = (unsigned short) (sizeof(filter) / sizeof(filter[0])),
>> +        .len = sizeof(filter) / sizeof(filter[0]),
>>           .filter = filter,
>>       };
>
> I have a small doubt about this change. With the change,
> there are no compilation warnings.
>
> But, if we change the code to something slightly different:
>
> [[
>      size_t x = (sizeof(filter) / sizeof(filter[0]));
>      struct sock_fprog prog = {
>          .len = x,
>          .filter = filter,
>      };
> ]]
>
> The "cc -Wconversion" gives us the following warning:
>
>      warning: conversion from ‘size_t’ {aka ‘long unsigned int’}
>      to ‘short unsigned int’ may change value
>
> Presumably we don't get a warning for an assignment of the form
>
>      .len = (sizeof(filter) / sizeof(filter[0]))
>
> because the compiler is smart enough to work out that the
> value of the constant expression is within the range of
> "unsigned short".
>
> Your thoughts?

Hi Michael,

I'd say that the cast doesn't fix any problems at all.  It silences a
valid warning, and I'd use a pragma for that (to be more explicit about
the intention of silencing a warning) if I do want -Wconversion enabled
(which usually I don't want, because it's too noisy) and I'm sure that
this won't overflow.  I'd limit the use casts to only when I *really*
need to.

I guess that if you enable -O3, the warning will vanish again because
the compiler will optimize away 'x' (but I didn't test).

Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-25 11:17:01 +02:00
Michael Kerrisk 9f5f1b5b8f ptrace.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-24 09:47:55 +02:00
Michael Kerrisk 861d36ba31 pldd.1, bpf.2, clone.2, dup.2, ioctl_fat.2, nfsservctl.2, open_by_handle_at.2, perf_event_open.2, pivot_root.2, request_key.2, sched_setaffinity.2, seccomp.2, select.2, statx.2, dl_iterate_phdr.3, dlinfo.3, dlopen.3, insque.3, newlocale.3, printf.3, pthread_setname_np.3, rpc.3, stdarg.3, strfmon.3, veth.4, proc.5, slabinfo.5, cgroup_namespaces.7, cgroups.7, cpuset.7, fanotify.7, inotify.7, mount_namespaces.7, sock_diag.7, user_namespaces.7, ld.so.8: Use \(aq instead of ' inside monospace fonts
Use \(aq to get an unslanted single quote inside monospace code
blocks. Using a simple ' results in a slanted quote inside PDFs.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-24 09:32:31 +02:00
Michael Kerrisk 89de1a399e open.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-24 09:02:29 +02:00
Alejandro Colomar a39e673a89 ioctl_ns.2, stat.2: Fix signedness of printf specifiers
These variables are either of an unsigned integer type per POSIX;
or of an integer type per POSIX, that Linux defines as an unsigned integer type.

Print them with 'uintmax_t' instead of 'intmax_t' to avoid
big positive numbers being printed as negative numbers.

Bug report:
From: Konstantin Bukin @ 2020-09-13 15:04 UTC
  To: mtk.manpages; +Cc: Konstantin Bukin, linux-man

inode numbers are expected to be positive. Casting them to a signed type
may result in printing negative values. E.g. running example program on
the following file:

$ ls -li test.txt
9280843260537405888 -r--r--r-- 1 kbukin hardware 300 Jul 21 06:36 test.txt

results in the following output:

$ ./example test.txt
ID of containing device:  [0,480]
File type:                regular file
I-node number:            -9165900813172145728
Mode:                     100444 (octal)
Link count:               1
Ownership:                UID=2743   GID=30
Preferred I/O block size: 32768 bytes
File size:                300 bytes
Blocks allocated:         8
Last status change:       Tue Jul 21 06:36:50 2020
Last file access:         Sat Sep 12 14:13:38 2020
Last file modification:   Tue Jul 21 06:36:50 2020

Such erroneous reporting happens for inode values greater than maximum
value which can be stored in signed long. Casting does not seem to be
necessary here. Printing inode as unsigned long fixes the issue.

Reported-by: Konstantin Bukin <kbukin@gmail.com>
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-24 00:02:13 +02:00
Michael Kerrisk 95c3d0a025 kcmp.2: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-22 10:08:14 +02:00
Michael Kerrisk 14dd128c7c syscalls.2: Move system calls from discontinued ports out of main syscall list
Various ports that had their own indigenous system calls have
been discontinued. Remove those system calls (none of which had
manual pages!) to a separate part of the page, to avoid
cluttering the main list of system calls.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-20 14:20:39 +02:00
Michael Kerrisk d022c7fdf0 getcwd.2, mq_notify.2, mq_open.2, mq_timedreceive.2, mq_timedsend.2, mq_unlink.2: Reinstate links to section 3 pages that document system calls
Some of the links removed in commit 247c654385 should
have been kept, because in some cases there are real system
calls whose wrapper functions are documented in Section 3.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-20 13:41:38 +02:00
Michael Kerrisk 0a3bfcf774 syscalls.2: Remove duplicate entry for swapcontext(2)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-20 13:21:46 +02:00
Michael Kerrisk 9f2a6007d1 intro.2, intro.3, feature_test_macros.7, standards.7: SEE ALSO: add system_data_types(7)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-17 22:54:01 +02:00
Michael Kerrisk 966d17b1c5 sigaction.2: Use correct POSIX type for siginfo_t.si_value
Reported-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-16 16:26:12 +02:00