Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Simon Schuster and committed by
Christian Brauner
edd3cb05 04ff4823

+59 -59
+1 -1
block/blk-ioc.c
··· 286 286 } 287 287 EXPORT_SYMBOL_GPL(set_task_ioprio); 288 288 289 - int __copy_io(unsigned long clone_flags, struct task_struct *tsk) 289 + int __copy_io(u64 clone_flags, struct task_struct *tsk) 290 290 { 291 291 struct io_context *ioc = current->io_context; 292 292
+1 -1
fs/namespace.c
··· 4200 4200 } 4201 4201 4202 4202 __latent_entropy 4203 - struct mnt_namespace *copy_mnt_ns(unsigned long flags, struct mnt_namespace *ns, 4203 + struct mnt_namespace *copy_mnt_ns(u64 flags, struct mnt_namespace *ns, 4204 4204 struct user_namespace *user_ns, struct fs_struct *new_fs) 4205 4205 { 4206 4206 struct mnt_namespace *new_ns;
+2 -2
include/linux/cgroup.h
··· 796 796 797 797 void free_cgroup_ns(struct cgroup_namespace *ns); 798 798 799 - struct cgroup_namespace *copy_cgroup_ns(unsigned long flags, 799 + struct cgroup_namespace *copy_cgroup_ns(u64 flags, 800 800 struct user_namespace *user_ns, 801 801 struct cgroup_namespace *old_ns); 802 802 ··· 818 818 819 819 static inline void free_cgroup_ns(struct cgroup_namespace *ns) { } 820 820 static inline struct cgroup_namespace * 821 - copy_cgroup_ns(unsigned long flags, struct user_namespace *user_ns, 821 + copy_cgroup_ns(u64 flags, struct user_namespace *user_ns, 822 822 struct cgroup_namespace *old_ns) 823 823 { 824 824 return old_ns;
+1 -1
include/linux/cred.h
··· 148 148 149 149 extern void __put_cred(struct cred *); 150 150 extern void exit_creds(struct task_struct *); 151 - extern int copy_creds(struct task_struct *, unsigned long); 151 + extern int copy_creds(struct task_struct *, u64); 152 152 extern const struct cred *get_task_cred(struct task_struct *); 153 153 extern struct cred *cred_alloc_blank(void); 154 154 extern struct cred *prepare_creds(void);
+3 -3
include/linux/iocontext.h
··· 118 118 #ifdef CONFIG_BLOCK 119 119 void put_io_context(struct io_context *ioc); 120 120 void exit_io_context(struct task_struct *task); 121 - int __copy_io(unsigned long clone_flags, struct task_struct *tsk); 122 - static inline int copy_io(unsigned long clone_flags, struct task_struct *tsk) 121 + int __copy_io(u64 clone_flags, struct task_struct *tsk); 122 + static inline int copy_io(u64 clone_flags, struct task_struct *tsk) 123 123 { 124 124 if (!current->io_context) 125 125 return 0; ··· 129 129 struct io_context; 130 130 static inline void put_io_context(struct io_context *ioc) { } 131 131 static inline void exit_io_context(struct task_struct *task) { } 132 - static inline int copy_io(unsigned long clone_flags, struct task_struct *tsk) 132 + static inline int copy_io(u64 clone_flags, struct task_struct *tsk) 133 133 { 134 134 return 0; 135 135 }
+2 -2
include/linux/ipc_namespace.h
··· 129 129 #endif 130 130 131 131 #if defined(CONFIG_IPC_NS) 132 - extern struct ipc_namespace *copy_ipcs(unsigned long flags, 132 + extern struct ipc_namespace *copy_ipcs(u64 flags, 133 133 struct user_namespace *user_ns, struct ipc_namespace *ns); 134 134 135 135 static inline struct ipc_namespace *get_ipc_ns(struct ipc_namespace *ns) ··· 151 151 152 152 extern void put_ipc_ns(struct ipc_namespace *ns); 153 153 #else 154 - static inline struct ipc_namespace *copy_ipcs(unsigned long flags, 154 + static inline struct ipc_namespace *copy_ipcs(u64 flags, 155 155 struct user_namespace *user_ns, struct ipc_namespace *ns) 156 156 { 157 157 if (flags & CLONE_NEWIPC)
+1 -1
include/linux/lsm_hook_defs.h
··· 211 211 LSM_HOOK(int, 0, file_post_open, struct file *file, int mask) 212 212 LSM_HOOK(int, 0, file_truncate, struct file *file) 213 213 LSM_HOOK(int, 0, task_alloc, struct task_struct *task, 214 - unsigned long clone_flags) 214 + u64 clone_flags) 215 215 LSM_HOOK(void, LSM_RET_VOID, task_free, struct task_struct *task) 216 216 LSM_HOOK(int, 0, cred_alloc_blank, struct cred *cred, gfp_t gfp) 217 217 LSM_HOOK(void, LSM_RET_VOID, cred_free, struct cred *cred)
+1 -1
include/linux/mnt_namespace.h
··· 11 11 struct user_namespace; 12 12 struct ns_common; 13 13 14 - extern struct mnt_namespace *copy_mnt_ns(unsigned long, struct mnt_namespace *, 14 + extern struct mnt_namespace *copy_mnt_ns(u64, struct mnt_namespace *, 15 15 struct user_namespace *, struct fs_struct *); 16 16 extern void put_mnt_ns(struct mnt_namespace *ns); 17 17 DEFINE_FREE(put_mnt_ns, struct mnt_namespace *, if (!IS_ERR_OR_NULL(_T)) put_mnt_ns(_T))
+1 -1
include/linux/nsproxy.h
··· 103 103 * 104 104 */ 105 105 106 - int copy_namespaces(unsigned long flags, struct task_struct *tsk); 106 + int copy_namespaces(u64 flags, struct task_struct *tsk); 107 107 void exit_task_namespaces(struct task_struct *tsk); 108 108 void switch_task_namespaces(struct task_struct *tsk, struct nsproxy *new); 109 109 int exec_task_namespaces(void);
+2 -2
include/linux/pid_namespace.h
··· 78 78 } 79 79 #endif 80 80 81 - extern struct pid_namespace *copy_pid_ns(unsigned long flags, 81 + extern struct pid_namespace *copy_pid_ns(u64 flags, 82 82 struct user_namespace *user_ns, struct pid_namespace *ns); 83 83 extern void zap_pid_ns_processes(struct pid_namespace *pid_ns); 84 84 extern int reboot_pid_ns(struct pid_namespace *pid_ns, int cmd); ··· 97 97 return 0; 98 98 } 99 99 100 - static inline struct pid_namespace *copy_pid_ns(unsigned long flags, 100 + static inline struct pid_namespace *copy_pid_ns(u64 flags, 101 101 struct user_namespace *user_ns, struct pid_namespace *ns) 102 102 { 103 103 if (flags & CLONE_NEWPID)
+2 -2
include/linux/rseq.h
··· 65 65 * If parent process has a registered restartable sequences area, the 66 66 * child inherits. Unregister rseq for a clone with CLONE_VM set. 67 67 */ 68 - static inline void rseq_fork(struct task_struct *t, unsigned long clone_flags) 68 + static inline void rseq_fork(struct task_struct *t, u64 clone_flags) 69 69 { 70 70 if (clone_flags & CLONE_VM) { 71 71 t->rseq = NULL; ··· 107 107 static inline void rseq_migrate(struct task_struct *t) 108 108 { 109 109 } 110 - static inline void rseq_fork(struct task_struct *t, unsigned long clone_flags) 110 + static inline void rseq_fork(struct task_struct *t, u64 clone_flags) 111 111 { 112 112 } 113 113 static inline void rseq_execve(struct task_struct *t)
+1 -1
include/linux/sched/task.h
··· 63 63 extern asmlinkage void schedule_tail(struct task_struct *prev); 64 64 extern void init_idle(struct task_struct *idle, int cpu); 65 65 66 - extern int sched_fork(unsigned long clone_flags, struct task_struct *p); 66 + extern int sched_fork(u64 clone_flags, struct task_struct *p); 67 67 extern int sched_cgroup_fork(struct task_struct *p, struct kernel_clone_args *kargs); 68 68 extern void sched_cancel_fork(struct task_struct *p); 69 69 extern void sched_post_fork(struct task_struct *p);
+2 -2
include/linux/security.h
··· 489 489 int security_file_open(struct file *file); 490 490 int security_file_post_open(struct file *file, int mask); 491 491 int security_file_truncate(struct file *file); 492 - int security_task_alloc(struct task_struct *task, unsigned long clone_flags); 492 + int security_task_alloc(struct task_struct *task, u64 clone_flags); 493 493 void security_task_free(struct task_struct *task); 494 494 int security_cred_alloc_blank(struct cred *cred, gfp_t gfp); 495 495 void security_cred_free(struct cred *cred); ··· 1215 1215 } 1216 1216 1217 1217 static inline int security_task_alloc(struct task_struct *task, 1218 - unsigned long clone_flags) 1218 + u64 clone_flags) 1219 1219 { 1220 1220 return 0; 1221 1221 }
+2 -2
include/linux/sem.h
··· 9 9 10 10 #ifdef CONFIG_SYSVIPC 11 11 12 - extern int copy_semundo(unsigned long clone_flags, struct task_struct *tsk); 12 + extern int copy_semundo(u64 clone_flags, struct task_struct *tsk); 13 13 extern void exit_sem(struct task_struct *tsk); 14 14 15 15 #else 16 16 17 - static inline int copy_semundo(unsigned long clone_flags, struct task_struct *tsk) 17 + static inline int copy_semundo(u64 clone_flags, struct task_struct *tsk) 18 18 { 19 19 return 0; 20 20 }
+2 -2
include/linux/time_namespace.h
··· 43 43 return ns; 44 44 } 45 45 46 - struct time_namespace *copy_time_ns(unsigned long flags, 46 + struct time_namespace *copy_time_ns(u64 flags, 47 47 struct user_namespace *user_ns, 48 48 struct time_namespace *old_ns); 49 49 void free_time_ns(struct time_namespace *ns); ··· 129 129 } 130 130 131 131 static inline 132 - struct time_namespace *copy_time_ns(unsigned long flags, 132 + struct time_namespace *copy_time_ns(u64 flags, 133 133 struct user_namespace *user_ns, 134 134 struct time_namespace *old_ns) 135 135 {
+2 -2
include/linux/uprobes.h
··· 205 205 extern void uprobe_end_dup_mmap(void); 206 206 extern void uprobe_dup_mmap(struct mm_struct *oldmm, struct mm_struct *newmm); 207 207 extern void uprobe_free_utask(struct task_struct *t); 208 - extern void uprobe_copy_process(struct task_struct *t, unsigned long flags); 208 + extern void uprobe_copy_process(struct task_struct *t, u64 flags); 209 209 extern int uprobe_post_sstep_notifier(struct pt_regs *regs); 210 210 extern int uprobe_pre_sstep_notifier(struct pt_regs *regs); 211 211 extern void uprobe_notify_resume(struct pt_regs *regs); ··· 281 281 static inline void uprobe_free_utask(struct task_struct *t) 282 282 { 283 283 } 284 - static inline void uprobe_copy_process(struct task_struct *t, unsigned long flags) 284 + static inline void uprobe_copy_process(struct task_struct *t, u64 flags) 285 285 { 286 286 } 287 287 static inline void uprobe_clear_state(struct mm_struct *mm)
+2 -2
include/linux/user_events.h
··· 33 33 extern void user_event_mm_remove(struct task_struct *t); 34 34 35 35 static inline void user_events_fork(struct task_struct *t, 36 - unsigned long clone_flags) 36 + u64 clone_flags) 37 37 { 38 38 struct user_event_mm *old_mm; 39 39 ··· 68 68 } 69 69 #else 70 70 static inline void user_events_fork(struct task_struct *t, 71 - unsigned long clone_flags) 71 + u64 clone_flags) 72 72 { 73 73 } 74 74
+2 -2
include/linux/utsname.h
··· 35 35 refcount_inc(&ns->ns.count); 36 36 } 37 37 38 - extern struct uts_namespace *copy_utsname(unsigned long flags, 38 + extern struct uts_namespace *copy_utsname(u64 flags, 39 39 struct user_namespace *user_ns, struct uts_namespace *old_ns); 40 40 extern void free_uts_ns(struct uts_namespace *ns); 41 41 ··· 55 55 { 56 56 } 57 57 58 - static inline struct uts_namespace *copy_utsname(unsigned long flags, 58 + static inline struct uts_namespace *copy_utsname(u64 flags, 59 59 struct user_namespace *user_ns, struct uts_namespace *old_ns) 60 60 { 61 61 if (flags & CLONE_NEWUTS)
+2 -2
include/net/net_namespace.h
··· 204 204 extern struct net init_net; 205 205 206 206 #ifdef CONFIG_NET_NS 207 - struct net *copy_net_ns(unsigned long flags, struct user_namespace *user_ns, 207 + struct net *copy_net_ns(u64 flags, struct user_namespace *user_ns, 208 208 struct net *old_net); 209 209 210 210 void net_ns_get_ownership(const struct net *net, kuid_t *uid, kgid_t *gid); ··· 218 218 #else /* CONFIG_NET_NS */ 219 219 #include <linux/sched.h> 220 220 #include <linux/nsproxy.h> 221 - static inline struct net *copy_net_ns(unsigned long flags, 221 + static inline struct net *copy_net_ns(u64 flags, 222 222 struct user_namespace *user_ns, struct net *old_net) 223 223 { 224 224 if (flags & CLONE_NEWNET)
+3 -3
include/trace/events/task.h
··· 8 8 9 9 TRACE_EVENT(task_newtask, 10 10 11 - TP_PROTO(struct task_struct *task, unsigned long clone_flags), 11 + TP_PROTO(struct task_struct *task, u64 clone_flags), 12 12 13 13 TP_ARGS(task, clone_flags), 14 14 15 15 TP_STRUCT__entry( 16 16 __field( pid_t, pid) 17 17 __array( char, comm, TASK_COMM_LEN) 18 - __field( unsigned long, clone_flags) 18 + __field( u64, clone_flags) 19 19 __field( short, oom_score_adj) 20 20 ), 21 21 ··· 26 26 __entry->oom_score_adj = task->signal->oom_score_adj; 27 27 ), 28 28 29 - TP_printk("pid=%d comm=%s clone_flags=%lx oom_score_adj=%hd", 29 + TP_printk("pid=%d comm=%s clone_flags=%llx oom_score_adj=%hd", 30 30 __entry->pid, __entry->comm, 31 31 __entry->clone_flags, __entry->oom_score_adj) 32 32 );
+1 -1
ipc/namespace.c
··· 106 106 return ERR_PTR(err); 107 107 } 108 108 109 - struct ipc_namespace *copy_ipcs(unsigned long flags, 109 + struct ipc_namespace *copy_ipcs(u64 flags, 110 110 struct user_namespace *user_ns, struct ipc_namespace *ns) 111 111 { 112 112 if (!(flags & CLONE_NEWIPC))
+1 -1
ipc/sem.c
··· 2303 2303 * parent and child tasks. 2304 2304 */ 2305 2305 2306 - int copy_semundo(unsigned long clone_flags, struct task_struct *tsk) 2306 + int copy_semundo(u64 clone_flags, struct task_struct *tsk) 2307 2307 { 2308 2308 struct sem_undo_list *undo_list; 2309 2309 int error;
+1 -1
kernel/cgroup/namespace.c
··· 47 47 } 48 48 EXPORT_SYMBOL(free_cgroup_ns); 49 49 50 - struct cgroup_namespace *copy_cgroup_ns(unsigned long flags, 50 + struct cgroup_namespace *copy_cgroup_ns(u64 flags, 51 51 struct user_namespace *user_ns, 52 52 struct cgroup_namespace *old_ns) 53 53 {
+1 -1
kernel/cred.c
··· 287 287 * The new process gets the current process's subjective credentials as its 288 288 * objective and subjective credentials 289 289 */ 290 - int copy_creds(struct task_struct *p, unsigned long clone_flags) 290 + int copy_creds(struct task_struct *p, u64 clone_flags) 291 291 { 292 292 struct cred *new; 293 293 int ret;
+1 -1
kernel/events/uprobes.c
··· 2160 2160 /* 2161 2161 * Called in context of a new clone/fork from copy_process. 2162 2162 */ 2163 - void uprobe_copy_process(struct task_struct *t, unsigned long flags) 2163 + void uprobe_copy_process(struct task_struct *t, u64 flags) 2164 2164 { 2165 2165 struct uprobe_task *utask = current->utask; 2166 2166 struct mm_struct *mm = current->mm;
+4 -4
kernel/fork.c
··· 1507 1507 return NULL; 1508 1508 } 1509 1509 1510 - static int copy_mm(unsigned long clone_flags, struct task_struct *tsk) 1510 + static int copy_mm(u64 clone_flags, struct task_struct *tsk) 1511 1511 { 1512 1512 struct mm_struct *mm, *oldmm; 1513 1513 ··· 1545 1545 return 0; 1546 1546 } 1547 1547 1548 - static int copy_fs(unsigned long clone_flags, struct task_struct *tsk) 1548 + static int copy_fs(u64 clone_flags, struct task_struct *tsk) 1549 1549 { 1550 1550 struct fs_struct *fs = current->fs; 1551 1551 if (clone_flags & CLONE_FS) { ··· 1566 1566 return 0; 1567 1567 } 1568 1568 1569 - static int copy_files(unsigned long clone_flags, struct task_struct *tsk, 1569 + static int copy_files(u64 clone_flags, struct task_struct *tsk, 1570 1570 int no_files) 1571 1571 { 1572 1572 struct files_struct *oldf, *newf; ··· 1645 1645 posix_cputimers_group_init(pct, cpu_limit); 1646 1646 } 1647 1647 1648 - static int copy_signal(unsigned long clone_flags, struct task_struct *tsk) 1648 + static int copy_signal(u64 clone_flags, struct task_struct *tsk) 1649 1649 { 1650 1650 struct signal_struct *sig; 1651 1651
+2 -2
kernel/nsproxy.c
··· 64 64 * Return the newly created nsproxy. Do not attach this to the task, 65 65 * leave it to the caller to do proper locking and attach it to task. 66 66 */ 67 - static struct nsproxy *create_new_namespaces(unsigned long flags, 67 + static struct nsproxy *create_new_namespaces(u64 flags, 68 68 struct task_struct *tsk, struct user_namespace *user_ns, 69 69 struct fs_struct *new_fs) 70 70 { ··· 144 144 * called from clone. This now handles copy for nsproxy and all 145 145 * namespaces therein. 146 146 */ 147 - int copy_namespaces(unsigned long flags, struct task_struct *tsk) 147 + int copy_namespaces(u64 flags, struct task_struct *tsk) 148 148 { 149 149 struct nsproxy *old_ns = tsk->nsproxy; 150 150 struct user_namespace *user_ns = task_cred_xxx(tsk, user_ns);
+1 -1
kernel/pid_namespace.c
··· 171 171 } while (ns != &init_pid_ns && refcount_dec_and_test(&ns->ns.count)); 172 172 } 173 173 174 - struct pid_namespace *copy_pid_ns(unsigned long flags, 174 + struct pid_namespace *copy_pid_ns(u64 flags, 175 175 struct user_namespace *user_ns, struct pid_namespace *old_ns) 176 176 { 177 177 if (!(flags & CLONE_NEWPID))
+2 -2
kernel/sched/core.c
··· 4472 4472 * __sched_fork() is basic setup which is also used by sched_init() to 4473 4473 * initialize the boot CPU's idle task. 4474 4474 */ 4475 - static void __sched_fork(unsigned long clone_flags, struct task_struct *p) 4475 + static void __sched_fork(u64 clone_flags, struct task_struct *p) 4476 4476 { 4477 4477 p->on_rq = 0; 4478 4478 ··· 4707 4707 /* 4708 4708 * fork()/clone()-time setup: 4709 4709 */ 4710 - int sched_fork(unsigned long clone_flags, struct task_struct *p) 4710 + int sched_fork(u64 clone_flags, struct task_struct *p) 4711 4711 { 4712 4712 __sched_fork(clone_flags, p); 4713 4713 /*
+1 -1
kernel/sched/fair.c
··· 3542 3542 } 3543 3543 } 3544 3544 3545 - void init_numa_balancing(unsigned long clone_flags, struct task_struct *p) 3545 + void init_numa_balancing(u64 clone_flags, struct task_struct *p) 3546 3546 { 3547 3547 int mm_users = 0; 3548 3548 struct mm_struct *mm = p->mm;
+2 -2
kernel/sched/sched.h
··· 1935 1935 extern int migrate_task_to(struct task_struct *p, int cpu); 1936 1936 extern int migrate_swap(struct task_struct *p, struct task_struct *t, 1937 1937 int cpu, int scpu); 1938 - extern void init_numa_balancing(unsigned long clone_flags, struct task_struct *p); 1938 + extern void init_numa_balancing(u64 clone_flags, struct task_struct *p); 1939 1939 1940 1940 #else /* !CONFIG_NUMA_BALANCING: */ 1941 1941 1942 1942 static inline void 1943 - init_numa_balancing(unsigned long clone_flags, struct task_struct *p) 1943 + init_numa_balancing(u64 clone_flags, struct task_struct *p) 1944 1944 { 1945 1945 } 1946 1946
+1 -1
kernel/time/namespace.c
··· 130 130 * 131 131 * Return: timens_for_children namespace or ERR_PTR. 132 132 */ 133 - struct time_namespace *copy_time_ns(unsigned long flags, 133 + struct time_namespace *copy_time_ns(u64 flags, 134 134 struct user_namespace *user_ns, struct time_namespace *old_ns) 135 135 { 136 136 if (!(flags & CLONE_NEWTIME))
+1 -1
kernel/utsname.c
··· 86 86 * utsname of this process won't be seen by parent, and vice 87 87 * versa. 88 88 */ 89 - struct uts_namespace *copy_utsname(unsigned long flags, 89 + struct uts_namespace *copy_utsname(u64 flags, 90 90 struct user_namespace *user_ns, struct uts_namespace *old_ns) 91 91 { 92 92 struct uts_namespace *new_ns;
+1 -1
net/core/net_namespace.c
··· 539 539 net_passive_dec(net); 540 540 } 541 541 542 - struct net *copy_net_ns(unsigned long flags, 542 + struct net *copy_net_ns(u64 flags, 543 543 struct user_namespace *user_ns, struct net *old_net) 544 544 { 545 545 struct ucounts *ucounts;
+1 -1
security/apparmor/lsm.c
··· 112 112 } 113 113 114 114 static int apparmor_task_alloc(struct task_struct *task, 115 - unsigned long clone_flags) 115 + u64 clone_flags) 116 116 { 117 117 struct aa_task_ctx *new = task_ctx(task); 118 118
+1 -1
security/security.c
··· 3185 3185 * 3186 3186 * Return: Returns a zero on success, negative values on failure. 3187 3187 */ 3188 - int security_task_alloc(struct task_struct *task, unsigned long clone_flags) 3188 + int security_task_alloc(struct task_struct *task, u64 clone_flags) 3189 3189 { 3190 3190 int rc = lsm_task_alloc(task); 3191 3191
+1 -1
security/selinux/hooks.c
··· 4144 4144 /* task security operations */ 4145 4145 4146 4146 static int selinux_task_alloc(struct task_struct *task, 4147 - unsigned long clone_flags) 4147 + u64 clone_flags) 4148 4148 { 4149 4149 u32 sid = current_sid(); 4150 4150
+1 -1
security/tomoyo/tomoyo.c
··· 514 514 * Returns 0. 515 515 */ 516 516 static int tomoyo_task_alloc(struct task_struct *task, 517 - unsigned long clone_flags) 517 + u64 clone_flags) 518 518 { 519 519 struct tomoyo_task *old = tomoyo_task(current); 520 520 struct tomoyo_task *new = tomoyo_task(task);