Commit Graph

22397 Commits

Author SHA1 Message Date
Michael Kerrisk 8d010a0673 process_madvise.2: Minor clarification regarding partial advice scenario
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-02-13 21:10:04 +01:00
Alejandro Colomar 147ad5cedc process_madvise.2: SYNOPSIS: Fix prototype parameter type
The type of vlen is 'size_t', and not 'unsigned int'.  Fix it.

......

$ grep_syscall process_madvise
mm/madvise.c:1161:
SYSCALL_DEFINE5(process_madvise, int, pidfd, const struct iovec __user *, vec,
		size_t, vlen, int, behavior, unsigned int, flags)
include/linux/syscalls.h:887:
asmlinkage long sys_process_madvise(int pidfd, const struct iovec __user *vec,
			size_t vlen, int behavior, unsigned int flags);

function grep_syscall()
{
	if ! [ -v 1 ]; then
		>&2 echo "Usage: ${FUNCNAME[0]} <syscall>";
		return ${EX_USAGE};
	fi

	find * -type f \
	|grep '\.c$' \
	|sort -V \
	|xargs pcregrep -Mn "(?s)^\w*SYSCALL_DEFINE.\(${1},.*?\)" \
	|sed -E 's/^[^:]+:[0-9]+:/&\n/';

	find * -type f \
	|grep '\.[ch]$' \
	|sort -V \
	|xargs pcregrep -Mn "(?s)^asmlinkage\s+[\w\s]+\**sys_${1}\s*\(.*?\)" \
	|sed -E 's/^[^:]+:[0-9]+:/&\n/';
}

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-02-13 16:44:46 +01:00
Alejandro Colomar 904291a421 process_madvise.2: Add note about missing glibc wrapper
Glibc bug: <https://sourceware.org/bugzilla/show_bug.cgi?id=27380>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-02-13 16:42:18 +01:00
Alejandro Colomar 4f1adaa493 move_pages.2: Add notes about missing glibc wrappers
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-02-13 16:38:19 +01:00
Michael Kerrisk 7a11af70b7 shm_overview.7: SEE ALSO: add memfd_create(2)
People interested POSIX shared memory may also be interested
in memfd and file sealing.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-02-12 20:33:16 +01:00
Alyssa Ross 7a0095a542 open.2, rename.2: Refer to tmpfs rather than shmem
Skimming open(2), I was surprised not to see tmpfs mentioned as a
filesystem supported by O_TMPFILE.

If I'm understanding correctly (I'm very possibly not!), tmpfs is
a filesystem built on shmem, so I think it's more correct (and
probably much more widely understandable) to refer to tmpfs here.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-02-10 22:07:30 +01:00
Michael Kerrisk 788c381c4b rename.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-02-10 22:05:34 +01:00
Michael Kerrisk 087a45933a netdevice.7: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-02-09 21:59:01 +01:00
Michael Kerrisk db17c2cbf0 netdevice.7: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-02-09 20:19:42 +01:00
Alejandro Colomar 8ccbd769d0 mmap2.2: Fix prototype parameter types
There are many slightly different prototypes for this syscall,
but none of them is like the documented one.
Of all the different prototypes,
let's document the asm-generic one.

This manual page was actually using a prototype similar to
mmap(2), but there's no glibc wrapper function called mmap2(2),
as the wrapper for this syscall is mmap(2).  Therefore, the
documented prototype should be the kernel one.

......

.../linux$ grep_syscall mmap2
arch/csky/kernel/syscall.c:17:
SYSCALL_DEFINE6(mmap2,
	unsigned long, addr,
	unsigned long, len,
	unsigned long, prot,
	unsigned long, flags,
	unsigned long, fd,
	off_t, offset)
arch/microblaze/kernel/sys_microblaze.c:46:
SYSCALL_DEFINE6(mmap2, unsigned long, addr, unsigned long, len,
		unsigned long, prot, unsigned long, flags, unsigned long, fd,
		unsigned long, pgoff)
arch/nds32/kernel/sys_nds32.c:12:
SYSCALL_DEFINE6(mmap2, unsigned long, addr, unsigned long, len,
	       unsigned long, prot, unsigned long, flags,
	       unsigned long, fd, unsigned long, pgoff)
arch/powerpc/kernel/syscalls.c:60:
SYSCALL_DEFINE6(mmap2, unsigned long, addr, size_t, len,
		unsigned long, prot, unsigned long, flags,
		unsigned long, fd, unsigned long, pgoff)
arch/riscv/kernel/sys_riscv.c:37:
SYSCALL_DEFINE6(mmap2, unsigned long, addr, unsigned long, len,
	unsigned long, prot, unsigned long, flags,
	unsigned long, fd, off_t, offset)
arch/s390/kernel/sys_s390.c:49:
SYSCALL_DEFINE1(mmap2, struct s390_mmap_arg_struct __user *, arg)
arch/sparc/kernel/sys_sparc_32.c:101:
SYSCALL_DEFINE6(mmap2, unsigned long, addr, unsigned long, len,
	unsigned long, prot, unsigned long, flags, unsigned long, fd,
	unsigned long, pgoff)
arch/ia64/include/asm/unistd.h:30:
asmlinkage unsigned long sys_mmap2(
				unsigned long addr, unsigned long len,
				int prot, int flags,
				int fd, long pgoff);
arch/ia64/kernel/sys_ia64.c:139:
asmlinkage unsigned long
sys_mmap2 (unsigned long addr, unsigned long len, int prot, int flags, int fd, long pgoff)
arch/m68k/kernel/sys_m68k.c:40:
asmlinkage long sys_mmap2(unsigned long addr, unsigned long len,
	unsigned long prot, unsigned long flags,
	unsigned long fd, unsigned long pgoff)
arch/parisc/kernel/sys_parisc.c:275:
asmlinkage unsigned long sys_mmap2(unsigned long addr, unsigned long len,
	unsigned long prot, unsigned long flags, unsigned long fd,
	unsigned long pgoff)
arch/powerpc/include/asm/syscalls.h:15:
asmlinkage long sys_mmap2(unsigned long addr, size_t len,
		unsigned long prot, unsigned long flags,
		unsigned long fd, unsigned long pgoff);
arch/sh/include/asm/syscalls.h:8:
asmlinkage long sys_mmap2(unsigned long addr, unsigned long len,
			  unsigned long prot, unsigned long flags,
			  unsigned long fd, unsigned long pgoff);
arch/sh/kernel/sys_sh.c:41:
asmlinkage long sys_mmap2(unsigned long addr, unsigned long len,
	unsigned long prot, unsigned long flags,
	unsigned long fd, unsigned long pgoff)
arch/sparc/kernel/systbls.h:23:
asmlinkage long sys_mmap2(unsigned long addr, unsigned long len,
			  unsigned long prot, unsigned long flags,
			  unsigned long fd, unsigned long pgoff);
include/asm-generic/syscalls.h:14:
asmlinkage long sys_mmap2(unsigned long addr, unsigned long len,
			unsigned long prot, unsigned long flags,
			unsigned long fd, unsigned long pgoff);
.../linux$

function grep_syscall()
{
	if ! [ -v 1 ]; then
		>&2 echo "Usage: ${FUNCNAME[0]} <syscall>";
		return ${EX_USAGE};
	fi

	find * -type f \
	|grep '\.c$' \
	|sort -V \
	|xargs pcregrep -Mn "(?s)^\w*SYSCALL_DEFINE.\(${1},.*?\)" \
	|sed -E 's/^[^:]+:[0-9]+:/&\n/';

	find * -type f \
	|grep '\.[ch]$' \
	|sort -V \
	|xargs pcregrep -Mn "(?s)^asmlinkage\s+[\w\s]+\**sys_${1}\s*\(.*?\)" \
	|sed -E 's/^[^:]+:[0-9]+:/&\n/';
}

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-02-09 19:39:47 +01:00
Alejandro Colomar 5ae403a2d4 mlock.2: mlock2(): Fix prototype parameter types
The documented prototype for mlock2() was a mix of the
glibc wrapper prototype and the kernel syscall prototype.
Let's document the glibc wrapper prototype, which is shown below.

......

.../glibc$ grep_glibc_prototype mlock2
sysdeps/unix/sysv/linux/bits/mman-shared.h:55:
int mlock2 (const void *__addr, size_t __length, unsigned int __flags) __THROW;
.../glibc$

function grep_glibc_prototype()
{
	if ! [ -v 1 ]; then
		>&2 echo "Usage: ${FUNCNAME[0]} <func>";
		return ${EX_USAGE};
	fi

	find * -type f \
	|grep '\.h$' \
	|sort -V \
	|xargs pcregrep -Mn \
	  "(?s)^[^\s#][\w\s]+\s+\**${1}\s*\([\w\s()[\]*,]*?(...)?\)[\w\s()]*;" \
	|sed -E 's/^[^:]+:[0-9]+:/&\n/';
}

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-02-09 19:37:28 +01:00
Michael Kerrisk 4791875270 execveat.2: srcfix: add a link to glibc bug requesting wrapper
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-02-09 19:35:53 +01:00
Alejandro Colomar 71a25d4c79 execveat.2: Fix prototype
It's been 6 years since execveat(2) was added to the kernel,
and there's still no glibc wrapper.  Let's document the kernel
syscall prototype.

I reported a bug against glibc requesting a wrapper;
when glibc adds the wrapper, this commit should probably be
reverted.

......

.../linux$ grep_syscall execveat
fs/exec.c:2062:
SYSCALL_DEFINE5(execveat,
		int, fd, const char __user *, filename,
		const char __user *const __user *, argv,
		const char __user *const __user *, envp,
		int, flags)
fs/exec.c:2083:
COMPAT_SYSCALL_DEFINE5(execveat, int, fd,
		       const char __user *, filename,
		       const compat_uptr_t __user *, argv,
		       const compat_uptr_t __user *, envp,
		       int,  flags)
include/linux/compat.h:815:
asmlinkage long compat_sys_execveat(int dfd, const char __user *filename,
		     const compat_uptr_t __user *argv,
		     const compat_uptr_t __user *envp, int flags);
include/linux/syscalls.h:980:
asmlinkage long sys_execveat(int dfd, const char __user *filename,
			const char __user *const __user *argv,
			const char __user *const __user *envp, int flags);
.../linux$

function grep_syscall()
{
	if ! [ -v 1 ]; then
		>&2 echo "Usage: ${FUNCNAME[0]} <syscall>";
		return ${EX_USAGE};
	fi

	find * -type f \
	|grep '\.c$' \
	|sort -V \
	|xargs pcregrep -Mn "(?s)^\w*SYSCALL_DEFINE.\(${1},.*?\)" \
	|sed -E 's/^[^:]+:[0-9]+:/&\n/';

	find * -type f \
	|grep '\.[ch]$' \
	|sort -V \
	|xargs pcregrep -Mn "(?s)^asmlinkage\s+[\w\s]+\**sys_${1}\s*\(.*?\)" \
	|sed -E 's/^[^:]+:[0-9]+:/&\n/';
}

Glibc bug: <https://sourceware.org/bugzilla/show_bug.cgi?id=27364>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-02-09 19:33:47 +01:00
Alejandro Colomar 56d1311b87 ipc.2: Fix prototype parameter types
The types for some of the parameters are incorrect
(different than the kernel).  Fix them.
Below are shown the types that the kernel uses.

......

.../linux$ grep_syscall ipc
ipc/syscall.c:110:
SYSCALL_DEFINE6(ipc, unsigned int, call, int, first, unsigned long, second,
		unsigned long, third, void __user *, ptr, long, fifth)
ipc/syscall.c:205:
COMPAT_SYSCALL_DEFINE6(ipc, u32, call, int, first, int, second,
	u32, third, compat_uptr_t, ptr, u32, fifth)
include/linux/compat.h:874:
asmlinkage long compat_sys_ipc(u32, int, int, u32, compat_uptr_t, u32);
include/linux/syscalls.h:1221:
asmlinkage long sys_ipc(unsigned int call, int first, unsigned long second,
		unsigned long third, void __user *ptr, long fifth);
.../linux$

function grep_syscall()
{
	if ! [ -v 1 ]; then
		>&2 echo "Usage: ${FUNCNAME[0]} <syscall>";
		return ${EX_USAGE};
	fi

	find * -type f \
	|grep '\.c$' \
	|sort -V \
	|xargs pcregrep -Mn "(?s)^\w*SYSCALL_DEFINE.\(${1},.*?\)" \
	|sed -E 's/^[^:]+:[0-9]+:/&\n/';

	find * -type f \
	|grep '\.[ch]$' \
	|sort -V \
	|xargs pcregrep -Mn "(?s)^asmlinkage\s+[\w\s]+\**sys_${1}\s*\(.*?\)" \
	|sed -E 's/^[^:]+:[0-9]+:/&\n/';
}

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-02-09 19:26:49 +01:00
Michael Kerrisk d5ff9ffcdc rpc.3: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-02-09 19:16:43 +01:00
Jonathan Wakely 055811a99e stat.2: Remove <unistd.h> from synopsis
There seems to be no reason <unistd.h> is shown here, so remove it.

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-02-09 13:27:59 +01:00
Michael Kerrisk ba50f49c69 getpriority.2, recv.2, fts.3: wfix
These pages have the odd wording 'the external variable errno',
which does not occur in other pages. Make these pages conform with
the norm.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-02-07 12:01:36 +01:00
Michael Kerrisk a23bf7259c ferror.3: POSIX.1-2008: these functions won't change 'errno' if 'stream' is valid
See https://www.austingroupbugs.net/view.php?id=401.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-02-07 12:01:36 +01:00
Michael Kerrisk 5b921fc469 ferror.3: Add a RETURN VALUE section
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-02-07 11:01:14 +01:00
Michael Kerrisk 15267cb8a1 ferror.3: Remove fileno(3) content that was migrated to new fileno(3) page
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-02-07 11:01:14 +01:00
Michael Kerrisk acd8a0e37e fileno.3: Split fileno(3) content out of ferror(3) into new page
fileno(3) differs from the other functions in various ways.
For example, it is governed by different standards,
and can set 'errno'. Conversely, the other functions
are about examining the status of a stream, while
fileno(3) simply obtains the underlying file descriptor.
Furthermore, splitting this function out allows
for some cleaner upcoming changes in ferror(3).

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-02-07 11:01:14 +01:00
Michael Kerrisk c9b9a599fc ipc.2: Minor tweak to Alex's patch regarding use of syscall()
Calling ipc() directly would be a rather unusual thing to do,
so add some text to emphasize that point.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-02-06 21:46:48 +01:00
Alejandro Colomar fa646e185f bdflush.2, capget.2, get_mempolicy.2, ipc.2, lookup_dcookie.2, mbind.2, migrate_pages.2: Add notes about missing glibc wrappers
.../glibc$ grep_syscall_wrapper bdflush
.../glibc$ grep_syscall_wrapper capget
.../glibc$ grep_syscall_wrapper capset
.../glibc$ grep_syscall_wrapper get_mempolicy
.../glibc$ grep_syscall_wrapper ipc
.../glibc$ grep_syscall_wrapper lookup_dcookie
.../glibc$ grep_syscall_wrapper mbind
.../glibc$ grep_syscall_wrapper migrate_pages
.../glibc$

function grep_syscall_wrapper()
{
	if ! [ -v 1 ]; then
		>&2 echo "Usage: ${FUNCNAME[0]} <syscall>";
		return ${EX_USAGE};
	fi

	find * -type f \
	|grep '\.h$' \
	|sort -V \
	|xargs pcregrep -Mn \
	  "(?s)^[^\s#][\w\s]+\s+\**${1}\s*\([\w\s()[\]*,]*?(...)?\)[\w\s()]*;" \
	|sed -E 's/^[^:]+:[0-9]+:/&\n/';
}

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-02-06 21:45:41 +01:00
Alejandro Colomar 3d18bee298 getsockname.2: Use restrict in prototypes
POSIX specifies that the 2nd and 3rd parameters to getsockname()
shall be 'restrict'.  Glibc uses 'restrict' too.
Let's use it here too.

......

.../glibc$ grep_syscall_wrapper getsockname
socket/sys/socket.h:116:
extern int getsockname (int __fd, __SOCKADDR_ARG __addr,
			socklen_t *__restrict __len) __THROW;
.../glibc$ grep -rn '# *define __SOCKADDR_ARG'
socket/sys/socket.h:58:
 # define __SOCKADDR_ARG		struct sockaddr *__restrict
.../glibc$

function grep_syscall_wrapper()
{
	if ! [ -v 1 ]; then
		>&2 echo "Usage: ${FUNCNAME[0]} <syscall>";
		return ${EX_USAGE};
	fi

	find * -type f \
	|grep '\.h$' \
	|sort -V \
	|xargs pcregrep -Mn \
	  "(?s)^[^\s#][\w\s]+\s+\**${1}\s*\([\w\s()[\]*,]*?(...)?\)[\w\s()]*;" \
	|sed -E 's/^[^:]+:[0-9]+:/&\n/';
}

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-02-06 21:39:59 +01:00
Alejandro Colomar 1b213b4fa4 gettimeofday.2: Use restrict in prototypes
POSIX specifies that the parameters of gettimeofday() shall be
'restrict'.  Glibc uses 'restrict' too.
Let's use it here too.

......

.../glibc$ grep_syscall_wrapper gettimeofday
time/sys/time.h:66:
extern int gettimeofday (struct timeval *__restrict __tv,
			 void *__restrict __tz) __THROW __nonnull ((1));
.../glibc$

function grep_syscall_wrapper()
{
	if ! [ -v 1 ]; then
		>&2 echo "Usage: ${FUNCNAME[0]} <syscall>";
		return ${EX_USAGE};
	fi

	find * -type f \
	|grep '\.h$' \
	|sort -V \
	|xargs pcregrep -Mn \
	  "(?s)^[^\s#][\w\s]+\s+\**${1}\s*\([\w\s()[\]*,]*?(...)?\)[\w\s()]*;" \
	|sed -E 's/^[^:]+:[0-9]+:/&\n/';
}

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-02-06 21:38:53 +01:00
Alejandro Colomar eaaa85c17c getitimer.2: Use restrict in prototypes
POSIX specifies that the 2nd and 3rd parameters to setitimer()
shall be 'restrict'.  Glibc uses 'restrict' too.
Let's use it here too.

......

.../glibc$ grep_syscall_wrapper setitimer
time/sys/time.h:129:
extern int setitimer (__itimer_which_t __which,
		      const struct itimerval *__restrict __new,
		      struct itimerval *__restrict __old) __THROW;
.../glibc$

function grep_syscall_wrapper()
{
	if ! [ -v 1 ]; then
		>&2 echo "Usage: ${FUNCNAME[0]} <syscall>";
		return ${EX_USAGE};
	fi

	find * -type f \
	|grep '\.h$' \
	|sort -V \
	|xargs pcregrep -Mn \
	  "^[^\s][\w\s]+\s+\**${1}\s*\((?s)[\w\s()[\]*,]*?(...)?\)[\w\s()]*;" \
	|sed -E 's/^[^:]+:[0-9]+:/&\n/';
}

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-02-06 21:37:34 +01:00
Alejandro Colomar cb4baea939 epoll_wait.2: srcfix: glibc doesn't provide epoll_pwait2() yet
I filed a bug against glibc
requesting the wrapper for the new syscall.

Glibc bug: <https://sourceware.org/bugzilla/show_bug.cgi?id=27359>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-02-06 21:34:45 +01:00
Michael Kerrisk b926779b33 getgid.2, getuid.2: Note that these interfaces never modify 'errno'
See https://www.austingroupbugs.net/view.php?id=511
and the POSIX.1-2008 specifications of the interfaces.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-02-06 10:38:57 +01:00
Michael Kerrisk bdd65639ba setbuf.3: POSIX doesn't require to errno to be unchanged after successful setbuf()
See https://www.austingroupbugs.net/view.php?id=397#c799

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-02-06 10:26:43 +01:00
Michael Kerrisk c7c869e66d setbuf.3: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-02-06 10:19:25 +01:00
Alejandro Colomar 2a8c925ba8 s390_guarded_storage.2: tfix
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-02-04 22:36:46 +01:00
Michael Kerrisk 3aac0708a9 process_madvise.2: Restructure the text in DESCRIPTION a little
The 'advice' subsection fell in the middle of other text in the
DESCRIPTION, which is a little confusing. Instead, move that
subsection to the end of the DESCRIPTION, and make some other
minor text reorganization so that related details are placed in
the same paragraphs.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-02-02 11:43:15 +01:00
Michael Kerrisk e3ce016472 process_madvise.2: Minor edits to Suren Baghdasaryan's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-02-02 11:43:15 +01:00
Michael Kerrisk 81ec67d804 madvise.2: SEE ALSO: add process_madvise(2)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-02-02 11:43:15 +01:00
Michael Kerrisk 790593b4ae pidfd_open.2: Note the process_madvise(2) use case for PID file descriptors
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-02-02 11:43:15 +01:00
Suren Baghdasaryan a144f458ba process_madvise.2: Document process_madvise(2)
Initial version of process_madvise(2) manual page. Initial text
was extracted from [1], amended after fix [2] and more details
added using man pages of madvise(2) and process_vm_readv(2) as
examples. It also includes the changes to required permission
proposed in [3].

[1] https://lore.kernel.org/patchwork/patch/1297933/
[2] https://lkml.org/lkml/2020/12/8/1282
[3] https://patchwork.kernel.org/project/selinux/patch/20210111170622.2613577-1-surenb@google.com/#23888311

Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Reviewed-by: Michal Hocko <mhocko@suse.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-02-02 11:43:00 +01:00
Dmitry Vorobev 04f20d64e0 malloc_trim.3: Remove mention of free() call
'malloc_trim' was and is never called from the 'free' function.
see related bug in glibc tracker:
https://sourceware.org/bugzilla/show_bug.cgi?id=2531. or
'__int_free' function. Only the top part of the heap is trimmed
after some calls to 'free', which is different from 'malloc_trim'
which also releases memory in between chunks from all the
arenas/heaps.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-02-01 13:05:30 +01:00
Michael Kerrisk fecb03bc50 environ.7: Minor tweaks to Bastien's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-30 14:34:54 +01:00
Bastien Roucariès 26dc4876ef environ.7: Reorder the text
Move the the text describing how to set environment variable before
the list(s) of variables in order to improve readability.

[mtk: rewrote commit message]

Signed-off-by: Bastien Roucariès <rouca@debian.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-30 14:30:10 +01:00
Michael Kerrisk 7ec45f6276 environ.7: Note the default if PAGER is not defined
Reported-by: Bastien Roucariès <rouca@debian.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-30 13:25:25 +01:00
Michael Kerrisk bd70fd2e6d environ.7: ffix + tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-30 13:21:49 +01:00
Michael Kerrisk 241b015a62 environ.7: Various edits to Bastien Roucariès's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-30 08:55:14 +01:00
Bastien Roucariès 37147e18b6 environ.7: Document that HOME, LOGNAME, SHELL, USER are set at login time
Clearly document that HOME, LOGNAME, SHELL and USER are set at
login time by a program like such as login(1).

Document also that using su could result in a mixed environment,
and point to the su(1) manual page.

[mtk: edited commit message]

Signed-off-by: Bastien Roucariès <rouca@debian.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-30 08:55:07 +01:00
Michael Kerrisk b6cb76fb6a environ.7: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-30 08:44:13 +01:00
Michael Kerrisk 5cf53bcf1a environ.7: Improve the description of PATH
Add more details of how PATH is used, and mention the legacy
use of an empty prefix.

Changed after a suggested patch by Bastien Roucariès.

Reported-by: Bastien Roucariès <rouca@debian.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-30 08:36:08 +01:00
Michael Kerrisk 95d690a249 environ.7: wfix in description of PATH
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-30 08:21:34 +01:00
Michael Kerrisk d0281fa3d0 time.1: wfix: remove crufty sentence
Remove a sentence that should have been removed in
commit f0e173d681.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-30 08:10:56 +01:00
Michael Kerrisk f2a4cb6592 tmpfile.3: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-29 13:34:09 +01:00
Michael Kerrisk db6bce7c06 netdevice.7: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-28 21:14:17 +01:00
Pali Rohár 1af219093e netdevice.7: Update documentation for SIOCGIFADDR SIOCSIFADDR SIOCDIFADDR
Unlike SIOCGIFADDR and SIOCSIFADDR which are supported by many
protocol families, SIOCDIFADDR is supported by AF_INET6 and
AF_APPLETALK only.

Unlike other protocols, AF_INET6 uses struct in6_ifreq.

Cc: Dmitry V. Levin <ldv@altlinux.org>
Cc: <netdev@vger.kernel.org>
Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-28 21:12:42 +01:00