]> xenbits.xensource.com Git - unikraft/unikraft.git/commit
lib/syscall-shim: Do not dereference optional clone() parameters
authorMichalis Pappas <michalis@unikraft.io>
Mon, 25 Nov 2024 11:46:17 +0000 (12:46 +0100)
committerUnikraft Bot <monkey@unikraft.io>
Fri, 2 May 2025 13:39:15 +0000 (13:39 +0000)
commit4f027f614c818cf9826ef6274faf0f60e3b07531
tree508a203923270fbefded5e9e8b2742c31c2b46d5
parent3a92f1ee3f933b269768102eb36622f2665726d6
lib/syscall-shim: Do not dereference optional clone() parameters

The parent_tid parameter of clone() is used to instruct the kernel
where to store the child TID in parent's memory. Similarly, the
child_tid is used to instruct the kernel where to store the child
TID in the child's memory. Both parameters are optional, and are
interpreted conditionally to whether the CLONE_CHILD_SETTID and
CLONE_PARENT_SETTID flags are set, respectively.

Do not interpret these options as PT_REF, as the pointer will not
be valid if the caller does not set corresponding flags.

Checkpatch-Ignore: LONG_LINE
Signed-off-by: Michalis Pappas <michalis@unikraft.io>
Approved-by: Sergiu Moga <sergiu@unikraft.io>
Reviewed-by: Sergiu Moga <sergiu@unikraft.io>
GitHub-Closes: #1564
lib/syscall_shim/uk_prsyscall.c