linux-yocto/kernel/cgroup
Simon Schuster edd3cb05c0 copy_process: pass clone_flags as u64 across calltree
With the introduction of clone3 in commit 7f192e3cd3 ("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
..
cgroup-internal.h cgroup: use subsystem-specific rstat locks to avoid contention 2025-05-19 10:29:42 -10:00
cgroup-v1.c cgroup: Add compatibility option for content of /proc/cgroups 2025-07-19 06:14:44 -10:00
cgroup.c cgroup: Add bpf prog revisions to struct cgroup_bpf 2025-06-09 16:17:11 -07:00
cpuset-internal.h cgroup/cpuset: Don't allow creation of local partition over a remote one 2025-03-31 13:26:53 -10:00
cpuset-v1.c RFC cgroup/cpuset-v1: Add deprecation messages to sched_relax_domain_level 2025-03-11 09:22:54 -10:00
cpuset.c kernel,cpuset: use node-notifier instead of memory-notifier 2025-07-13 16:38:16 -07:00
debug.c
dmem.c cgroup/dmem: Don't open-code css_for_each_descendant_pre 2025-02-19 09:50:37 +01:00
freezer.c cgroup/freezer: Add cgroup CGRP_FROZEN flag update helper 2024-10-23 09:45:09 -10:00
legacy_freezer.c Revert "cgroup_freezer: cgroup_freezing: Check if not frozen" 2025-07-17 07:57:02 -10:00
Makefile kernel/cgroup: Add "dmem" memory accounting cgroup 2025-01-06 17:24:38 +01:00
misc.c Merge branch 'kvm-tdx-initial' into HEAD 2025-04-07 07:36:33 -04:00
namespace.c copy_process: pass clone_flags as u64 across calltree 2025-09-01 15:31:34 +02:00
pids.c
rdma.c
rstat.c cgroup: llist: avoid memory tears for llist_node 2025-07-17 07:41:56 -10:00