diff --git a/src/syscall/sysnums-arm.h b/src/syscall/sysnums-arm.h index dfd512f0..306e2b15 100644 --- a/src/syscall/sysnums-arm.h +++ b/src/syscall/sysnums-arm.h @@ -341,4 +341,5 @@ static const Sysnum sysnums_arm[] = { [ 382 ] = PR_renameat2, [ 397 ] = PR_statx, [ 412 ] = PR_utimensat_time64, + [ 435 ] = PR_clone3, }; diff --git a/src/syscall/sysnums-arm64.h b/src/syscall/sysnums-arm64.h index dfb9889f..65ccc4ef 100644 --- a/src/syscall/sysnums-arm64.h +++ b/src/syscall/sysnums-arm64.h @@ -264,4 +264,5 @@ static const Sysnum sysnums_arm64[] = { [ 275 ] = PR_sched_getattr, [ 276 ] = PR_renameat2, [ 291 ] = PR_statx, + [ 435 ] = PR_clone3, }; diff --git a/src/syscall/sysnums-i386.h b/src/syscall/sysnums-i386.h index 3bbb70e4..0f3daf22 100644 --- a/src/syscall/sysnums-i386.h +++ b/src/syscall/sysnums-i386.h @@ -353,4 +353,5 @@ static const Sysnum sysnums_i386[] = { [ 353 ] = PR_renameat2, [ 383 ] = PR_statx, [ 412 ] = PR_utimensat_time64, + [ 435 ] = PR_clone3, }; diff --git a/src/syscall/sysnums-sh4.h b/src/syscall/sysnums-sh4.h index 1d3758c4..09acca62 100644 --- a/src/syscall/sysnums-sh4.h +++ b/src/syscall/sysnums-sh4.h @@ -344,4 +344,5 @@ static const Sysnum sysnums_sh4[] = { [ 369 ] = PR_sched_setattr, [ 370 ] = PR_sched_getattr, [ 371 ] = PR_renameat2, + [ 435 ] = PR_clone3, }; diff --git a/src/syscall/sysnums-x32.h b/src/syscall/sysnums-x32.h index 448c6998..a9fdb48a 100644 --- a/src/syscall/sysnums-x32.h +++ b/src/syscall/sysnums-x32.h @@ -277,6 +277,7 @@ static const Sysnum sysnums_x32[] = { [ 315 ] = PR_sched_getattr, [ 316 ] = PR_renameat2, [ 332 ] = PR_statx, + [ 435 ] = PR_clone3, [ 439 ] = PR_faccessat2, [ 512 ] = PR_rt_sigaction, [ 513 ] = PR_rt_sigreturn, diff --git a/src/syscall/sysnums-x86_64.h b/src/syscall/sysnums-x86_64.h index 92229f81..9840b4a7 100644 --- a/src/syscall/sysnums-x86_64.h +++ b/src/syscall/sysnums-x86_64.h @@ -319,5 +319,6 @@ static const Sysnum sysnums_x86_64[] = { [ 315 ] = PR_sched_getattr, [ 316 ] = PR_renameat2, [ 332 ] = PR_statx, + [ 435 ] = PR_clone3, [ 439 ] = PR_faccessat2, }; diff --git a/src/syscall/sysnums.list b/src/syscall/sysnums.list index 1d6e666b..2b6c9b21 100644 --- a/src/syscall/sysnums.list +++ b/src/syscall/sysnums.list @@ -38,6 +38,7 @@ SYSNUM(clock_gettime) SYSNUM(clock_nanosleep) SYSNUM(clock_settime) SYSNUM(clone) +SYSNUM(clone3) SYSNUM(close) SYSNUM(connect) SYSNUM(creat) diff --git a/src/tracee/tracee.c b/src/tracee/tracee.c index 58ab7df7..9b16f6aa 100644 --- a/src/tracee/tracee.c +++ b/src/tracee/tracee.c @@ -403,6 +403,10 @@ int new_child(Tracee *parent, word_t clone_flags) status = fetch_regs(parent); if (status >= 0 && get_sysnum(parent, CURRENT) == PR_clone) clone_flags = peek_reg(parent, CURRENT, SYSARG_1); + else if (status >= 0 && get_sysnum(parent, CURRENT) == PR_clone3) + // Look at the first word of the clone_args structure, which + // contains the usual clone flags. + clone_flags = peek_word(parent, peek_reg(parent, CURRENT, SYSARG_1)); /* Get the pid of the parent's new child. */ status = ptrace(PTRACE_GETEVENTMSG, parent->pid, NULL, &pid);