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

Merge tag 'kernel-6.18-rc1.clone3' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs

Pull copy_process updates from Christian Brauner:
"This contains the changes to enable support for clone3() on nios2
which apparently is still a thing.

The more exciting part of this is that it cleans up the inconsistency
in how the 64-bit flag argument is passed from copy_process() into the
various other copy_*() helpers"

[ Fixed up rv ltl_monitor 32-bit support as per Sasha Levin in the merge ]

* tag 'kernel-6.18-rc1.clone3' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs:
nios2: implement architecture-specific portion of sys_clone3
arch: copy_thread: pass clone_flags as u64
copy_process: pass clone_flags as u64 across calltree
copy_sighand: Handle architectures where sizeof(unsigned long) < sizeof(u64)

+96 -90
+1 -1
arch/alpha/kernel/process.c
··· 231 231 */ 232 232 int copy_thread(struct task_struct *p, const struct kernel_clone_args *args) 233 233 { 234 - unsigned long clone_flags = args->flags; 234 + u64 clone_flags = args->flags; 235 235 unsigned long usp = args->stack; 236 236 unsigned long tls = args->tls; 237 237 extern void ret_from_fork(void);
+1 -1
arch/arc/kernel/process.c
··· 166 166 */ 167 167 int copy_thread(struct task_struct *p, const struct kernel_clone_args *args) 168 168 { 169 - unsigned long clone_flags = args->flags; 169 + u64 clone_flags = args->flags; 170 170 unsigned long usp = args->stack; 171 171 unsigned long tls = args->tls; 172 172 struct pt_regs *c_regs; /* child's pt_regs */
+1 -1
arch/arm/kernel/process.c
··· 234 234 235 235 int copy_thread(struct task_struct *p, const struct kernel_clone_args *args) 236 236 { 237 - unsigned long clone_flags = args->flags; 237 + u64 clone_flags = args->flags; 238 238 unsigned long stack_start = args->stack; 239 239 unsigned long tls = args->tls; 240 240 struct thread_info *thread = task_thread_info(p);
+1 -1
arch/arm64/kernel/process.c
··· 409 409 410 410 int copy_thread(struct task_struct *p, const struct kernel_clone_args *args) 411 411 { 412 - unsigned long clone_flags = args->flags; 412 + u64 clone_flags = args->flags; 413 413 unsigned long stack_start = args->stack; 414 414 unsigned long tls = args->tls; 415 415 struct pt_regs *childregs = task_pt_regs(p);
+1 -1
arch/csky/kernel/process.c
··· 32 32 33 33 int copy_thread(struct task_struct *p, const struct kernel_clone_args *args) 34 34 { 35 - unsigned long clone_flags = args->flags; 35 + u64 clone_flags = args->flags; 36 36 unsigned long usp = args->stack; 37 37 unsigned long tls = args->tls; 38 38 struct switch_stack *childstack;
+1 -1
arch/hexagon/kernel/process.c
··· 52 52 */ 53 53 int copy_thread(struct task_struct *p, const struct kernel_clone_args *args) 54 54 { 55 - unsigned long clone_flags = args->flags; 55 + u64 clone_flags = args->flags; 56 56 unsigned long usp = args->stack; 57 57 unsigned long tls = args->tls; 58 58 struct thread_info *ti = task_thread_info(p);
+1 -1
arch/loongarch/kernel/process.c
··· 167 167 unsigned long childksp; 168 168 unsigned long tls = args->tls; 169 169 unsigned long usp = args->stack; 170 - unsigned long clone_flags = args->flags; 170 + u64 clone_flags = args->flags; 171 171 struct pt_regs *childregs, *regs = current_pt_regs(); 172 172 173 173 childksp = (unsigned long)task_stack_page(p) + THREAD_SIZE;
+1 -1
arch/m68k/kernel/process.c
··· 141 141 142 142 int copy_thread(struct task_struct *p, const struct kernel_clone_args *args) 143 143 { 144 - unsigned long clone_flags = args->flags; 144 + u64 clone_flags = args->flags; 145 145 unsigned long usp = args->stack; 146 146 unsigned long tls = args->tls; 147 147 struct fork_frame {
+1 -1
arch/microblaze/kernel/process.c
··· 54 54 55 55 int copy_thread(struct task_struct *p, const struct kernel_clone_args *args) 56 56 { 57 - unsigned long clone_flags = args->flags; 57 + u64 clone_flags = args->flags; 58 58 unsigned long usp = args->stack; 59 59 unsigned long tls = args->tls; 60 60 struct pt_regs *childregs = task_pt_regs(p);
+1 -1
arch/mips/kernel/process.c
··· 107 107 */ 108 108 int copy_thread(struct task_struct *p, const struct kernel_clone_args *args) 109 109 { 110 - unsigned long clone_flags = args->flags; 110 + u64 clone_flags = args->flags; 111 111 unsigned long usp = args->stack; 112 112 unsigned long tls = args->tls; 113 113 struct thread_info *ti = task_thread_info(p);
+1
arch/nios2/include/asm/syscalls.h
··· 7 7 8 8 int sys_cacheflush(unsigned long addr, unsigned long len, 9 9 unsigned int op); 10 + asmlinkage long __sys_clone3(struct clone_args __user *uargs, size_t size); 10 11 11 12 #include <asm-generic/syscalls.h> 12 13
-2
arch/nios2/include/asm/unistd.h
··· 7 7 #define __ARCH_WANT_STAT64 8 8 #define __ARCH_WANT_SET_GET_RLIMIT 9 9 10 - #define __ARCH_BROKEN_SYS_CLONE3 11 - 12 10 #endif
+6
arch/nios2/kernel/entry.S
··· 403 403 addi sp, sp, 4 404 404 RESTORE_SWITCH_STACK 405 405 ret 406 + /* long syscall(SYS_clone3, struct clone_args *cl_args, size_t size); */ 407 + ENTRY(__sys_clone3) 408 + SAVE_SWITCH_STACK 409 + call sys_clone3 410 + RESTORE_SWITCH_STACK 411 + ret 406 412 407 413 ENTRY(sys_rt_sigreturn) 408 414 SAVE_SWITCH_STACK
+1 -1
arch/nios2/kernel/process.c
··· 101 101 102 102 int copy_thread(struct task_struct *p, const struct kernel_clone_args *args) 103 103 { 104 - unsigned long clone_flags = args->flags; 104 + u64 clone_flags = args->flags; 105 105 unsigned long usp = args->stack; 106 106 unsigned long tls = args->tls; 107 107 struct pt_regs *childregs = task_pt_regs(p);
+1
arch/nios2/kernel/syscall_table.c
··· 13 13 #define __SYSCALL_WITH_COMPAT(nr, native, compat) __SYSCALL(nr, native) 14 14 15 15 #define sys_mmap2 sys_mmap_pgoff 16 + #define sys_clone3 __sys_clone3 16 17 17 18 void *sys_call_table[__NR_syscalls] = { 18 19 [0 ... __NR_syscalls-1] = sys_ni_syscall,
+1 -1
arch/openrisc/kernel/process.c
··· 165 165 int 166 166 copy_thread(struct task_struct *p, const struct kernel_clone_args *args) 167 167 { 168 - unsigned long clone_flags = args->flags; 168 + u64 clone_flags = args->flags; 169 169 unsigned long usp = args->stack; 170 170 unsigned long tls = args->tls; 171 171 struct pt_regs *userregs;
+1 -1
arch/parisc/kernel/process.c
··· 201 201 int 202 202 copy_thread(struct task_struct *p, const struct kernel_clone_args *args) 203 203 { 204 - unsigned long clone_flags = args->flags; 204 + u64 clone_flags = args->flags; 205 205 unsigned long usp = args->stack; 206 206 unsigned long tls = args->tls; 207 207 struct pt_regs *cregs = &(p->thread.regs);
+1 -1
arch/powerpc/kernel/process.c
··· 1805 1805 f = ret_from_kernel_user_thread; 1806 1806 } else { 1807 1807 struct pt_regs *regs = current_pt_regs(); 1808 - unsigned long clone_flags = args->flags; 1808 + u64 clone_flags = args->flags; 1809 1809 unsigned long usp = args->stack; 1810 1810 1811 1811 /* Copy registers */
+1 -1
arch/riscv/kernel/process.c
··· 223 223 224 224 int copy_thread(struct task_struct *p, const struct kernel_clone_args *args) 225 225 { 226 - unsigned long clone_flags = args->flags; 226 + u64 clone_flags = args->flags; 227 227 unsigned long usp = args->stack; 228 228 unsigned long tls = args->tls; 229 229 struct pt_regs *childregs = task_pt_regs(p);
+1 -1
arch/s390/kernel/process.c
··· 106 106 107 107 int copy_thread(struct task_struct *p, const struct kernel_clone_args *args) 108 108 { 109 - unsigned long clone_flags = args->flags; 109 + u64 clone_flags = args->flags; 110 110 unsigned long new_stackp = args->stack; 111 111 unsigned long tls = args->tls; 112 112 struct fake_frame
+1 -1
arch/sh/kernel/process_32.c
··· 89 89 90 90 int copy_thread(struct task_struct *p, const struct kernel_clone_args *args) 91 91 { 92 - unsigned long clone_flags = args->flags; 92 + u64 clone_flags = args->flags; 93 93 unsigned long usp = args->stack; 94 94 unsigned long tls = args->tls; 95 95 struct thread_info *ti = task_thread_info(p);
+1 -1
arch/sparc/kernel/process_32.c
··· 260 260 261 261 int copy_thread(struct task_struct *p, const struct kernel_clone_args *args) 262 262 { 263 - unsigned long clone_flags = args->flags; 263 + u64 clone_flags = args->flags; 264 264 unsigned long sp = args->stack; 265 265 unsigned long tls = args->tls; 266 266 struct thread_info *ti = task_thread_info(p);
+1 -1
arch/sparc/kernel/process_64.c
··· 567 567 */ 568 568 int copy_thread(struct task_struct *p, const struct kernel_clone_args *args) 569 569 { 570 - unsigned long clone_flags = args->flags; 570 + u64 clone_flags = args->flags; 571 571 unsigned long sp = args->stack; 572 572 unsigned long tls = args->tls; 573 573 struct thread_info *t = task_thread_info(p);
+1 -1
arch/um/kernel/process.c
··· 143 143 144 144 int copy_thread(struct task_struct * p, const struct kernel_clone_args *args) 145 145 { 146 - unsigned long clone_flags = args->flags; 146 + u64 clone_flags = args->flags; 147 147 unsigned long sp = args->stack; 148 148 unsigned long tls = args->tls; 149 149 void (*handler)(void);
+1 -1
arch/x86/include/asm/fpu/sched.h
··· 11 11 12 12 extern void save_fpregs_to_fpstate(struct fpu *fpu); 13 13 extern void fpu__drop(struct task_struct *tsk); 14 - extern int fpu_clone(struct task_struct *dst, unsigned long clone_flags, bool minimal, 14 + extern int fpu_clone(struct task_struct *dst, u64 clone_flags, bool minimal, 15 15 unsigned long shstk_addr); 16 16 extern void fpu_flush_thread(void); 17 17
+2 -2
arch/x86/include/asm/shstk.h
··· 16 16 17 17 long shstk_prctl(struct task_struct *task, int option, unsigned long arg2); 18 18 void reset_thread_features(void); 19 - unsigned long shstk_alloc_thread_stack(struct task_struct *p, unsigned long clone_flags, 19 + unsigned long shstk_alloc_thread_stack(struct task_struct *p, u64 clone_flags, 20 20 unsigned long stack_size); 21 21 void shstk_free(struct task_struct *p); 22 22 int setup_signal_shadow_stack(struct ksignal *ksig); ··· 28 28 unsigned long arg2) { return -EINVAL; } 29 29 static inline void reset_thread_features(void) {} 30 30 static inline unsigned long shstk_alloc_thread_stack(struct task_struct *p, 31 - unsigned long clone_flags, 31 + u64 clone_flags, 32 32 unsigned long stack_size) { return 0; } 33 33 static inline void shstk_free(struct task_struct *p) {} 34 34 static inline int setup_signal_shadow_stack(struct ksignal *ksig) { return 0; }
+1 -1
arch/x86/kernel/fpu/core.c
··· 631 631 } 632 632 633 633 /* Clone current's FPU state on fork */ 634 - int fpu_clone(struct task_struct *dst, unsigned long clone_flags, bool minimal, 634 + int fpu_clone(struct task_struct *dst, u64 clone_flags, bool minimal, 635 635 unsigned long ssp) 636 636 { 637 637 /*
+1 -1
arch/x86/kernel/process.c
··· 159 159 160 160 int copy_thread(struct task_struct *p, const struct kernel_clone_args *args) 161 161 { 162 - unsigned long clone_flags = args->flags; 162 + u64 clone_flags = args->flags; 163 163 unsigned long sp = args->stack; 164 164 unsigned long tls = args->tls; 165 165 struct inactive_task_frame *frame;
+1 -1
arch/x86/kernel/shstk.c
··· 191 191 current->thread.features_locked = 0; 192 192 } 193 193 194 - unsigned long shstk_alloc_thread_stack(struct task_struct *tsk, unsigned long clone_flags, 194 + unsigned long shstk_alloc_thread_stack(struct task_struct *tsk, u64 clone_flags, 195 195 unsigned long stack_size) 196 196 { 197 197 struct thread_shstk *shstk = &tsk->thread.shstk;
+1 -1
arch/xtensa/kernel/process.c
··· 267 267 268 268 int copy_thread(struct task_struct *p, const struct kernel_clone_args *args) 269 269 { 270 - unsigned long clone_flags = args->flags; 270 + u64 clone_flags = args->flags; 271 271 unsigned long usp_thread_fn = args->stack; 272 272 unsigned long tls = args->tls; 273 273 struct pt_regs *childregs = task_pt_regs(p);
+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
··· 4214 4214 } 4215 4215 4216 4216 __latent_entropy 4217 - struct mnt_namespace *copy_mnt_ns(unsigned long flags, struct mnt_namespace *ns, 4217 + struct mnt_namespace *copy_mnt_ns(u64 flags, struct mnt_namespace *ns, 4218 4218 struct user_namespace *user_ns, struct fs_struct *new_fs) 4219 4219 { 4220 4220 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); ··· 100 100 return 0; 101 101 } 102 102 103 - static inline struct pid_namespace *copy_pid_ns(unsigned long flags, 103 + static inline struct pid_namespace *copy_pid_ns(u64 flags, 104 104 struct user_namespace *user_ns, struct pid_namespace *ns) 105 105 { 106 106 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)
+1 -1
include/rv/ltl_monitor.h
··· 56 56 ltl_atoms_fetch(task, mon); 57 57 } 58 58 59 - static void handle_task_newtask(void *data, struct task_struct *task, unsigned long flags) 59 + static void handle_task_newtask(void *data, struct task_struct *task, u64 flags) 60 60 { 61 61 ltl_task_init(task, true); 62 62 }
+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;
+5 -5
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; ··· 1596 1596 return 0; 1597 1597 } 1598 1598 1599 - static int copy_sighand(unsigned long clone_flags, struct task_struct *tsk) 1599 + static int copy_sighand(u64 clone_flags, struct task_struct *tsk) 1600 1600 { 1601 1601 struct sighand_struct *sig; 1602 1602 ··· 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
··· 1960 1960 extern int migrate_task_to(struct task_struct *p, int cpu); 1961 1961 extern int migrate_swap(struct task_struct *p, struct task_struct *t, 1962 1962 int cpu, int scpu); 1963 - extern void init_numa_balancing(unsigned long clone_flags, struct task_struct *p); 1963 + extern void init_numa_balancing(u64 clone_flags, struct task_struct *p); 1964 1964 1965 1965 #else /* !CONFIG_NUMA_BALANCING: */ 1966 1966 1967 1967 static inline void 1968 - init_numa_balancing(unsigned long clone_flags, struct task_struct *p) 1968 + init_numa_balancing(u64 clone_flags, struct task_struct *p) 1969 1969 { 1970 1970 } 1971 1971
+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);