linux/security/apparmor
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
..
include + Features 2025-08-04 08:17:28 -07:00
.gitignore
Kconfig Revert "apparmor: use SHA-256 library API instead of crypto_shash API" 2025-07-15 22:39:22 -07:00
Makefile apparmor: make all generated string array headers const char *const 2025-05-25 20:15:01 -07:00
af_unix.c apparmor: transition from a list of rules to a vector of rules 2025-07-20 02:31:06 -07:00
apparmorfs.c + Features 2025-08-04 08:17:28 -07:00
audit.c apparmor: add support for profiles to define the kill signal 2025-01-18 06:47:12 -08:00
capability.c apparmor: transition from a list of rules to a vector of rules 2025-07-20 02:31:06 -07:00
crypto.c Revert "apparmor: use SHA-256 library API instead of crypto_shash API" 2025-07-15 22:39:22 -07:00
domain.c apparmor: transition from a list of rules to a vector of rules 2025-07-20 02:31:06 -07:00
file.c + Features 2025-08-04 08:17:28 -07:00
ipc.c apparmor: transition from a list of rules to a vector of rules 2025-07-20 02:31:06 -07:00
label.c apparmor: fix typos and spelling errors 2025-02-10 11:17:49 -08:00
lib.c apparmor: fix documentation mismatches in val_mask_to_str and socket functions 2025-07-20 02:19:28 -07:00
lsm.c copy_process: pass clone_flags as u64 across calltree 2025-09-01 15:31:34 +02:00
match.c apparmor: fix loop detection used in conflicting attachment resolution 2025-05-25 20:14:53 -07:00
mount.c apparmor: transition from a list of rules to a vector of rules 2025-07-20 02:31:06 -07:00
net.c apparmor: transition from a list of rules to a vector of rules 2025-07-20 02:31:06 -07:00
nulldfa.in
path.c apparmor: Use IS_ERR_OR_NULL() helper function 2024-11-26 19:21:05 -08:00
policy.c apparmor: fix: oops when trying to free null ruleset 2025-08-04 01:14:56 -07:00
policy_compat.c apparmor: add additional flags to extended permission. 2025-01-18 06:47:12 -08:00
policy_ns.c apparmor: Improve debug print infrastructure 2025-01-18 06:47:11 -08:00
policy_unpack.c apparmor: fix: accept2 being specifie even when permission table is presnt 2025-07-20 02:31:13 -07:00
policy_unpack_test.c + Features 2025-08-04 08:17:28 -07:00
procattr.c apparmor: Improve debug print infrastructure 2025-01-18 06:47:11 -08:00
resource.c apparmor: transition from a list of rules to a vector of rules 2025-07-20 02:31:06 -07:00
secid.c lsm: secctx provider check on release 2024-12-04 14:59:57 -05:00
stacksplitdfa.in
task.c apparmor: transition from a list of rules to a vector of rules 2025-07-20 02:31:06 -07:00