[LTP] [bug?] clone(CLONE_IO) failing after kernel commit commit ef2c41cf38a7
Florian Weimer
fw@deneb.enyo.de
Tue May 5 13:34:42 CEST 2020
* Christian Brauner:
> diff --git a/kernel/fork.c b/kernel/fork.c
> index 8c700f881d92..e192089f133e 100644
> --- a/kernel/fork.c
> +++ b/kernel/fork.c
> @@ -2569,12 +2569,15 @@ SYSCALL_DEFINE5(clone, unsigned long, clone_flags, unsigned long, newsp,
> unsigned long, tls)
> #endif
> {
> + /* Ignore the upper 32 bits. */
> + unsigned int flags = (clone_flags & 0xfffffff);
> +
> struct kernel_clone_args args = {
> - .flags = (clone_flags & ~CSIGNAL),
> + .flags = (flags & ~CSIGNAL),
> .pidfd = parent_tidptr,
> .child_tid = child_tidptr,
> .parent_tid = parent_tidptr,
> - .exit_signal = (clone_flags & CSIGNAL),
> + .exit_signal = (flags & CSIGNAL),
> .stack = newsp,
> .tls = tls,
> }
>
> (Note that kernel_clone_args->flags is a 64 bit unsigned integer.)
This looks reasonable to me, but I have not tested it. I think it
will restore the expected no-check behavior for clone flags.
More information about the ltp
mailing list