Commit Graph

851 Commits

Author SHA1 Message Date
Michael Kerrisk 0368720957 proc.5: Alert the reader that UID/GID changes can reset the "dumpable" attribute
Reported-by: Eric Hopper <hopper@omnifarious.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-21 14:27:34 +02:00
Michael Kerrisk c7169ee565 proc.5: tfix
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-20 11:24:27 +02:00
Michael Kerrisk f68d810435 proc.5: tfix
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-20 11:06:07 +02:00
Michael Kerrisk 31572c7125 proc.5: Minor tweaks to /proc/[pid]/mountstats example line
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-20 09:34:09 +02:00
Michael Kerrisk a6a5e521ab proc.5: Better explanation of some /proc/ide fields
Taken from Documentation/filesystems/proc.txt.

Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-20 09:32:20 +02:00
Michael Kerrisk ea89336966 proc.5: tfix
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-20 00:07:19 +02:00
Michael Kerrisk 67df396fe6 proc.5: tfix
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-20 00:02:52 +02:00
Michael Kerrisk 83a20af064 proc.5: tfix
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-19 22:23:32 +02:00
Michael Kerrisk 42b070e639 proc.5: wfix
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-19 22:13:21 +02:00
Michael Kerrisk 03306e1829 proc.5: Document /proc/sys/fs/protected_regular
Text heavily based on Documentation/admin-guide/sysctl/fs.rst.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-13 12:27:48 +02:00
Michael Kerrisk 7dcb9d213a proc.5: Document /proc/sys/fs/protected_fifos
Text heavily based on Documentation/admin-guide/sysctl/fs.rst.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-13 12:27:48 +02:00
Michael Kerrisk 9f51687a32 proc.5: Document /proc/sys/fs/aio-max-nr and /proc/sys/fs/aio-nr
Text taken nearly verbatim from
Documentation/admin-guide/sysctl/fs.rst.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-13 12:27:47 +02:00
Michael Kerrisk 84eb2279b1 proc.5: Minor tweaks to Keno Fischer's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-13 09:25:42 +02:00
Keno Fischer 6a036b00bd proc.5: Fix an outdated note about map_files
The restriction to CAP_SYS_ADMIN was removed from map_files in
2015 [1].  There was a fixme that indicted this might happen, but
the main text was never updated when this commit landed. While
we're at it, add a note about the ptrace access check that is
still required.

[1] bdb4d100af

Signed-off-by: Keno Fischer <keno@juliacomputing.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-13 09:25:22 +02:00
Michael Kerrisk e8426ca2b4 getent.1, localedef.1, accept.2, arch_prctl.2, clock_getres.2, clock_nanosleep.2, connect.2, dup.2, epoll_create.2, epoll_ctl.2, epoll_wait.2, execve.2, getitimer.2, getsockopt.2, gettid.2, inotify_add_watch.2, inotify_init.2, io_submit.2, ioctl.2, lseek.2, madvise.2, mlock.2, mmap.2, mprotect.2, msgctl.2, msgop.2, open_by_handle_at.2, openat2.2, pidfd_open.2, poll.2, prctl.2, quotactl.2, s390_sthyi.2, select.2, select_tut.2, semctl.2, semget.2, semop.2, setns.2, shmctl.2, shmget.2, shmop.2, sigaction.2, stat.2, statx.2, syscalls.2, timer_create.2, timerfd_create.2, unshare.2, wait.2, CPU_SET.3, aio_init.3, atoi.3, des_crypt.3, dirfd.3, fmemopen.3, fopencookie.3, ftok.3, fts.3, getaddrinfo.3, getifaddrs.3, getrpcent.3, gsignal.3, lio_listio.3, nl_langinfo.3, posix_memalign.3, posix_openpt.3, posix_spawn.3, scanf.3, sem_init.3, sem_post.3, shm_open.3, strcmp.3, strftime.3, st.4, elf.5, group.5, proc.5, services.5, aio.7, cgroups.7, feature_test_macros.7, keyrings.7, man-pages.7, namespaces.7, path_resolution.7, sigevent.7, signal.7, socket.7, sysvipc.7, time.7, udp.7: tstamp
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-11 22:07:24 +02:00
Michael Kerrisk b258106ff9 proc.5: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-11 21:38:07 +02:00
Mike Frysinger ee669ccaa7 proc.5: Clarify /proc/[pid]/cmdline mutability
The cmdline file is a window into memory that is controlled by the
target process, and that memory may be changed arbitrarily, as can
the window via prctl settings.  Make sure people understand that
this file is all an illusion.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-10 10:14:21 +02:00
Jakub Wilk 184d797d8c proc.5: tfix
Escape hyphens.

Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-03-12 06:40:25 +01:00
Michael Kerrisk 0019177eac getent.1, localedef.1, clock_nanosleep.2, fcntl.2, getitimer.2, getsockopt.2, inotify_init.2, ioctl.2, mlock.2, mprotect.2, quotactl.2, s390_sthyi.2, semctl.2, shmctl.2, shmget.2, wait.2, CPU_SET.3, aio_init.3, des_crypt.3, fmemopen.3, fopencookie.3, fts.3, getaddrinfo.3, getrpcent.3, lio_listio.3, posix_spawn.3, shm_open.3, st.4, elf.5, group.5, proc.5, services.5, aio.7, feature_test_macros.7, keyrings.7, man-pages.7, sigevent.7, tcp.7, udp.7: Global formatting fix: disfavor nonstandard .TP indents
In many cases, these don't improve readability, and (when stacked)
they sometimes have the side effect of sometimes forcing text
to be justified within a narrow column range.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-23 09:58:23 +01:00
Michael Kerrisk 465b6c35e9 proc.5: Document /proc/sys/vm/unprivileged_userfaultfd
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-01-21 22:01:35 +01:00
Michael Kerrisk a5409de92c clone.2, fallocate.2, ioctl_iflags.2, ioctl_list.2, pidfd_open.2, pivot_root.2, quotactl.2, seccomp.2, select.2, wait.2, proc.5, cgroups.7, netdevice.7, uts_namespaces.7: tstamp
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-19 15:31:20 +01:00
Michael Kerrisk 400027959e clone.2, proc.5: Adjust references to namespaces(7)
Adjust references to namespaces(7) to be references to pages
describing specific namespace types.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-10-31 11:34:08 +01:00
Jakub Wilk 8d839a5673 proc.5: tfix
Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-08-03 13:59:35 +02:00
Ingo Schwarze 8bfbac5d14 proc.5: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-08-02 14:35:07 +02:00
Michael Kerrisk adb5263fcc proc.5: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-08-02 08:37:26 +02:00
Michael Kerrisk 63121bd499 pldd.1, bpf.2, chdir.2, clone.2, fanotify_init.2, fanotify_mark.2, intro.2, ipc.2, mount.2, mprotect.2, msgctl.2, msgget.2, msgop.2, pivot_root.2, pkey_alloc.2, poll.2, prctl.2, semctl.2, semget.2, semop.2, setxattr.2, shmctl.2, shmget.2, shmop.2, tkill.2, dlopen.3, exec.3, ftok.3, getutent.3, on_exit.3, strcat.3, cpuid.4, proc.5, capabilities.7, cgroup_namespaces.7, credentials.7, fanotify.7, mount_namespaces.7, namespaces.7, sched.7, signal.7, socket.7, unix.7, user_namespaces.7, vdso.7, xattr.7, ld.so.8: tstamp
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-08-02 08:34:32 +02:00
Michael Kerrisk 9b8887eb94 proc.5: Correct description of /pro/PID/status 'ShdPnd' and 'SigPnd' fields
These fields are signal masks, not counters.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-07-10 14:54:10 +02:00
Michael Kerrisk a4e6603a52 proc.5: Clarify that various mask fields in /proc/PID/status are in hexadecimal
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-07-10 14:14:03 +02:00
Michael Kerrisk 8e2ca125e4 proc.5: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-07-10 14:11:07 +02:00
Michael Kerrisk 343cdc5ac9 clone.2, intro.2, ipc.2, msgctl.2, msgget.2, msgop.2, semctl.2, semget.2, semop.2, shmctl.2, shmget.2, shmop.2, ftok.3, proc.5, namespaces.7: Change reference to svipc(7) to sysvipc(7)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-06-25 06:38:01 +02:00
Michael Kerrisk 8adf58622f proc.5: Minor fix: add some paragraph breaks to /proc/[pid]/attr/current text
Break the text up a little, to improve readability.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-06-18 20:51:11 +02:00
Michael Witten 9d30b1a69a proc.5 Add missing Inode field to /proc/net/unix
Signed-off-by: Anisse Astier <anisse@astier.eu>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-03-08 16:27:09 +01:00
Michael Kerrisk 9ba0180298 getent.1, iconv.1, ldd.1, locale.1, localedef.1, memusage.1, memusagestat.1, pldd.1, sprof.1, time.1, _syscall.2, accept.2, add_key.2, adjtimex.2, bind.2, bpf.2, capget.2, chown.2, chroot.2, clock_getres.2, clone.2, connect.2, copy_file_range.2, epoll_ctl.2, epoll_wait.2, eventfd.2, fanotify_init.2, fanotify_mark.2, fcntl.2, fsync.2, futex.2, getcpu.2, getdents.2, getgid.2, getgroups.2, getpid.2, gettid.2, gettimeofday.2, getuid.2, getxattr.2, inotify_add_watch.2, inotify_init.2, ioctl_fat.2, ioctl_ns.2, ioctl_userfaultfd.2, ioprio_set.2, kcmp.2, kexec_load.2, keyctl.2, listxattr.2, lseek.2, madvise.2, memfd_create.2, migrate_pages.2, mount.2, mprotect.2, mremap.2, msgctl.2, msgop.2, nfsservctl.2, open_by_handle_at.2, perf_event_open.2, pipe.2, pivot_root.2, pkey_alloc.2, poll.2, posix_fadvise.2, prctl.2, readahead.2, readdir.2, readlink.2, reboot.2, recvmmsg.2, removexattr.2, rename.2, request_key.2, s390_guarded_storage.2, s390_runtime_instr.2, s390_sthyi.2, sched_setaffinity.2, sched_setattr.2, sched_setparam.2, seccomp.2, select.2, select_tut.2, semctl.2, sendmmsg.2, set_thread_area.2, setgid.2, setns.2, setuid.2, setxattr.2, shmctl.2, sigaction.2, signalfd.2, sigsuspend.2, socket.2, socketpair.2, spu_run.2, stat.2, statx.2, subpage_prot.2, syscalls.2, sysctl.2, tee.2, timer_create.2, timerfd_create.2, truncate.2, uname.2, unshare.2, userfaultfd.2, ustat.2, vmsplice.2, write.2, CPU_SET.3, __ppc_get_timebase.3, alloca.3, argz_add.3, asprintf.3, backtrace.3, basename.3, bsd_signal.3, bstring.3, bswap.3, bzero.3, cacos.3, cacosh.3, catan.3, catanh.3, catgets.3, clock_getcpuclockid.3, cmsg.3, confstr.3, ctermid.3, ctime.3, des_crypt.3, dl_iterate_phdr.3, dlinfo.3, dlsym.3, duplocale.3, end.3, endian.3, errno.3, exec.3, exit.3, ferror.3, fgetws.3, fmemopen.3, fnmatch.3, fopencookie.3, fputws.3, frexp.3, ftw.3, get_nprocs_conf.3, get_phys_pages.3, getaddrinfo.3, getaddrinfo_a.3, getdate.3, getgrouplist.3, getifaddrs.3, getline.3, getlogin.3, getmntent.3, getnameinfo.3, getopt.3, getpass.3, getprotoent_r.3, getpwnam.3, getservent_r.3, getsubopt.3, glob.3, gnu_get_libc_version.3, hsearch.3, if_nameindex.3, index.3, inet.3, inet_net_pton.3, inet_pton.3, insque.3, isatty.3, iswblank.3, iswspace.3, lockf.3, makecontext.3, mallinfo.3, malloc.3, malloc_hook.3, malloc_info.3, mallopt.3, matherr.3, mbrtowc.3, mbsnrtowcs.3, mbsrtowcs.3, mbstowcs.3, mbtowc.3, mcheck.3, memchr.3, mq_getattr.3, mq_notify.3, newlocale.3, nl_langinfo.3, offsetof.3, perror.3, posix_spawn.3, printf.3, pthread_attr_init.3, pthread_cancel.3, pthread_cleanup_push.3, pthread_getattr_default_np.3, pthread_getattr_np.3, pthread_getcpuclockid.3, pthread_mutexattr_setrobust.3, pthread_rwlockattr_setkind_np.3, pthread_setaffinity_np.3, pthread_setname_np.3, pthread_setschedparam.3, pthread_sigmask.3, putenv.3, qsort.3, rand.3, random.3, readdir.3, regex.3, resolver.3, rpmatch.3, rtime.3, scanf.3, sem_wait.3, setaliasent.3, setbuf.3, stpcpy.3, stpncpy.3, strcat.3, strchr.3, strcmp.3, strcpy.3, strdup.3, strerror.3, strfromd.3, strfry.3, strftime.3, string.3, strlen.3, strnlen.3, strsep.3, strstr.3, strtok.3, strtol.3, strtoul.3, strverscmp.3, strxfrm.3, system.3, termios.3, trunc.3, wcpcpy.3, wcpncpy.3, wcrtomb.3, wcscat.3, wcscpy.3, wcslen.3, wcsncat.3, wcsncmp.3, wcsncpy.3, wcsnlen.3, wcsnrtombs.3, wcsrtombs.3, wcsstr.3, wcstok.3, wcstombs.3, wcwidth.3, wprintf.3, xcrypt.3, console_codes.4, dsp56k.4, full.4, initrd.4, lirc.4, loop.4, st.4, tty.4, vcs.4, charmap.5, core.5, host.conf.5, locale.5, proc.5, repertoiremap.5, resolv.conf.5, termcap.5, tmpfs.5, tzfile.5, aio.7, capabilities.7, cgroup_namespaces.7, cgroups.7, charsets.7, complex.7, epoll.7, fanotify.7, feature_test_macros.7, inotify.7, ip.7, locale.7, man-pages.7, man.7, namespaces.7, pid_namespaces.7, pkeys.7, pthreads.7, rtld-audit.7, sched.7, signal.7, sock_diag.7, socket.7, tcp.7, udp.7, unicode.7, user_namespaces.7, utf-8.7, zdump.8, zic.8: tstamp
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-03-06 15:12:10 +01:00
Michael Kerrisk d1a719857b locale.1, memusage.1, pldd.1, _syscall.2, add_key.2, bind.2, bpf.2, chown.2, clone.2, copy_file_range.2, eventfd.2, execve.2, futex.2, getdents.2, getrlimit.2, ioctl_fat.2, ioctl_ns.2, kcmp.2, kexec_load.2, keyctl.2, listxattr.2, lseek.2, membarrier.2, memfd_create.2, mmap.2, mprotect.2, msgop.2, open_by_handle_at.2, perf_event_open.2, pipe.2, readdir.2, readlink.2, readv.2, recvmmsg.2, request_key.2, sched_setaffinity.2, seccomp.2, select.2, select_tut.2, sendmmsg.2, setns.2, signalfd.2, spu_run.2, stat.2, sysctl.2, tee.2, timer_create.2, timerfd_create.2, truncate.2, uname.2, unshare.2, userfaultfd.2, ustat.2, wait.2, CPU_SET.3, __ppc_get_timebase.3, argz_add.3, asprintf.3, backtrace.3, basename.3, bswap.3, bzero.3, cacos.3, cacosh.3, catan.3, catanh.3, catgets.3, clock_getcpuclockid.3, confstr.3, ctime.3, dl_iterate_phdr.3, dlinfo.3, duplocale.3, encrypt.3, end.3, endian.3, fgetws.3, fmemopen.3, fopencookie.3, fputws.3, frexp.3, ftw.3, get_nprocs_conf.3, get_phys_pages.3, getaddrinfo.3, getaddrinfo_a.3, getdate.3, getgrouplist.3, getifaddrs.3, getline.3, getlogin.3, getopt.3, getpass.3, getprotoent_r.3, getpwnam.3, getservent_r.3, getsubopt.3, glob.3, gnu_get_libc_version.3, hsearch.3, if_nameindex.3, index.3, inet.3, inet_net_pton.3, inet_pton.3, insque.3, iswblank.3, iswspace.3, makecontext.3, mallinfo.3, malloc_hook.3, malloc_info.3, mallopt.3, matherr.3, mbrtowc.3, mbsnrtowcs.3, mbsrtowcs.3, mbstowcs.3, mbtowc.3, mcheck.3, memchr.3, mq_getattr.3, mq_notify.3, newlocale.3, nl_langinfo.3, offsetof.3, perror.3, posix_spawn.3, printf.3, pthread_attr_init.3, pthread_cancel.3, pthread_cleanup_push.3, pthread_create.3, pthread_getattr_default_np.3, pthread_getattr_np.3, pthread_getcpuclockid.3, pthread_mutexattr_setrobust.3, pthread_setaffinity_np.3, pthread_setname_np.3, pthread_setschedparam.3, pthread_sigmask.3, qsort.3, rand.3, readdir.3, regex.3, rpmatch.3, rtime.3, scanf.3, sem_wait.3, setaliasent.3, setbuf.3, stpcpy.3, stpncpy.3, strcat.3, strchr.3, strcpy.3, strdup.3, strerror.3, strfromd.3, strftime.3, strlen.3, strnlen.3, strsep.3, strstr.3, strtok.3, strtol.3, strtoul.3, strverscmp.3, strxfrm.3, termios.3, tsearch.3, wcpcpy.3, wcpncpy.3, wcrtomb.3, wcscat.3, wcscpy.3, wcslen.3, wcsncat.3, wcsncmp.3, wcsncpy.3, wcsnlen.3, wcsnrtombs.3, wcsrtombs.3, wcsstr.3, wcstok.3, wcstombs.3, wcwidth.3, wprintf.3, console_codes.4, dsp56k.4, full.4, initrd.4, loop.4, vcs.4, charmap.5, core.5, elf.5, locale.5, proc.5, repertoiremap.5, sysfs.5, termcap.5, aio.7, bpf-helpers.7, cgroups.7, charsets.7, complex.7, fanotify.7, feature_test_macros.7, inotify.7, locale.7, man-pages.7, man.7, pkeys.7, pthreads.7, rtld-audit.7, sock_diag.7, unix.7, user_namespaces.7, utf-8.7: Use '\e' rather than '\\' to get a backslash
Quoting Branden:

*roff escape sequences may sometimes look like C escapes, but that
is misleading.  *roff is in part a macro language and that means
recursive expansion to arbitrary depths.

You can get away with "\\" in a context where no macro expansion
is taking place, but try to spell a literal backslash this way in
the argument to a macro and you will likely be unhappy with
results.

Try viewing the attached file with "man -l".

"\e" is the preferred and portable way to get a portable "escape
literal" going back to CSTR #54, the original Bell Labs troff
paper.

groff(7) discusses the issue:

  \\     reduces to a single backslash; useful to delay its
         interpretation as escape character in copy mode.  For a
         printable backslash, use \e, or even better \[rs], to be
         independent from the current escape character.

As of groff 1.22.4, groff_man(7) does as well:

  \e     Widely used in man pages to represent a backslash output
         glyph.  It works reliably as long as the .ec request is
         not used, which should never happen in man pages, and it
         is slightly more portable than the more exact ‘\(rs’
         (“reverse solidus”) escape sequence.

People not concerned with portability to extremely old troffs should
probably just use \(rs (or \[rs]), as it means "the backslash
glyph", not "the glyph corresponding to whatever the current escape
character is".

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-02-27 15:32:50 +01:00
Michael Kerrisk ed74a46102 proc.5: tfix
Reported-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-02-27 10:46:09 +01:00
Michael Kerrisk 397d130a87 proc.5: SEE ALSO: add htop(1) and pstree(1)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-02-01 01:37:03 +01:00
Michael Kerrisk bca7fbb53a proc.5: Since Linux 4.5, "stack:" is no longer shown in /proc/PID/maps
Reported-by: Nick Gregory <ghost@capsule8.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-01-25 09:08:57 +13:00
Stephan Knauss 3a57505269 proc.5: Mention /proc/uptime includes time spent in suspend
fs/proc/uptime.c:uptime_proc_show() fetches time using
ktime_get_boottime which includes the time spent in suspend.

Signed-off-by: Stephan Knauss <linux@stephans-server.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-01-25 08:53:25 +13:00
Michael Kerrisk adab7ac810 proc.5: Refer to mount(2) for explanation of mount vs superblock options
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-12-14 09:11:29 +01:00
Michael Kerrisk 2fc546f9bf proc.5: Minor clean-ups for Alan Jenkins' patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-11-20 14:35:49 +01:00
Michael Kerrisk a15ad24df8 proc.5: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-11-20 14:32:42 +01:00
Alan Jenkins bfe9256a15 proc.5: Vmalloc information is no longer calculated (Linux 4.4)
See Linux commit a5ad88ce8c7fae7ddc72ee49a11a75aa837788e0,
"mm: get rid of 'vmalloc_info' from /proc/meminfo".

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-11-20 14:31:21 +01:00
Michael Kerrisk d6bec36eca clone.2, prctl.2, st.4, proc.5: Change references to '2.6.0-test*' series kernels to just '2.6.0'
The extra detail has little of noting with -test 2.6.0
added a particular feature has little value these days,
and is likely to confuse some readers who don't know
(and probably don't care) about the historical details.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-11-19 13:09:55 +01:00
Mike Rapoport a2463bae6f ioctl_userfaultfd.2, madvise.2, memfd_create.2, migrate_pages.2, mmap.2, shmget.2, subpage_prot.2, userfaultfd.2, malloc.3, proc.5, sysfs.5, tmpfs.5: Update paths for in-kernel memory management documentation files
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-11-17 07:29:53 +01:00
Michael Kerrisk eb8567a5c2 proc.5: ffix: break /proc/[pid]/task text into smaller paragraphs
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-11-05 21:57:20 +01:00
Michael Kerrisk 71b36dc767 proc.5: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-11-05 21:22:19 +01:00
Michael Kerrisk 7fe3b32bc8 proc.5: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-11-05 21:21:50 +01:00
Michael Kerrisk 37cd58d2d4 proc.5: Minor reworking of description of /proc/[tid] directories
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-11-05 21:14:25 +01:00
Michael Kerrisk 71190dedfe proc.5: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-11-05 21:02:18 +01:00
Michael Kerrisk 4641c596b3 proc.5: Document /proc/PID/status CoreDumping field
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-11-05 12:40:46 +01:00
Michael Kerrisk 422425ff92 proc.5: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-11-05 12:35:30 +01:00
Michael Kerrisk fcfac78d29 proc.5: /proc/[pid]/status VmPMD field was removed in Linux 4.15
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-11-05 12:30:25 +01:00
Michael Kerrisk f7bbc79dbc proc.5: Document /proc/Meminfo LazyFree field
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-11-05 12:25:57 +01:00
Michael Kerrisk f9326a24ff proc.5: Fix kernel source pathname for soft-dirty documentation
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-11-05 12:21:46 +01:00
Michael Kerrisk 7375eaabfb proc.5: Document /proc/meminfo KReclaimable field
Added in Linux 4.20.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-11-05 12:05:08 +01:00
Michael Kerrisk 01df7b7046 proc.5: Document /proc/[pid]
See also https://bugzilla.kernel.org/show_bug.cgi?id=201441

Reported-by: Philip Dumont <phil@solidstatescientific.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-11-04 23:56:10 +01:00
Michael Kerrisk 3c7cfa32d7 proc.5: Add an overview section describing the groups of files under /proc
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-11-04 23:04:52 +01:00
Michael Kerrisk ebbbcd36d6 proc.5: srcfix: remove doubled .IP line
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-10-26 20:25:53 +02:00
Michael Kerrisk f0d6cc5ff2 proc.5: NOTES: improve text that suggests use of "tr '\000' '\n'"
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-10-26 20:25:53 +02:00
Michael Kerrisk 295fe9e0aa proc.5: Minor wording fix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-10-26 20:25:53 +02:00
Michael Kerrisk 91433f3e5f proc.5: Remove bogus suggestion to use cat(1) to read files containing '\0'
Reported-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-10-26 20:25:53 +02:00
Michael Kerrisk d1081b23e1 proc.5: Use 'tr '\000' '\n' to display contents of /proc/PID/environ
This is in effect a revert of
commit 1391278030

Reported-by: Alexander E. Patrakov <patrakov@gmail.com>
Reported-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-10-26 20:25:53 +02:00
Michael Kerrisk 9b7956cfd8 proc.5: tfix
Reported-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-10-26 19:41:47 +02:00
Jakub Wilk cb5a67a477 proc.5: tfix
Remove duplicated word.

Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-08-20 14:45:21 +02:00
Lucas Werkmeister a6425049fa proc.5: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-08-19 21:33:55 +02:00
Michael Kerrisk 1cdbc3a60c proc.5: Reword /proc/PID/fdinfo timerfd field descriptions as a hanging list
And a few other minor tweaks to the text.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-08-18 10:03:45 +02:00
Michael Kerrisk 734ec506eb proc.5: Add a few details on /rpoc/PID/fdinfo timerfd
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-08-18 09:57:47 +02:00
Michael Kerrisk cd595f623f proc.5: Minor tweaks to Lukas Wermeister's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-08-18 09:52:05 +02:00
Lucas Werkmeister 340a16a6ba proc.5: Document fdinfo format for timerfd
Extended information for timerfd file descriptors in
/proc/[pid]/fdinfo was added in commit af9c4957cf21 ("timerfd:
Implement show_fdinfo method", 2014-07-16), to support
checkpoint/restore for such file descriptors (see also the
TFD_IOC_SET_TICKS ioctl which is documented in timerfd_create.2).

Signed-off-by: Lucas Werkmeister <mail@lucaswerkmeister.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-08-18 09:47:48 +02:00
Michael Kerrisk d512e7b49a proc.5: srcfix: rewrap source lines
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-08-13 16:51:30 +02:00
Elvira Khabirova b654747951 proc.5: Describe ambiguities in /proc/<pid>/maps
Pathname escaping is not done properly in /proc/<pid>/maps;
because of this, different pathnames may appear the same
(verified by experiment and reading the source code).

Further details from Elvira about the relevant location in
the kernel code:

    show_map_vma() from fs/proc/task_mmu.c uses seq_file_path()
    from fs/seq_file.c to print the dentry name, which in turn
    calls seq_path() from the same file.  seq_path() uses
    d_path() from fs/d_path.c to get the path name; this is
    where the " (deleted)" part comes from. This is followed by
    mangling the string with mangle_path() (fs/seq_file.c); this
    function only replaces those characters that were supplied
    in the "esc" argument and does not bother with escaping
    anything else ('\\', for example).  The value of this
    argument comes without modifications from the initial call
    of seq_file_path() by show_map_vma(), and that is "\n".

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-08-13 16:46:07 +02:00
Michael Kerrisk d1fa8ae9ff proc.5: tfix
Reported-by: Stan Schwertly <stan@schwertly.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-08-09 08:26:29 +02:00
Nikola Forró bf8fc2759b proc.5: Document /proc/[pid]/status Speculation_Store_Bypass field
Signed-off-by: Nikola Forró <nforro@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-08-04 10:19:30 +02:00
Michael Kerrisk b84a64f4c8 proc.5: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-08-04 09:23:36 +02:00
Keno Fischer 0aae409212 proc.5: Correct description of NStgid
The left-most pid namespace in a given procfs' `NStgid` does not
change based on the pid namespace of the reading process. Rather,
each procfs has an associated outer-most namespace, which gets
set when the procfs is mounted:

```
static struct dentry *proc_mount(struct file_system_type *fs_type,
	int flags, const char *dev_name, void *data)
{
	struct pid_namespace *ns;

	if (flags & MS_KERNMOUNT) {
		ns = data;
		data = NULL;
	} else {
		ns = task_active_pid_ns(current);
	}

	return mount_ns(fs_type, flags, data, ns, ns->user_ns, proc_fill_super);
}
```

i.e. either the root namespace for kernel mounts or the namespace
of the mounting process. This ns then gets saved in the fs' super
block and is the basis for most operations. It is this ns that the
left-most value of `NStgid` is relative to, not the reading process.

Reported-by: Robert O'Callahan <robert@ocallahan.org>
Signed-off-by: Keno Fischer <keno@juliacomputing.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-08-04 09:15:56 +02:00
Michael Kerrisk 8c420ed87d proc.5: Explain how to determine top-most mount in /proc/PID/mountinfo
Explain how to determine the top-most mount at a particular
location by inspecting /proc/PID/mountinfo.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-07-19 00:13:47 +02:00
Michael Kerrisk ae636827e6 proc.5: Fix description of /proc/PID/* ownership to account for user namespaces
Starting in Linux 4.11, if the process dumpable attribute is
not 1 and the process resides in a noninitial namespaces that
has valid mappings for UID 0 and GID 0, then the ownership of
/proc/PID/* is made the same as the root IDs of the namespace.

Determined by inspection of fs/proc/base.c
See also the following kernel commit:

    commit 68eb94f16227336a5773b83ecfa8290f1d6b78ce
    Author: Eric W. Biederman <ebiederm@xmission.com>
    Date:   Tue Jan 3 10:23:11 2017 +1300

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-07-05 18:38:14 +02:00
Michael Kerrisk e96ad1fd45 proc.5: Minor rewording
In preparation for next change

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-07-05 18:38:14 +02:00
Michael Kerrisk eada5570b0 proc.5: Setting dumpable to 1 reverts ownership of /proc/PID/* to effective IDs
The statement that resetting the dumpable attribute of a process
to 1 causes the ownership of files to revert the process's real
IDs looked suspect. And indeed it is at odds with the code in
fs/proc/base.c::task_dump_owner() (Linux 4.16 sources).
Further verified with a quick test that resetting dumpable to 1
causes the ownership of /proc/PID/* files to revert to the
process's effective IDs. Mea culpa for the original mistake.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-07-05 18:37:54 +02:00
Michael Kerrisk fb49322d22 proc.5: Minor rewording
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-07-05 11:35:48 +02:00
Michael Kerrisk 590ba7e5d0 open_by_handle_at.2, ctermid.3, getcwd.3, proc.5: Wording fix: prefer "pathname" over "path" 2018-06-26 06:47:26 +02:00
Lucas Werkmeister f8bfb68e68 proc.5: tfix
mlock() is a system call and documented in section 2, not 3.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-06-10 13:38:51 +02:00
Michael Kerrisk 6f75225113 proc.5: Mention choom(1) in discussion of /proc/[pid]/oom_score_adj
This command was added to util-linux on 16 April 2019.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-05-01 11:07:11 +02:00
Michael Kerrisk 29c0586f51 bpf.2, sched_setattr.2, crypt.3, elf.5, proc.5, fanotify.7, feature_test_macros.7, sched.7: spfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-27 14:48:33 +02:00
Jakub Wilk 1dbe854bc5 proc.5: tfix
Remove duplicated word.

Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-22 17:40:58 +01:00
Michael Kerrisk 979a439b41 proc.5: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-20 14:37:12 +01:00
Michael Kerrisk 2927055043 proc.5: Rework the description of /proc/PID/mountinfo parent-ID field
After comments from Miklos, and further digging in the kernel
source that showed that chroot() can also result in "hidden"
parent-IDs in mountinfo, I've revised the description of
mountinfo.

In fs/proc_namespace.cs::how_mountinfo() there is:

        /* mountpoints outside of chroot jail will give SEQ_SKIP on this */
        err = seq_path_root(m, &mnt_path, &p->root, " \t\n\\");
        if (err)
                goto out;

I instrumented the 'if (err)' code path with printk()
to show that there is indeed a record corresponding to the
parent-ID for the process root that is being skipped.

Reported-by: Miklos Szeredi <mszeredi@redhat.com>
Reviewed-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-20 10:37:33 +01:00
Michael Kerrisk 35cf1b9397 proc.5: Correct the description of the parent mount ID for /proc/PID/mountinfo
I do not have an exact handle on the details, but I can see
roughly what is going on.  Internally, there seems to be one
("hidden") mount ID reserved to each mount namespace, and that ID
is the parent of the root mount point.

Looking through the (4.14) kernel source, mount IDs are allocated
by a kernel function called mnt_alloc_id() (in fs/namespace.c),
which is in turn called by alloc_vfsmnt() which is in turn called
by clone_mnt().

A new mount namespace is created by the kernel function
copy_mnt_ns() (in fs/namespace.c, called by
create_new_namespaces() in kernel/nsproxy.c). The copy_mnt_ns()
function calls copy_tree() (in fs/namespace.c), and copy_tree()
calls clone_mnt() in *two* places.  The first of these is the call
that creates the "hidden" mount ID that becomes the parent of the
root mount point. (I verified this by instrumenting the kernel
with a few printk() calls to display the IDs.)  The second place
where copy_tree() calls clone_mnt() is in a loop that replicates
each of the mount points (including the root mount point) in the
source mount namespace.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-20 10:13:00 +01:00
Michael Kerrisk 9b0e3937a9 proc.5: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-19 20:27:37 +01:00
Marcus Folkesson 5753354a3a proc.5: Update description of /proc/<pid>/oom_score
After Linux 2.6.36, the heuristic calculation of oom_score
has changed to only consider used memory and CAP_SYS_ADMIN.

See kernel commit a63d83f427fbce97a6cea0db2e64b0eb8435cd10.

Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-19 19:52:55 +01:00
Michael Kerrisk 52f842a571 proc.5: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-15 08:22:43 +01:00
Michael Kerrisk 8fb9b45adc proc.5: Since Linux 4.9, /proc/locks is filtered according to the PID namespace
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-15 08:10:53 +01:00
Michael Kerrisk f352b560f8 proc.5: Document /proc/locks
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-14 23:22:33 +01:00
Michael Kerrisk b0bd99827c proc.5: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-09 15:22:07 +01:00
Tyler Hicks 2577dbba2b proc.5, seccomp.2: Document the seccomp /proc interfaces added in Linux 4.14
Document the seccomp /proc interfaces in Linux 4.14:
/proc/sys/kernel/seccomp/actions_avail and
/proc/sys/kernel/seccomp/actions_logged.

Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-09 15:22:07 +01:00
Lucas Werkmeister 81c8aeb649 proc.5: Clarify permissions in /proc/[pid]/fd/
Since the symbolic links for pipes and sockets do not refer to real
files in the file system tree, it can be hard to discover that they
still have mode and ownership information (revealed e.g. by `stat -L`),
so let's point this out in the manpage.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-06 22:25:13 +01:00
Lucas Werkmeister d6bd89f3e5 proc.5: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-06 22:23:01 +01:00
Michael Kerrisk 8eb13afb83 proc.5: Add reference to pid_namespaces(7) for /proc/sys/kernel/ns_last_pid
Add reference to pid_namespaces(7) for the description of
/proc/sys/kernel/ns_last_pid.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-10-23 17:30:12 +02:00
Michael Kerrisk b5b0d21ef5 proc.5: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-10-18 09:26:12 +02:00
Michael Kerrisk 9ea5bc667b clone.2, getcpu.2, shmget.2, syscall.2, dladdr.3, proc.5, vdso.7: Consistently use "x86-64", not "x86_64"
When referring to the architecture, consistently use "x86-64",
not "x86_64". Hitherto, there was a mixture of usages, with
"x86-64" predominant.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-10-18 09:26:12 +02:00