Age | Commit message (Collapse) | Author | Files | Lines |
|
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
v11:
* Address Reinette's remarks for v10:
https://lore.kernel.org/linux-sgx/8f84b8e8-b478-bb81-4aa8-536df882a144@intel.com/
v10:
* v9 was malformed, essentially a resend.
v9:
* Rename "Address Space" section as "Memory mapping", and refine the
text.
* Rename "Ioctls" section as "Construction", and refine the text.
v8:
* Fix errors reported for the previous version.
v7:
* Added more meat about the address space and API.
* Reorganized the text to have focus more on developer to have a big
picture of kernel provided interfaces.
v6:
* Small fixes based on Dave's and Reinette's feedback.
* Extended the "Permissions" section to cover mmap()
v5:
* Taking away hardware concepts and focusing more on the interface.
v4:
* Did a heavy edit trying to streamline the story a bit and focus on
stuff important to the user (e.g. lighten up x86 details).
v3:
* Overhaul based on Michael's comments. Most likely needs to be refined
in various places but this is at least a small step forward for sure.
v2:
* Fixed the semantic newlines convention and various style errors etc.
that were reported by Alenjandro and Michael.
* SGX was merged to v5.
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Namhyung Kim <namhyung@gmail.com>
[alx: ffix + tfix]
Cowritten-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Stephane Eranian <eranian@google.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Song Liu <songliubraving@fb.com>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
After comments from Dave Martin.
Reported-by: Dave Martin <Dave.Martin@arm.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Linking up the info presented on this page with the discussion
in getcontext(3) helps the reader.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
See https://lore.kernel.org/linux-man/3fac10ea-7fed-739b-4974-09845f34867f@gmail.com/
Reported-by: Dave Martin <Dave.Martin@arm.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
The signal(7) manual page has some useful info related
to ucontext_t.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
handler
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
The script can be used this way:
git commit -sm "$(./scripts/modified_pages.sh): Short commit msg"
And then maybe --amend and add a longer message.
This is especially useful for changes to many pages at once,
usually when running a script to apply some global changes.
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
With this change, there remain almost no vestiges of information
about the long defunct Linux libc.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
formatting, not .nf/.fi
This gives better PDF rendering.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
.EX/.EE instead of .nf/.fi
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
pairs
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
As per section ordering rules given in man-pages(7).
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
CIRCLEQ_FOREACH_REVERSE.3, CIRCLEQ_HEAD_INITIALIZER.3, CIRCLEQ_LAST.3, CIRCLEQ_LOOP_NEXT.3, CIRCLEQ_LOOP_PREV.3, CIRCLEQ_NEXT.3, CIRCLEQ_PREV.3: Add missing links to circleq.3
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Reported-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
msgctl.2, readv.2, semctl.2, set_mempolicy.2, shmctl.2, syscalls.2, abs.3, bstring.3, btree.3, ctime.3, drand48.3, fgetc.3, fopen.3, gethostbyname.3, getnetent.3, getprotoent.3, getservent.3, INFINITY.3, __ppc_set_ppr_med.3, inet.3, j0.3, makecontext.3, printf.3, puts.3, resolver.3, sigsetops.3, elf.5, nscd.conf.5, proc.5, inotify.7, ipv6.7, spufs.7, system_data_types.7: Use Oxford comma
Found using:
pcregrep -rnM "^\.[B|I]R .*,\n\.[B|I].*[^,]\nand" man? |grep ^man |sort
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
[.B XX_*] is the most extended form in the pages.
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
faccessat2() was added in Linux 5.8 and enables a fix to
longstanding bugs in the faccessat() wrapper function.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
The include path is linux/openat2, so fix the manual to reference
this correct path.
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Break text into more paragraphs to ease readability
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
The comments do not need to be so verbose, since the main text
provides the full details.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
The shorter name is provided by default (i.e., if _DEFAULT_SOURCE
is defined).
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Restructure the sa_handler description as a list, for easier
reading.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Clarify description of SA_NODEFER, and note interaction with
act.sa_mask.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
The Linux kernel uses a long as the return type for this syscall.
As glibc provides no 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>
|
|
It is probably more sensible to place this section after
the subsection "Signal mask and pending signals".
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Reported-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Add a "big picture" of what happens when a signal handler
is invoked.
Reported-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Clarify that the alternate signal stack is per-thread (rather
than process-wide).
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
In the kernel sources (kernel/fork.c::copy_process()), we have:
/*
* sigaltstack should be cleared when sharing the same VM
*/
if ((clone_flags & (CLONE_VM|CLONE_VFORK)) == CLONE_VM)
sas_ss_reset(p);
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
RLIMIT_LOCKS
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
DELAYTIMER_MAX
See https://bugzilla.kernel.org/show_bug.cgi?id=12665.
The fix by Thomas Gleixner was in kernel commit
78c9c4dfbf8c04883941445a195276bb4bb92c76.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Ross Zwisler <zwisler@google.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Linux kernel commit 2a36ab717e8fe678d98f81c14a0b124712719840
(part of 5.10 release) changed sys_membarrier prototype/parameters
and added two new commands [MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ
and MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_RSEQ]. This
man-pages patch reflects these changes, by mostly copying comments
from the kernel patch into the man-page ([Peter Oskolkov] was also
the author of the kernel change).
[mtk: commit message tweaked]
Signed-off-by: Peter Oskolkov <posk@google.com>
Cowritten-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
See https://unix.stackexchange.com/questions/616848/what-is-the-behaviour-of-a-file-backed-memory-map-when-reading-from-or-writing-t
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
SYNOPSIS: s/io_context_t/aio_context_t/
Linux uses aio_context_t for these syscalls,
and it's the type provided by <linux/aio_abi.h>.
Use it in the SYNOPSIS.
libaio uses 'io_context_t', but that difference is already noted
in NOTES.
[mtk: patch slightly tweaked]
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: John A. Leuenhagen <john@zlima12.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
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>
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
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>
|
|
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>
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
pthread_attr_getsigmask_np()
Add a page documenting the pthread_attr_setsigmask_np(3) and
pthread_attr_getsigmask_np() functions added in glibc 2.32.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
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>
|
|
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>
|
|
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
[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>
|
|
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>
|
|
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
(No expected change in behavior,)
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Sridhar Samudrala <sridhar.samudrala@intel.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
I added the xample program in 2006, but omitted to add myself to the
copyright.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
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>
|
|
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
[mtk: Manually applied patch, because of conflicts with other
merged changes; also added an edit suggested by Jann; see the
thread at
https://lore.kernel.org/linux-man/20201012114940.1317510-1-jannh@google.com/]
Since 34e55232e59f7b19050267a05ff1226e5cd122a5 (introduced back in
v2.6.34), Linux uses per-thread RSS counters to reduce cache
contention on the per-mm counters. With a 4K page size, that means
that you can end up with the counters off by up to 252KiB per
thread.
Example:
$ cat rsstest.c
#include <stdlib.h>
#include <err.h>
#include <stdio.h>
#include <signal.h>
#include <unistd.h>
#include <sys/mman.h>
#include <sys/eventfd.h>
#include <sys/prctl.h>
void dump(int pid) {
char cmd[1000];
sprintf(cmd,
"grep '^VmRSS' /proc/%d/status;"
"grep '^Rss:' /proc/%d/smaps_rollup;"
"echo",
pid, pid
);
system(cmd);
}
int main(void) {
eventfd_t dummy;
int child_wait = eventfd(0, EFD_SEMAPHORE|EFD_CLOEXEC);
int child_resume = eventfd(0, EFD_SEMAPHORE|EFD_CLOEXEC);
if (child_wait == -1 || child_resume == -1) err(1, "eventfd");
pid_t child = fork();
if (child == -1) err(1, "fork");
if (child == 0) {
if (prctl(PR_SET_PDEATHSIG, SIGKILL)) err(1, "PDEATHSIG");
if (getppid() == 1) exit(0);
char *mapping = mmap(NULL, 80 * 0x1000, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
eventfd_write(child_wait, 1);
eventfd_read(child_resume, &dummy);
for (int i=0; i<40; i++) mapping[0x1000 * i] = 1;
eventfd_write(child_wait, 1);
eventfd_read(child_resume, &dummy);
for (int i=40; i<80; i++) mapping[0x1000 * i] = 1;
eventfd_write(child_wait, 1);
eventfd_read(child_resume, &dummy);
exit(0);
}
eventfd_read(child_wait, &dummy);
dump(child);
eventfd_write(child_resume, 1);
eventfd_read(child_wait, &dummy);
dump(child);
eventfd_write(child_resume, 1);
eventfd_read(child_wait, &dummy);
dump(child);
eventfd_write(child_resume, 1);
exit(0);
}
$ gcc -o rsstest rsstest.c && ./rsstest
VmRSS: 68 kB
Rss: 616 kB
VmRSS: 68 kB
Rss: 776 kB
VmRSS: 812 kB
Rss: 936 kB
$
Let's document that those counters aren't entirely accurate.
Reported-by: Mark Mossberg <mark.mossberg@gmail.com>
Signed-off-by: Jann Horn <jannh@google.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Format section names inside each type.
Follow the same pattern as in stat.2 (see line 158: ".IR Note :")
Before this ffix, it was visually harder to find sections inside a type.
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
CAP_BPF, CAP_PERFMON, and CAP_CHECKPOINT_RESTORE have all been
added to split out the power of CAP_SYS_ADMIN into weaker pieces.
Group all of these capabilities together in the list under
CAP_SYS_ADMIN, to make it clear that there is a pattern to these
capabilities.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
But the latter, weaker capability is preferred.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Linux 5.9
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
The requirements changed with kernel commit 12886f8ab10ce6.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
/proc/sys/kernel/ns_last_pid
Since Linux 5.9, CONFIG_CHECKPOINT_RESTORE also allows writing to
/proc/sys/kernel/ns_last_pid.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
As can be seen in
https://git.musl-libc.org/cgit/musl/tree/src/fcntl/posix_fallocate.c?id=73cc775bee53300c7cf759f37580220b18ac13d3
musl libc returns the syscall's errors directly, which means it
doesn't perform the same emulation as glibc, and can return
EOPNOTSUPP to an application, which isn't listed in ERRORS.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
makedev(3) provides much more detail on this type, so mention it
in the description rather than in 'See also'.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
"See also"
stat(2) is the most interesting API here; ustat(2) is obscure.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Reported-by: Jonny Grant <jg@jguk.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
The sentence "Handle with care" in CONFORMING TO conveys no useful
information. Remove it.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
queue.3 has been moved to queue.7.
Fix SEE ALSO accordingly.
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
queue has been for so many years in Section 3,
and still is in Section 3 in most manuals.
For legacy reasons,
especially because hyperlinks to the online manual pages
would break otherwise,
a link queue.3 -> queue(7) is necessary.
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
After forking slist.3, list.3, tailq.3, stailq.3 & circleq.3
in the previous commits,
this page no longer belongs in Section 3 of the manual pages.
According to its contents, the most suitable section is Section 7.
Because of legacy reasons, a link queue.3 -> queue(7)
would be appropriate.
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
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>
|
|
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
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>
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
appropriate
This helps differentiate 'TYPE' in some arguments from
'struct TYPE *var' in others, and is technically more correct.
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
tailq.3
- ffix: Use man markup
- Remove specific notes about code size increase
and execution time increase,
as they were (at least) inaccurate.
Instead, a generic note has been added.
- Structure the text into subsections.
- Remove sections that were empty after the forks.
- Clearly relate macro names (SLIST, TAILQ, ...)
to a human readable name of which data structure
they implement.
Reported-by: Michael Kerrisk <mtk.manpages@gmail.com>
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
strerrorname_np() and strerrordesc_np() were added in glibc 2.32.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
sigabbrev_np() and sigdescr_np() were added in glibc 2.32.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
TAILQ_FOREACH.3, TAILQ_FOREACH_REVERSE.3, TAILQ_HEAD.3, TAILQ_HEAD_INITIALIZER.3, TAILQ_INIT.3, TAILQ_INSERT_AFTER.3, TAILQ_INSERT_BEFORE.3, TAILQ_INSERT_HEAD.3, TAILQ_INSERT_TAIL.3, TAILQ_LAST.3, TAILQ_NEXT.3, TAILQ_PREV.3, TAILQ_REMOVE.3, TAILQ_SWAP.3: Link to the new tailq(3) page instead of queue(3)
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
STAILQ_FOREACH.3, STAILQ_HEAD.3, STAILQ_HEAD_INITIALIZER.3, STAILQ_INIT.3, STAILQ_INSERT_AFTER.3, STAILQ_INSERT_HEAD.3, STAILQ_INSERT_TAIL.3, STAILQ_NEXT.3, STAILQ_REMOVE.3, STAILQ_REMOVE_HEAD.3: Link to the new stailq(3) page instead of queue(3)
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
stailq.3
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
In the section for /proc/[pid]/smaps, the description of field
ProtectionKey occurs twice: both before and after the description of
VmFlags.
Changes made by this patch:
1) Only the first occurrence is kept because its order matches the
output of /proc/[pid]/smaps.
2) The kernel version that CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS was
introduced is only mentioned in the second occurrence. Now it's moved
to the first one.
Signed-off-by: Jing Peng <pj.hades@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
CIRCLEQ_INSERT_BEFORE.3, CIRCLEQ_INSERT_HEAD.3, CIRCLEQ_INSERT_TAIL.3, CIRCLEQ_REMOVE.3: Link to the new circleq(3) page instead of queue(3)
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
circleq.3
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
circleq.3
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|
|
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
|