Document the FICLONE and FICLONERANGE ioctls, formerly known as
the BTRFS_IOC_CLONE and BTRFS_IOC_CLONE_RANGE ioctls.
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
iBoth add_key and the utility "keyctl add" return EINVAL when
attempting to add a user key with an empty or NULL payload.
The manpage implies that this should be valid.
From my reading of the kernel source, this has not been possible
since at least linux kernel commit 1da177e4 (2.6.12-rc2 on
2005-04-16).
Until kernel commit cf7f601c,
security/keys/user_defined.c:user_instantiate returned -EINVAL
if datalen <= 0. That commit only moved this behavior to a new
user_preparse function, where it remains today in b562e44f
(4.5.0 on 2016-03-13).
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
The existing text makes no differentiation between different
"classes" of mount flags. However, certain flags such as
MS_REMOUNT, MS_BIND, MS_MOVE, etc. determine the general
type of operation that mount() performs. Furthermore, the
choice of which class of operation to perform is performed in
a certain order, and that order is significant if multiple
flags are specified. Restructure and extend the text to
reflect these details.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This error appears to have been injected into glibc
when copying some headers from BSD.
See https://bugs.debian.org/825548
Reported-by: Jacob Willoughby <jacob@spacemonkey.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Quoting Tom:
The statement "With a zero flags argument, recv() is equivalent to
read(2)." is not correct. In the case of passing a UDP socket an
empty buffer the two calls differ. read(2) will be a noop (as it
rightly says in its manpage), but recv(2) will discard the
packet.
We ran into this in networkd, as we use FIONREAD to determine the
buffer size (and allocate the right buffer), so in case someone
passed us an empty packet we would end up in a busy loop when we
were using read(2). Changing to recv(2) fixed the issue
[https://github.com/systemd/systemd/pull/3299].
Reported-by: Tom Gundersen <teg@jklm.no>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This is patch for current master. Fixes small typo.
From 94292ebe260a64920c63fe64075e0fa636a126cb Mon Sep 17 00:00:00 2001
From: Marko Kevac <marko@kevac.org>
Date: Sun, 15 May 2016 23:56:34 +0300
Subject: [PATCH] memfd_create.2: tfix
As noted by Colin King:
Currently, the aarch64 clone() system call requires the stack
to be aligned at a 16 byte boundary, see
arch/arm64/kernel/process.c, copy_thread():
if (stack_start) {
if (is_compat_thread(task_thread_info(p)))
childregs->compat_sp = stack_start;
/* 16-byte aligned stack mandatory on AArch64 */
else if (stack_start & 15)
return -EINVAL;
else
childregs->sp = stack_start;
}
..and returns -EINVAL if not aligned correctly. This should
be added to the manual page clone(2) as it took me a while to
figure out why clone() was failing with -EINVAL for aarch64
but not on x86.
Reported-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>