linux/arch/x86/include/asm/fpu
Simon Schuster bbc46b23af arch: copy_thread: pass clone_flags as u64
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 the copy_thread
function that is called from copy_process 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-3-53fcf5577d57@siemens-energy.com
Fixes: c5febea095 ("fork: Pass struct kernel_clone_args into copy_thread")
Acked-by: Guo Ren (Alibaba Damo Academy) <guoren@kernel.org>
Acked-by: Andreas Larsson <andreas@gaisler.com> # sparc
Acked-by: David Hildenbrand <david@redhat.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> # m68k
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Christian Brauner <brauner@kernel.org>
2025-09-01 15:31:34 +02:00
..
api.h Core x86 updates for v6.16: 2025-05-26 16:04:17 -07:00
regset.h x86: Add PTRACE interface for shadow stack 2023-08-02 15:01:51 -07:00
sched.h arch: copy_thread: pass clone_flags as u64 2025-09-01 15:31:34 +02:00
signal.h x86/pkeys: Add PKRU as a parameter in signal handling functions 2024-08-02 14:12:20 +02:00
types.h x86/fpu/xstate: Add CET supervisor xfeature support as a guest-only feature 2025-06-24 13:46:33 -07:00
xcr.h cpuidle, intel_idle: Fix CPUIDLE_FLAG_INIT_XSTATE 2023-01-13 11:48:15 +01:00
xstate.h x86/fpu/xstate: Add CET supervisor xfeature support as a guest-only feature 2025-06-24 13:46:33 -07:00