Commit Graph

52 Commits

Author SHA1 Message Date
Mike Rapoport e3ec129351 ioctl_userfaultfd.2: Document replacement of ENOSPC with ESRCH
Since Linux 4.13 we return ESRCH instead of ENOSPC when the
faulting process exits during UFFDIO_{COPY/ZEROPAGE} operation.

Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-16 09:19:19 +02:00
Mike Rapoport fa744079f6 ioctl_userfaultfd.2: Update uffdio_api.features description
There is no requirement that uffdio_api.features must be zero
for newer kernels. This field actually defines what features
space would like to enable.

Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-16 09:18:22 +02:00
Michael Kerrisk dbfe9c700e _syscall.2, clock_getres.2, clone.2, copy_file_range.2, create_module.2, delete_module.2, fallocate.2, futex.2, get_kernel_syms.2, get_robust_list.2, getcpu.2, getdents.2, gettid.2, gettimeofday.2, getunwind.2, init_module.2, io_cancel.2, io_destroy.2, io_getevents.2, io_setup.2, io_submit.2, ioctl_userfaultfd.2, ioprio_set.2, kcmp.2, kexec_load.2, keyctl.2, link.2, llseek.2, memfd_create.2, mmap.2, mq_getsetattr.2, msgctl.2, msgget.2, open_by_handle_at.2, outb.2, perf_event_open.2, pivot_root.2, process_vm_readv.2, query_module.2, readdir.2, recvmmsg.2, rename.2, request_key.2, restart_syscall.2, rt_sigqueueinfo.2, s390_pci_mmio_write.2, s390_runtime_instr.2, sched_setattr.2, seccomp.2, select.2, select_tut.2, send.2, sendmmsg.2, set_thread_area.2, set_tid_address.2, sgetmask.2, shmop.2, sigaction.2, sigprocmask.2, splice.2, spu_create.2, spu_run.2, statx.2, subpage_prot.2, sync_file_range.2, syscall.2, sysctl.2, sysfs.2, tee.2, timer_create.2, timer_delete.2, timer_getoverrun.2, timer_settime.2, tkill.2, uselib.2, utimensat.2, vmsplice.2, wait.2, aio_init.3, asinh.3, atan2.3, atanh.3, backtrace.3, basename.3, bswap.3, bzero.3, catgets.3, catopen.3, dladdr.3, dlsym.3, endian.3, envz_add.3, erf.3, erfc.3, error.3, ferror.3, ffs.3, fgetc.3, fmemopen.3, fopen.3, fopencookie.3, fseek.3, ftw.3, futimes.3, getdate.3, getenv.3, getline.3, getlogin.3, getrpcent.3, getsubopt.3, getutmp.3, getw.3, gnu_get_libc_version.3, inet_net_pton.3, isalpha.3, lio_listio.3, makedev.3, malloc_get_state.3, malloc_stats.3, malloc_trim.3, malloc_usable_size.3, matherr.3, memchr.3, nextup.3, ntp_gettime.3, posix_madvise.3, program_invocation_name.3, pthread_atfork.3, pthread_attr_setaffinity_np.3, pthread_attr_setdetachstate.3, pthread_attr_setguardsize.3, pthread_attr_setinheritsched.3, pthread_attr_setschedparam.3, pthread_attr_setschedpolicy.3, pthread_attr_setscope.3, pthread_attr_setstack.3, pthread_attr_setstackaddr.3, pthread_attr_setstacksize.3, pthread_cleanup_push_defer_np.3, pthread_detach.3, pthread_equal.3, pthread_exit.3, pthread_join.3, pthread_kill.3, pthread_kill_other_threads_np.3, pthread_rwlockattr_setkind_np.3, pthread_self.3, pthread_setcancelstate.3, pthread_setconcurrency.3, pthread_setschedprio.3, pthread_testcancel.3, pthread_tryjoin_np.3, pthread_yield.3, puts.3, random.3, random_r.3, rpc.3, sched_getcpu.3, setnetgrent.3, sigwait.3, stdin.3, strerror.3, strfmon.3, timeradd.3, tmpnam.3, toupper.3, towlower.3, towupper.3, ttyname.3, uselocale.3, xdr.3, dsp56k.4, sigevent.7, vdso.7: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-15 19:39:04 +02:00
Michael Kerrisk a458bc4526 ioctl_userfaultfd.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-15 17:51:45 +02:00
Michael Kerrisk 7c4dfcac5a ioctl_userfaultfd.2: wfix
Reported-by: Sam Varshavchik <mrsam@courier-mta.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-12 23:02:06 +02:00
Michael Kerrisk f1008f5f1d ioctl_userfaultfd.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-05-26 14:35:11 +02:00
Michael Kerrisk 99cf16816c Removed trailing white space at end of lines 2017-05-03 19:28:59 +02:00
Michael Kerrisk 734882f4c4 _exit.2, alarm.2, chmod.2, clone.2, epoll_ctl.2, fcntl.2, fork.2, fsync.2, getdents.2, getpid.2, ioctl.2, ioctl_console.2, ioctl_list.2, ioctl_ns.2, ioctl_tty.2, ioctl_userfaultfd.2, kexec_load.2, lseek.2, mincore.2, mkdir.2, mknod.2, mmap.2, open.2, poll.2, posix_fadvise.2, prctl.2, rename.2, sched_setaffinity.2, select.2, select_tut.2, sigaction.2, signalfd.2, sigprocmask.2, sigwaitinfo.2, socketcall.2, stat.2, statx.2, syscalls.2, truncate.2, umask.2, unshare.2, userfaultfd.2, utime.2, utimensat.2, wait.2, bzero.3, cfree.3, exit.3, getentropy.3, grantpt.3, insque.3, shm_open.3, syslog.3, termios.3, ttyname.3, wcsdup.3, console_codes.4, tty.4, vcs.4, elf.5, nsswitch.conf.5, proc.5, slabinfo.5, tmpfs.5, bootparam.7, environ.7, hostname.7, inotify.7, mailaddr.7, man-pages.7, namespaces.7, pid_namespaces.7, pthreads.7, pty.7, sem_overview.7, signal.7, socket.7, tcp.7, termio.7, user_namespaces.7, xattr.7, ld.so.8, zdump.8: tstamp
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-05-03 19:27:48 +02:00
Michael Kerrisk 5191c68806 ioctl_userfaultfd.2: Minor tweaks to Mike Rapoport's patches
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-05-01 13:24:10 +02:00
Mike Rapoport 53004b3ba0 ioctl_userfaultfd.2: Add BUGS section
The features handshake is not quite convenient.
Elaborate about it in the BUGS section.

Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-05-01 13:05:26 +02:00
Mike Rapoport 337405ef74 ioctl_userfaultfd.2: UFFDIO_COPY: add ENOENT and ENOSPC description
Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-05-01 13:03:58 +02:00
Mike Rapoport 41e9e6485a ioctl_userfaultfd.2: Update description of shared memory areas
Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-05-01 13:03:05 +02:00
Jakub Wilk 81bb12333c ioctl_userfaultfd.2: tfix
Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-04-28 10:03:44 +02:00
Michael Kerrisk 42630fa9ae ioctl_userfaultfd.2: Minor fixes to Mike Rapoport's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-04-27 19:24:55 +02:00
Mike Rapoport 66487517a0 ioctl_userfaultfd.2: Start adding details about userfaultfd features
Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-04-27 19:20:52 +02:00
Michael Kerrisk 1a053be3c7 ioctl_userfaultfd.2: Minor fix-ups to Mike Rapoport's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-04-26 09:19:08 +02:00
Mike Rapoport 30dced3378 ioctl_userfaultfd.2: Update UFFDIO_API description
Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-04-26 09:19:08 +02:00
Mike Rapoport ba92d8b441 ioctl_userfaultfd.2: Describe memory types that can be used from 4.11
Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-04-26 09:19:08 +02:00
Michael Kerrisk a18cc179a7 ioctl_userfaultfd.2: Drop some unneeded text
From a conversation with Mike Rapoport:

What does "consistent" mean?
    Actually, I though I've copied this text from Andrea's docs,
    but now I've found out it was my wording and I really don't
    remember now what was my intention for "consistent" :) My
    guess is that I was thinking about atomicity of UFFDIO_COPY,
    or the fact that from the faulting thread perspective the
    page fault handling is the same whether it's done in kernel
    or via userfaultfd...  That said, maybe it'd be better just
    to drop "in a consistent way".

Reported-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-04-25 12:56:40 +02:00
Michael Kerrisk a0f04ef10e ioctl_userfaultfd.2: srcfix: remove obsolete FIXME
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-04-25 12:56:40 +02:00
Michael Kerrisk be7979d754 ioctl_userfaultfd.2: Explain the use case for UFFDIO_WAKE
Reported-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-04-25 12:56:40 +02:00
Michael Kerrisk d726ff4f8b ioctl_userfaultfd.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-04-25 12:56:40 +02:00
Michael Kerrisk 1c63cefda2 ioctl_userfaultfd.2: Note that UFFDIO_UNREGISTER address range must be compatible
Reported-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-04-25 12:56:40 +02:00
Michael Kerrisk d87f377e4e ioctl_userfaultfd.2: Explain concept of "compatible" mapping for UFFDIO_REGISTER
Reported-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-04-25 12:56:40 +02:00
Michael Kerrisk ef443f0771 ioctl_userfaultfd.2: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-04-25 12:56:40 +02:00
Michael Kerrisk 9428d7caed ioctl_userfaultfd.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-04-25 12:56:40 +02:00
Michael Kerrisk b38f1fa225 ioctl_userfaultfd.2: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-04-25 12:56:40 +02:00
Michael Kerrisk a440cc336a ioctl_userfaultfd.2: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-04-25 12:56:40 +02:00
Michael Kerrisk cd8389ff87 ioctl_userfaultfd.2: Add EFAULT errors
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-04-25 12:56:40 +02:00
Michael Kerrisk b4e9ab9131 ioctl_userfaultfd.2: srcfix: Remove FIXME
According to Mike Rapoport the description of the 'ioctls'
field is accurate.

Reported-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-04-25 12:56:40 +02:00
Michael Kerrisk d33fa469cc ioctl_userfaultfd.2: Clarify the 'features' field usage for UFFDIO_API
Mike Rapoport notes that changes are coming in Linux 4.11.

Reported-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-04-25 12:56:40 +02:00
Michael Kerrisk 53b95540ac ioctl_userfaultfd.2: srcfix: Improve FIXMEs
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-04-25 12:56:39 +02:00
Michael Kerrisk 7cb4a3d66e ioctl_userfaultfd.2: Add comments to structure definitions
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-04-25 12:56:39 +02:00
Michael Kerrisk b8838c257f ioctl_userfaultfd.2: Add pointer to EXAMPLE in userfaultfd(2)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-04-25 12:56:39 +02:00
Michael Kerrisk 242c2b6b43 ioctl_userfaultfd.2: Add a few more EINVAL error cases/details
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-04-25 12:56:39 +02:00
Michael Kerrisk 66e11c1f8f ioctl_userfaultfd.2: Improve UFFDIO_WAKE description
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-04-25 12:56:39 +02:00
Michael Kerrisk 611ec3a39b ioctl_userfaultfd.2: Improve UFFDIO_ZEROPAGE description
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-04-25 12:56:39 +02:00
Michael Kerrisk 1dca8e3dc3 ioctl_userfaultfd.2: Improve UFFDIO_COPY description
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-04-25 12:56:39 +02:00
Michael Kerrisk e8a846ae66 ioctl_userfaultfd.2: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-04-25 12:56:39 +02:00
Michael Kerrisk 7b28502f1e ioctl_userfaultfd.2: srcfix: FIXME
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-04-25 12:56:39 +02:00
Michael Kerrisk 264a0a30ce ioctl_userfaultfd.2: Improve UFFDIO_REGISTER description
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-04-25 12:56:39 +02:00
Michael Kerrisk 1b945386ca ioctl_userfaultfd.2: Add kernel versions where each ioctl() first appeared
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-04-25 12:56:39 +02:00
Michael Kerrisk 52b794f147 ioctl_userfaultfd.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-04-25 12:56:39 +02:00
Michael Kerrisk a23c93d83c ioctl_userfaultfd.2: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-04-25 12:56:38 +02:00
Michael Kerrisk 9a3c219414 ioctl_userfaultfd.2: Improve the UFFDIO_API description
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-04-25 12:56:38 +02:00
Michael Kerrisk 405513d327 ioctl_userfaultfd.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-04-25 12:56:38 +02:00
Michael Kerrisk ffbc7efcc2 ioctl_userfaultfd.2: Add another EINVAL error for UFFDIO_API
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-04-25 12:56:38 +02:00
Michael Kerrisk 24fa87ffa1 ioctl_userfaultfd.2: Add some generic errors common to most/all of the ioctl() operations
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-04-25 12:56:38 +02:00
Michael Kerrisk 637512edfa ioctl_userfaultfd.2: Rework list of ioctl() operations as subsections
Mainly, this means that we drop one level of indentation, which is
useful, since the error lists also add a level of indentation,
and the text overall becomes a little overindented.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-04-25 12:56:38 +02:00
Michael Kerrisk fe905357af ioctl_userfaultfd.2: Rework intro text on type of ioctl() operations
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-04-25 12:56:38 +02:00