twx-linux/include/linux/sched
Simon Schuster edd3cb05c0 copy_process: pass clone_flags as u64 across calltree
With the introduction of clone3 in commit 7f192e3cd316 ("fork: add
clone3") the effective bit width of clone_flags on all architectures was
increased from 32-bit to 64-bit, with a new type of u64 for the flags.
However, for most consumers of clone_flags the interface was not
changed from the previous type of unsigned long.

While this works fine as long as none of the new 64-bit flag bits
(CLONE_CLEAR_SIGHAND and CLONE_INTO_CGROUP) are evaluated, this is still
undesirable in terms of the principle of least surprise.

Thus, this commit fixes all relevant interfaces of callees to
sys_clone3/copy_process (excluding the architecture-specific
copy_thread) to consistently pass clone_flags as u64, so that
no truncation to 32-bit integers occurs on 32-bit architectures.

Signed-off-by: Simon Schuster <schuster.simon@siemens-energy.com>
Link: https://lore.kernel.org/20250901-nios2-implement-clone3-v2-2-53fcf5577d57@siemens-energy.com
Acked-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Christian Brauner <brauner@kernel.org>
2025-09-01 15:31:34 +02:00
..
affinity.h
autogroup.h
clock.h
cond_resched.h
coredump.h
cpufreq.h
cputime.h
deadline.h sched/smp: Make SMP unconditional 2025-06-13 08:47:18 +02:00
debug.h
ext.h sched_ext: Drop kfuncs marked for removal in 6.15 2025-06-25 13:13:20 -10:00
hotplug.h
idle.h sched/smp: Make SMP unconditional 2025-06-13 08:47:18 +02:00
init.h
isolation.h
jobctl.h
loadavg.h
mm.h futex: Use RCU-based per-CPU reference counting instead of rcuref_t 2025-07-11 16:02:00 +02:00
nohz.h sched/smp: Make SMP unconditional 2025-06-13 08:47:18 +02:00
numa_balancing.h
posix-timers.h
prio.h
rseq_api.h
rt.h
sd_flags.h sched/topology: Remove sched_domain_topology_level::flags 2025-07-14 10:59:35 +02:00
signal.h
smt.h
stat.h
sysctl.h
task_flags.h
task_stack.h sched/task_stack: Add missing const qualifier to end_of_stack() 2025-07-26 14:28:35 -07:00
task.h copy_process: pass clone_flags as u64 across calltree 2025-09-01 15:31:34 +02:00
thread_info_api.h
topology.h sched/topology: Remove sched_domain_topology_level::flags 2025-07-14 10:59:35 +02:00
types.h
user.h
vhost_task.h
wake_q.h
xacct.h