summaryrefslogtreecommitdiff
path: root/include/uapi/linux
diff options
context:
space:
mode:
authorAleksa Sarai <cyphar@cyphar.com>2019-10-01 04:10:53 +0300
committerChristian Brauner <christian.brauner@ubuntu.com>2019-10-01 16:45:10 +0300
commitf14c234b4bc5184fd40d9a47830e5b32c3b36d49 (patch)
tree03dd3b1cb5035fa6cec8389cf10ea30ddd1ec3e3 /include/uapi/linux
parentf5a1a536fa14895ccff4e94e6a5af90901ce86aa (diff)
downloadlinux-f14c234b4bc5184fd40d9a47830e5b32c3b36d49.tar.xz
clone3: switch to copy_struct_from_user()
Switch clone3() syscall from it's own copying struct clone_args from userspace to the new dedicated copy_struct_from_user() helper. The change is very straightforward, and helps unify the syscall interface for struct-from-userspace syscalls. Additionally, explicitly define CLONE_ARGS_SIZE_VER0 to match the other users of the struct-extension pattern. Signed-off-by: Aleksa Sarai <cyphar@cyphar.com> Reviewed-by: Kees Cook <keescook@chromium.org> Reviewed-by: Christian Brauner <christian.brauner@ubuntu.com> [christian.brauner@ubuntu.com: improve commit message] Link: https://lore.kernel.org/r/20191001011055.19283-3-cyphar@cyphar.com Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Diffstat (limited to 'include/uapi/linux')
-rw-r--r--include/uapi/linux/sched.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/uapi/linux/sched.h b/include/uapi/linux/sched.h
index b3105ac1381a..0945805982b4 100644
--- a/include/uapi/linux/sched.h
+++ b/include/uapi/linux/sched.h
@@ -47,6 +47,8 @@ struct clone_args {
__aligned_u64 tls;
};
+#define CLONE_ARGS_SIZE_VER0 64 /* sizeof first published struct */
+
/*
* Scheduling policies
*/