History

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.

Simon Schuster committed 1 year ago

Commit edd3cb01 parent 04ff48238 files · +59 −59Browse files

Unified · Split

38 files
  1. block/blk-ioc.c +1 −1
  2. fs/namespace.c +1 −1
  3. include/linux/cgroup.h +2 −2
  4. include/linux/cred.h +1 −1
  5. include/linux/iocontext.h +3 −3
  6. include/linux/ipc_namespace.h +2 −2
  7. include/linux/lsm_hook_defs.h +1 −1
  8. include/linux/mnt_namespace.h +1 −1
  9. include/linux/nsproxy.h +1 −1
  10. include/linux/pid_namespace.h +2 −2
  11. include/linux/rseq.h +2 −2
  12. include/linux/sched/task.h +1 −1
  13. include/linux/security.h +2 −2
  14. include/linux/sem.h +2 −2
  15. include/linux/time_namespace.h +2 −2
  16. include/linux/uprobes.h +2 −2
  17. include/linux/user_events.h +2 −2
  18. include/linux/utsname.h +2 −2
  19. include/net/net_namespace.h +2 −2
  20. include/trace/events/task.h +3 −3
  21. ipc/namespace.c +1 −1
  22. ipc/sem.c +1 −1
  23. kernel/cgroup/namespace.c +1 −1
  24. kernel/cred.c +1 −1
  25. kernel/events/uprobes.c +1 −1
  26. kernel/fork.c +4 −4
  27. kernel/nsproxy.c +2 −2
  28. kernel/pid_namespace.c +1 −1
  29. kernel/sched/core.c +2 −2
  30. kernel/sched/fair.c +1 −1
  31. kernel/sched/sched.h +2 −2
  32. kernel/time/namespace.c +1 −1
  33. kernel/utsname.c +1 −1
  34. net/core/net_namespace.c +1 −1
  35. security/apparmor/lsm.c +1 −1
  36. security/security.c +1 −1
  37. security/selinux/hooks.c +1 −1
  38. security/tomoyo/tomoyo.c +1 −1
block/blk-ioc.c+1−1
@@ -286,7 +286,7 @@ out: · 285 unmodified lines
286286 }
287287 EXPORT_SYMBOL_GPL(set_task_ioprio);
288288
289−int __copy_io(unsigned long clone_flags, struct task_struct *tsk)
289+int __copy_io(u64 clone_flags, struct task_struct *tsk)
290290 {
291291 struct io_context *ioc = current->io_context;
292292
fs/namespace.c+1−1
@@ -4200,7 +4200,7 @@ static struct mnt_namespace *alloc_mnt_ns(struct user_namespace *user_ns, bool a · 4199 unmodified lines
42004200 }
42014201
42024202 __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,
42044204 struct user_namespace *user_ns, struct fs_struct *new_fs)
42054205 {
42064206 struct mnt_namespace *new_ns;
include/linux/cgroup.h+2−2
@@ -796,7 +796,7 @@ extern struct cgroup_namespace init_cgroup_ns; · 795 unmodified lines
796796
797797 void free_cgroup_ns(struct cgroup_namespace *ns);
798798
799−struct cgroup_namespace *copy_cgroup_ns(unsigned long flags,
799+struct cgroup_namespace *copy_cgroup_ns(u64 flags,
800800 struct user_namespace *user_ns,
801801 struct cgroup_namespace *old_ns);
802802
@@ -818,7 +818,7 @@ static inline void put_cgroup_ns(struct cgroup_namespace *ns) · 15 unmodified lines
818818
819819 static inline void free_cgroup_ns(struct cgroup_namespace *ns) { }
820820 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,
822822 struct cgroup_namespace *old_ns)
823823 {
824824 return old_ns;
include/linux/cred.h+1−1
@@ -148,7 +148,7 @@ struct cred { · 147 unmodified lines
148148
149149 extern void __put_cred(struct cred *);
150150 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);
152152 extern const struct cred *get_task_cred(struct task_struct *);
153153 extern struct cred *cred_alloc_blank(void);
154154 extern struct cred *prepare_creds(void);
include/linux/iocontext.h+3−3
@@ -118,8 +118,8 @@ struct task_struct; · 117 unmodified lines
118118 #ifdef CONFIG_BLOCK
119119 void put_io_context(struct io_context *ioc);
120120 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)
123123 {
124124 if (!current->io_context)
125125 return 0;
@@ -129,7 +129,7 @@ static inline int copy_io(unsigned long clone_flags, struct task_struct *tsk) · 3 unmodified lines
129129 struct io_context;
130130 static inline void put_io_context(struct io_context *ioc) { }
131131 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)
133133 {
134134 return 0;
135135 }
include/linux/ipc_namespace.h+2−2
@@ -129,7 +129,7 @@ static inline int mq_init_ns(struct ipc_namespace *ns) { return 0; } · 128 unmodified lines
129129 #endif
130130
131131 #if defined(CONFIG_IPC_NS)
132−extern struct ipc_namespace *copy_ipcs(unsigned long flags,
132+extern struct ipc_namespace *copy_ipcs(u64 flags,
133133 struct user_namespace *user_ns, struct ipc_namespace *ns);
134134
135135 static inline struct ipc_namespace *get_ipc_ns(struct ipc_namespace *ns)
@@ -151,7 +151,7 @@ static inline struct ipc_namespace *get_ipc_ns_not_zero(struct ipc_namespace *ns · 15 unmodified lines
151151
152152 extern void put_ipc_ns(struct ipc_namespace *ns);
153153 #else
154−static inline struct ipc_namespace *copy_ipcs(unsigned long flags,
154+static inline struct ipc_namespace *copy_ipcs(u64 flags,
155155 struct user_namespace *user_ns, struct ipc_namespace *ns)
156156 {
157157 if (flags & CLONE_NEWIPC)
include/linux/lsm_hook_defs.h+1−1
@@ -211,7 +211,7 @@ LSM_HOOK(int, 0, file_open, struct file *file) · 210 unmodified lines
211211 LSM_HOOK(int, 0, file_post_open, struct file *file, int mask)
212212 LSM_HOOK(int, 0, file_truncate, struct file *file)
213213 LSM_HOOK(int, 0, task_alloc, struct task_struct *task,
214− unsigned long clone_flags)
214+ u64 clone_flags)
215215 LSM_HOOK(void, LSM_RET_VOID, task_free, struct task_struct *task)
216216 LSM_HOOK(int, 0, cred_alloc_blank, struct cred *cred, gfp_t gfp)
217217 LSM_HOOK(void, LSM_RET_VOID, cred_free, struct cred *cred)
include/linux/mnt_namespace.h+1−1
@@ -11,7 +11,7 @@ struct fs_struct; · 10 unmodified lines
1111 struct user_namespace;
1212 struct ns_common;
1313
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 *,
1515 struct user_namespace *, struct fs_struct *);
1616 extern void put_mnt_ns(struct mnt_namespace *ns);
1717 DEFINE_FREE(put_mnt_ns, struct mnt_namespace *, if (!IS_ERR_OR_NULL(_T)) put_mnt_ns(_T))
include/linux/nsproxy.h+1−1
@@ -103,7 +103,7 @@ static inline struct cred *nsset_cred(struct nsset *set) · 102 unmodified lines
103103 *
104104 */
105105
106−int copy_namespaces(unsigned long flags, struct task_struct *tsk);
106+int copy_namespaces(u64 flags, struct task_struct *tsk);
107107 void exit_task_namespaces(struct task_struct *tsk);
108108 void switch_task_namespaces(struct task_struct *tsk, struct nsproxy *new);
109109 int exec_task_namespaces(void);
include/linux/pid_namespace.h+2−2
@@ -78,7 +78,7 @@ static inline int pidns_memfd_noexec_scope(struct pid_namespace *ns) · 77 unmodified lines
7878 }
7979 #endif
8080
81−extern struct pid_namespace *copy_pid_ns(unsigned long flags,
81+extern struct pid_namespace *copy_pid_ns(u64 flags,
8282 struct user_namespace *user_ns, struct pid_namespace *ns);
8383 extern void zap_pid_ns_processes(struct pid_namespace *pid_ns);
8484 extern int reboot_pid_ns(struct pid_namespace *pid_ns, int cmd);
@@ -97,7 +97,7 @@ static inline int pidns_memfd_noexec_scope(struct pid_namespace *ns) · 12 unmodified lines
9797 return 0;
9898 }
9999
100−static inline struct pid_namespace *copy_pid_ns(unsigned long flags,
100+static inline struct pid_namespace *copy_pid_ns(u64 flags,
101101 struct user_namespace *user_ns, struct pid_namespace *ns)
102102 {
103103 if (flags & CLONE_NEWPID)
include/linux/rseq.h+2−2
@@ -65,7 +65,7 @@ static inline void rseq_migrate(struct task_struct *t) · 64 unmodified lines
6565 * If parent process has a registered restartable sequences area, the
6666 * child inherits. Unregister rseq for a clone with CLONE_VM set.
6767 */
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)
6969 {
7070 if (clone_flags & CLONE_VM) {
7171 t->rseq = NULL;
@@ -107,7 +107,7 @@ static inline void rseq_preempt(struct task_struct *t) · 35 unmodified lines
107107 static inline void rseq_migrate(struct task_struct *t)
108108 {
109109 }
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)
111111 {
112112 }
113113 static inline void rseq_execve(struct task_struct *t)
include/linux/sched/task.h+1−1
@@ -63,7 +63,7 @@ extern int lockdep_tasklist_lock_is_held(void); · 62 unmodified lines
6363 extern asmlinkage void schedule_tail(struct task_struct *prev);
6464 extern void init_idle(struct task_struct *idle, int cpu);
6565
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);
6767 extern int sched_cgroup_fork(struct task_struct *p, struct kernel_clone_args *kargs);
6868 extern void sched_cancel_fork(struct task_struct *p);
6969 extern void sched_post_fork(struct task_struct *p);
include/linux/security.h+2−2
@@ -489,7 +489,7 @@ int security_file_receive(struct file *file); · 488 unmodified lines
489489 int security_file_open(struct file *file);
490490 int security_file_post_open(struct file *file, int mask);
491491 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);
493493 void security_task_free(struct task_struct *task);
494494 int security_cred_alloc_blank(struct cred *cred, gfp_t gfp);
495495 void security_cred_free(struct cred *cred);
@@ -1215,7 +1215,7 @@ static inline int security_file_truncate(struct file *file) · 719 unmodified lines
12151215 }
12161216
12171217 static inline int security_task_alloc(struct task_struct *task,
1218− unsigned long clone_flags)
1218+ u64 clone_flags)
12191219 {
12201220 return 0;
12211221 }
include/linux/sem.h+2−2
@@ -9,12 +9,12 @@ struct task_struct; · 8 unmodified lines
99
1010 #ifdef CONFIG_SYSVIPC
1111
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);
1313 extern void exit_sem(struct task_struct *tsk);
1414
1515 #else
1616
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)
1818 {
1919 return 0;
2020 }
include/linux/time_namespace.h+2−2
@@ -43,7 +43,7 @@ static inline struct time_namespace *get_time_ns(struct time_namespace *ns) · 42 unmodified lines
4343 return ns;
4444 }
4545
46−struct time_namespace *copy_time_ns(unsigned long flags,
46+struct time_namespace *copy_time_ns(u64 flags,
4747 struct user_namespace *user_ns,
4848 struct time_namespace *old_ns);
4949 void free_time_ns(struct time_namespace *ns);
@@ -129,7 +129,7 @@ static inline void put_time_ns(struct time_namespace *ns) · 79 unmodified lines
129129 }
130130
131131 static inline
132−struct time_namespace *copy_time_ns(unsigned long flags,
132+struct time_namespace *copy_time_ns(u64 flags,
133133 struct user_namespace *user_ns,
134134 struct time_namespace *old_ns)
135135 {
include/linux/uprobes.h+2−2
@@ -205,7 +205,7 @@ extern void uprobe_start_dup_mmap(void); · 204 unmodified lines
205205 extern void uprobe_end_dup_mmap(void);
206206 extern void uprobe_dup_mmap(struct mm_struct *oldmm, struct mm_struct *newmm);
207207 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);
209209 extern int uprobe_post_sstep_notifier(struct pt_regs *regs);
210210 extern int uprobe_pre_sstep_notifier(struct pt_regs *regs);
211211 extern void uprobe_notify_resume(struct pt_regs *regs);
@@ -281,7 +281,7 @@ static inline bool uprobe_deny_signal(void) · 69 unmodified lines
281281 static inline void uprobe_free_utask(struct task_struct *t)
282282 {
283283 }
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)
285285 {
286286 }
287287 static inline void uprobe_clear_state(struct mm_struct *mm)
include/linux/user_events.h+2−2
@@ -33,7 +33,7 @@ extern void user_event_mm_dup(struct task_struct *t, · 32 unmodified lines
3333 extern void user_event_mm_remove(struct task_struct *t);
3434
3535 static inline void user_events_fork(struct task_struct *t,
36− unsigned long clone_flags)
36+ u64 clone_flags)
3737 {
3838 struct user_event_mm *old_mm;
3939
@@ -68,7 +68,7 @@ static inline void user_events_exit(struct task_struct *t) · 28 unmodified lines
6868 }
6969 #else
7070 static inline void user_events_fork(struct task_struct *t,
71− unsigned long clone_flags)
71+ u64 clone_flags)
7272 {
7373 }
7474
include/linux/utsname.h+2−2
@@ -35,7 +35,7 @@ static inline void get_uts_ns(struct uts_namespace *ns) · 34 unmodified lines
3535 refcount_inc(&ns->ns.count);
3636 }
3737
38−extern struct uts_namespace *copy_utsname(unsigned long flags,
38+extern struct uts_namespace *copy_utsname(u64 flags,
3939 struct user_namespace *user_ns, struct uts_namespace *old_ns);
4040 extern void free_uts_ns(struct uts_namespace *ns);
4141
@@ -55,7 +55,7 @@ static inline void put_uts_ns(struct uts_namespace *ns) · 13 unmodified lines
5555 {
5656 }
5757
58−static inline struct uts_namespace *copy_utsname(unsigned long flags,
58+static inline struct uts_namespace *copy_utsname(u64 flags,
5959 struct user_namespace *user_ns, struct uts_namespace *old_ns)
6060 {
6161 if (flags & CLONE_NEWUTS)
include/net/net_namespace.h+2−2
@@ -204,7 +204,7 @@ struct net { · 203 unmodified lines
204204 extern struct net init_net;
205205
206206 #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,
208208 struct net *old_net);
209209
210210 void net_ns_get_ownership(const struct net *net, kuid_t *uid, kgid_t *gid);
@@ -218,7 +218,7 @@ extern struct task_struct *cleanup_net_task; · 7 unmodified lines
218218 #else /* CONFIG_NET_NS */
219219 #include <linux/sched.h>
220220 #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,
222222 struct user_namespace *user_ns, struct net *old_net)
223223 {
224224 if (flags & CLONE_NEWNET)
include/trace/events/task.h+3−3
@@ -8,14 +8,14 @@ · 7 unmodified lines
88
99 TRACE_EVENT(task_newtask,
1010
11− TP_PROTO(struct task_struct *task, unsigned long clone_flags),
11+ TP_PROTO(struct task_struct *task, u64 clone_flags),
1212
1313 TP_ARGS(task, clone_flags),
1414
1515 TP_STRUCT__entry(
1616 __field( pid_t, pid)
1717 __array( char, comm, TASK_COMM_LEN)
18− __field( unsigned long, clone_flags)
18+ __field( u64, clone_flags)
1919 __field( short, oom_score_adj)
2020 ),
2121
@@ -26,7 +26,7 @@ TRACE_EVENT(task_newtask, · 4 unmodified lines
2626 __entry->oom_score_adj = task->signal->oom_score_adj;
2727 ),
2828
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",
3030 __entry->pid, __entry->comm,
3131 __entry->clone_flags, __entry->oom_score_adj)
3232 );
ipc/namespace.c+1−1
@@ -106,7 +106,7 @@ fail: · 105 unmodified lines
106106 return ERR_PTR(err);
107107 }
108108
109−struct ipc_namespace *copy_ipcs(unsigned long flags,
109+struct ipc_namespace *copy_ipcs(u64 flags,
110110 struct user_namespace *user_ns, struct ipc_namespace *ns)
111111 {
112112 if (!(flags & CLONE_NEWIPC))
ipc/sem.c+1−1
@@ -2303,7 +2303,7 @@ SYSCALL_DEFINE3(semop, int, semid, struct sembuf __user *, tsops, · 2302 unmodified lines
23032303 * parent and child tasks.
23042304 */
23052305
2306−int copy_semundo(unsigned long clone_flags, struct task_struct *tsk)
2306+int copy_semundo(u64 clone_flags, struct task_struct *tsk)
23072307 {
23082308 struct sem_undo_list *undo_list;
23092309 int error;
kernel/cgroup/namespace.c+1−1
@@ -47,7 +47,7 @@ void free_cgroup_ns(struct cgroup_namespace *ns) · 46 unmodified lines
4747 }
4848 EXPORT_SYMBOL(free_cgroup_ns);
4949
50−struct cgroup_namespace *copy_cgroup_ns(unsigned long flags,
50+struct cgroup_namespace *copy_cgroup_ns(u64 flags,
5151 struct user_namespace *user_ns,
5252 struct cgroup_namespace *old_ns)
5353 {
kernel/cred.c+1−1
@@ -287,7 +287,7 @@ struct cred *prepare_exec_creds(void) · 286 unmodified lines
287287 * The new process gets the current process's subjective credentials as its
288288 * objective and subjective credentials
289289 */
290−int copy_creds(struct task_struct *p, unsigned long clone_flags)
290+int copy_creds(struct task_struct *p, u64 clone_flags)
291291 {
292292 struct cred *new;
293293 int ret;
kernel/events/uprobes.c+1−1
@@ -2160,7 +2160,7 @@ static void dup_xol_work(struct callback_head *work) · 2159 unmodified lines
21602160 /*
21612161 * Called in context of a new clone/fork from copy_process.
21622162 */
2163−void uprobe_copy_process(struct task_struct *t, unsigned long flags)
2163+void uprobe_copy_process(struct task_struct *t, u64 flags)
21642164 {
21652165 struct uprobe_task *utask = current->utask;
21662166 struct mm_struct *mm = current->mm;
kernel/fork.c+4−4
@@ -1507,7 +1507,7 @@ fail_nomem: · 1506 unmodified lines
15071507 return NULL;
15081508 }
15091509
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)
15111511 {
15121512 struct mm_struct *mm, *oldmm;
15131513
@@ -1545,7 +1545,7 @@ static int copy_mm(unsigned long clone_flags, struct task_struct *tsk) · 31 unmodified lines
15451545 return 0;
15461546 }
15471547
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)
15491549 {
15501550 struct fs_struct *fs = current->fs;
15511551 if (clone_flags & CLONE_FS) {
@@ -1566,7 +1566,7 @@ static int copy_fs(unsigned long clone_flags, struct task_struct *tsk) · 14 unmodified lines
15661566 return 0;
15671567 }
15681568
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,
15701570 int no_files)
15711571 {
15721572 struct files_struct *oldf, *newf;
@@ -1645,7 +1645,7 @@ static void posix_cpu_timers_init_group(struct signal_struct *sig) · 72 unmodified lines
16451645 posix_cputimers_group_init(pct, cpu_limit);
16461646 }
16471647
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)
16491649 {
16501650 struct signal_struct *sig;
16511651
kernel/nsproxy.c+2−2
@@ -64,7 +64,7 @@ static inline struct nsproxy *create_nsproxy(void) · 63 unmodified lines
6464 * Return the newly created nsproxy. Do not attach this to the task,
6565 * leave it to the caller to do proper locking and attach it to task.
6666 */
67−static struct nsproxy *create_new_namespaces(unsigned long flags,
67+static struct nsproxy *create_new_namespaces(u64 flags,
6868 struct task_struct *tsk, struct user_namespace *user_ns,
6969 struct fs_struct *new_fs)
7070 {
@@ -144,7 +144,7 @@ out_ns: · 73 unmodified lines
144144 * called from clone. This now handles copy for nsproxy and all
145145 * namespaces therein.
146146 */
147−int copy_namespaces(unsigned long flags, struct task_struct *tsk)
147+int copy_namespaces(u64 flags, struct task_struct *tsk)
148148 {
149149 struct nsproxy *old_ns = tsk->nsproxy;
150150 struct user_namespace *user_ns = task_cred_xxx(tsk, user_ns);
kernel/pid_namespace.c+1−1
@@ -171,7 +171,7 @@ static void destroy_pid_namespace_work(struct work_struct *work) · 170 unmodified lines
171171 } while (ns != &init_pid_ns && refcount_dec_and_test(&ns->ns.count));
172172 }
173173
174−struct pid_namespace *copy_pid_ns(unsigned long flags,
174+struct pid_namespace *copy_pid_ns(u64 flags,
175175 struct user_namespace *user_ns, struct pid_namespace *old_ns)
176176 {
177177 if (!(flags & CLONE_NEWPID))
kernel/sched/core.c+2−2
@@ -4472,7 +4472,7 @@ int wake_up_state(struct task_struct *p, unsigned int state) · 4471 unmodified lines
44724472 * __sched_fork() is basic setup which is also used by sched_init() to
44734473 * initialize the boot CPU's idle task.
44744474 */
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)
44764476 {
44774477 p->on_rq = 0;
44784478
@@ -4707,7 +4707,7 @@ late_initcall(sched_core_sysctl_init); · 228 unmodified lines
47074707 /*
47084708 * fork()/clone()-time setup:
47094709 */
4710−int sched_fork(unsigned long clone_flags, struct task_struct *p)
4710+int sched_fork(u64 clone_flags, struct task_struct *p)
47114711 {
47124712 __sched_fork(clone_flags, p);
47134713 /*
kernel/sched/fair.c+1−1
@@ -3542,7 +3542,7 @@ out: · 3541 unmodified lines
35423542 }
35433543 }
35443544
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)
35463546 {
35473547 int mm_users = 0;
35483548 struct mm_struct *mm = p->mm;
kernel/sched/sched.h+2−2
@@ -1935,12 +1935,12 @@ extern void sched_setnuma(struct task_struct *p, int node); · 1934 unmodified lines
19351935 extern int migrate_task_to(struct task_struct *p, int cpu);
19361936 extern int migrate_swap(struct task_struct *p, struct task_struct *t,
19371937 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);
19391939
19401940 #else /* !CONFIG_NUMA_BALANCING: */
19411941
19421942 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)
19441944 {
19451945 }
19461946
kernel/time/namespace.c+1−1
@@ -130,7 +130,7 @@ fail: · 129 unmodified lines
130130 *
131131 * Return: timens_for_children namespace or ERR_PTR.
132132 */
133−struct time_namespace *copy_time_ns(unsigned long flags,
133+struct time_namespace *copy_time_ns(u64 flags,
134134 struct user_namespace *user_ns, struct time_namespace *old_ns)
135135 {
136136 if (!(flags & CLONE_NEWTIME))
kernel/utsname.c+1−1
@@ -86,7 +86,7 @@ fail: · 85 unmodified lines
8686 * utsname of this process won't be seen by parent, and vice
8787 * versa.
8888 */
89−struct uts_namespace *copy_utsname(unsigned long flags,
89+struct uts_namespace *copy_utsname(u64 flags,
9090 struct user_namespace *user_ns, struct uts_namespace *old_ns)
9191 {
9292 struct uts_namespace *new_ns;
net/core/net_namespace.c+1−1
@@ -539,7 +539,7 @@ void net_drop_ns(void *p) · 538 unmodified lines
539539 net_passive_dec(net);
540540 }
541541
542−struct net *copy_net_ns(unsigned long flags,
542+struct net *copy_net_ns(u64 flags,
543543 struct user_namespace *user_ns, struct net *old_net)
544544 {
545545 struct ucounts *ucounts;
security/apparmor/lsm.c+1−1
@@ -112,7 +112,7 @@ static void apparmor_task_free(struct task_struct *task) · 111 unmodified lines
112112 }
113113
114114 static int apparmor_task_alloc(struct task_struct *task,
115− unsigned long clone_flags)
115+ u64 clone_flags)
116116 {
117117 struct aa_task_ctx *new = task_ctx(task);
118118
security/security.c+1−1
@@ -3185,7 +3185,7 @@ int security_file_truncate(struct file *file) · 3184 unmodified lines
31853185 *
31863186 * Return: Returns a zero on success, negative values on failure.
31873187 */
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)
31893189 {
31903190 int rc = lsm_task_alloc(task);
31913191
security/selinux/hooks.c+1−1
@@ -4144,7 +4144,7 @@ static int selinux_file_open(struct file *file) · 4143 unmodified lines
41444144 /* task security operations */
41454145
41464146 static int selinux_task_alloc(struct task_struct *task,
4147− unsigned long clone_flags)
4147+ u64 clone_flags)
41484148 {
41494149 u32 sid = current_sid();
41504150
security/tomoyo/tomoyo.c+1−1
@@ -514,7 +514,7 @@ struct lsm_blob_sizes tomoyo_blob_sizes __ro_after_init = { · 513 unmodified lines
514514 * Returns 0.
515515 */
516516 static int tomoyo_task_alloc(struct task_struct *task,
517− unsigned long clone_flags)
517+ u64 clone_flags)
518518 {
519519 struct tomoyo_task *old = tomoyo_task(current);
520520 struct tomoyo_task *new = tomoyo_task(task);