/kernel/linux/linux-6.6/kernel/ |
H A D | ucount.c | 11 struct ucounts init_ucounts = { 131 static struct ucounts *find_ucounts(struct user_namespace *ns, kuid_t uid, struct hlist_head *hashent) in find_ucounts() 133 struct ucounts *ucounts; in find_ucounts() local 135 hlist_for_each_entry(ucounts, hashent, node) { in find_ucounts() 136 if (uid_eq(ucounts->uid, uid) && (ucounts->ns == ns)) in find_ucounts() 137 return ucounts; in find_ucounts() 142 static void hlist_add_ucounts(struct ucounts *ucounts) in hlist_add_ucounts() argument 150 get_ucounts_or_wrap(struct ucounts *ucounts) get_ucounts_or_wrap() argument 156 get_ucounts(struct ucounts *ucounts) get_ucounts() argument 168 struct ucounts *ucounts, *new; alloc_ucounts() local 204 put_ucounts(struct ucounts *ucounts) put_ucounts() argument 233 struct ucounts *ucounts, *iter, *bad; inc_ucount() local 253 dec_ucount(struct ucounts *ucounts, enum ucount_type type) dec_ucount() argument 263 inc_rlimit_ucounts(struct ucounts *ucounts, enum rlimit_type type, long v) inc_rlimit_ucounts() argument 280 dec_rlimit_ucounts(struct ucounts *ucounts, enum rlimit_type type, long v) dec_rlimit_ucounts() argument 293 do_dec_rlimit_put_ucounts(struct ucounts *ucounts, struct ucounts *last, enum rlimit_type type) do_dec_rlimit_put_ucounts() argument 306 dec_rlimit_put_ucounts(struct ucounts *ucounts, enum rlimit_type type) dec_rlimit_put_ucounts() argument 311 inc_rlimit_get_ucounts(struct ucounts *ucounts, enum rlimit_type type) inc_rlimit_get_ucounts() argument 343 is_rlimit_overlimit(struct ucounts *ucounts, enum rlimit_type type, unsigned long rlimit) is_rlimit_overlimit() argument [all...] |
H A D | utsname.c | 20 static struct ucounts *inc_uts_namespaces(struct user_namespace *ns) in inc_uts_namespaces() 25 static void dec_uts_namespaces(struct ucounts *ucounts) in dec_uts_namespaces() argument 27 dec_ucount(ucounts, UCOUNT_UTS_NAMESPACES); in dec_uts_namespaces() 49 struct ucounts *ucounts; in clone_uts_ns() local 53 ucounts = inc_uts_namespaces(user_ns); in clone_uts_ns() 54 if (!ucounts) in clone_uts_ns() 66 ns->ucounts = ucounts; in clone_uts_ns() [all...] |
H A D | pid_namespace.c | 62 static struct ucounts *inc_pid_namespaces(struct user_namespace *ns) in inc_pid_namespaces() 67 static void dec_pid_namespaces(struct ucounts *ucounts) in dec_pid_namespaces() argument 69 dec_ucount(ucounts, UCOUNT_PID_NAMESPACES); in dec_pid_namespaces() 77 struct ucounts *ucounts; in create_pid_namespace() local 87 ucounts = inc_pid_namespaces(user_ns); in create_pid_namespace() 88 if (!ucounts) in create_pid_namespace() 111 ns->ucounts = ucounts; in create_pid_namespace() [all...] |
H A D | cred.c | 63 .ucounts = &init_ucounts, 87 if (cred->ucounts) in put_cred_rcu() 88 put_ucounts(cred->ucounts); in put_cred_rcu() 234 new->ucounts = get_ucounts(new->ucounts); in prepare_creds() 235 if (!new->ucounts) in prepare_creds() 435 inc_rlimit_ucounts(new->ucounts, UCOUNT_RLIMIT_NPROC, 1); in commit_creds() 439 dec_rlimit_ucounts(old->ucounts, UCOUNT_RLIMIT_NPROC, 1); in commit_creds() 584 struct ucounts *new_ucounts, *old_ucounts = new->ucounts; in set_cred_ucounts() [all...] |
H A D | user_namespace.c | 33 static struct ucounts *inc_user_namespaces(struct user_namespace *ns, kuid_t uid) in inc_user_namespaces() 38 static void dec_user_namespaces(struct ucounts *ucounts) in dec_user_namespaces() argument 40 return dec_ucount(ucounts, UCOUNT_USER_NAMESPACES); in dec_user_namespaces() 87 struct ucounts *ucounts; in create_user_ns() local 94 ucounts = inc_user_namespaces(parent_ns, owner); in create_user_ns() 95 if (!ucounts) in create_user_ns() 146 ns->ucounts = ucounts; in create_user_ns() 202 struct ucounts *ucounts = ns->ucounts; free_user_ns() local [all...] |
/kernel/linux/linux-5.10/kernel/ |
H A D | ucount.c | 117 static struct ucounts *find_ucounts(struct user_namespace *ns, kuid_t uid, struct hlist_head *hashent) in find_ucounts() 119 struct ucounts *ucounts; in find_ucounts() local 121 hlist_for_each_entry(ucounts, hashent, node) { in find_ucounts() 122 if (uid_eq(ucounts->uid, uid) && (ucounts->ns == ns)) in find_ucounts() 123 return ucounts; in find_ucounts() 128 static struct ucounts *get_ucounts(struct user_namespace *ns, kuid_t uid) in get_ucounts() 131 struct ucounts *ucounts, *ne in get_ucounts() local 163 put_ucounts(struct ucounts *ucounts) put_ucounts() argument 195 struct ucounts *ucounts, *iter, *bad; inc_ucount() local 215 dec_ucount(struct ucounts *ucounts, enum ucount_type type) dec_ucount() argument [all...] |
H A D | utsname.c | 20 static struct ucounts *inc_uts_namespaces(struct user_namespace *ns) in inc_uts_namespaces() 25 static void dec_uts_namespaces(struct ucounts *ucounts) in dec_uts_namespaces() argument 27 dec_ucount(ucounts, UCOUNT_UTS_NAMESPACES); in dec_uts_namespaces() 49 struct ucounts *ucounts; in clone_uts_ns() local 53 ucounts = inc_uts_namespaces(user_ns); in clone_uts_ns() 54 if (!ucounts) in clone_uts_ns() 66 ns->ucounts = ucounts; in clone_uts_ns() [all...] |
H A D | pid_namespace.c | 61 static struct ucounts *inc_pid_namespaces(struct user_namespace *ns) in inc_pid_namespaces() 66 static void dec_pid_namespaces(struct ucounts *ucounts) in dec_pid_namespaces() argument 68 dec_ucount(ucounts, UCOUNT_PID_NAMESPACES); in dec_pid_namespaces() 76 struct ucounts *ucounts; in create_pid_namespace() local 86 ucounts = inc_pid_namespaces(user_ns); in create_pid_namespace() 87 if (!ucounts) in create_pid_namespace() 110 ns->ucounts = ucounts; in create_pid_namespace() [all...] |
H A D | user_namespace.c | 32 static struct ucounts *inc_user_namespaces(struct user_namespace *ns, kuid_t uid) in inc_user_namespaces() 37 static void dec_user_namespaces(struct ucounts *ucounts) in dec_user_namespaces() argument 39 return dec_ucount(ucounts, UCOUNT_USER_NAMESPACES); in dec_user_namespaces() 74 struct ucounts *ucounts; in create_user_ns() local 81 ucounts = inc_user_namespaces(parent_ns, owner); in create_user_ns() 82 if (!ucounts) in create_user_ns() 125 ns->ucounts = ucounts; in create_user_ns() 181 struct ucounts *ucounts = ns->ucounts; free_user_ns() local [all...] |
/kernel/linux/linux-6.6/include/linux/ |
H A D | user_namespace.h | 38 struct ucounts; 102 struct ucounts *ucounts; member 107 struct ucounts { struct 117 extern struct ucounts init_ucounts; 121 struct ucounts *inc_ucount(struct user_namespace *ns, kuid_t uid, enum ucount_type type); 122 void dec_ucount(struct ucounts *ucounts, enum ucount_type type); 123 struct ucounts *alloc_ucounts(struct user_namespace *ns, kuid_t uid); 124 struct ucounts * __must_chec 127 get_rlimit_value(struct ucounts *ucounts, enum rlimit_type type) get_rlimit_value() argument [all...] |
H A D | signal_types.h | 16 struct ucounts; 26 struct ucounts *ucounts; member
|
H A D | cred.h | 139 struct ucounts *ucounts; member 323 #define task_ucounts(task) (task_cred_xxx((task), ucounts)) 340 #define current_ucounts() (current_cred_xxx(ucounts))
|
H A D | utsname.h | 27 struct ucounts *ucounts; member
|
/kernel/linux/linux-5.10/fs/notify/inotify/ |
H A D | inotify.h | 48 static inline void dec_inotify_instances(struct ucounts *ucounts) in dec_inotify_instances() argument 50 dec_ucount(ucounts, UCOUNT_INOTIFY_INSTANCES); in dec_inotify_instances() 53 static inline struct ucounts *inc_inotify_watches(struct ucounts *ucounts) in inc_inotify_watches() argument 55 return inc_ucount(ucounts->ns, ucounts->uid, UCOUNT_INOTIFY_WATCHES); in inc_inotify_watches() 58 static inline void dec_inotify_watches(struct ucounts *ucounts) in dec_inotify_watches() argument [all...] |
/kernel/linux/linux-6.6/fs/notify/inotify/ |
H A D | inotify.h | 55 static inline void dec_inotify_instances(struct ucounts *ucounts) in dec_inotify_instances() argument 57 dec_ucount(ucounts, UCOUNT_INOTIFY_INSTANCES); in dec_inotify_instances() 60 static inline struct ucounts *inc_inotify_watches(struct ucounts *ucounts) in inc_inotify_watches() argument 62 return inc_ucount(ucounts->ns, ucounts->uid, UCOUNT_INOTIFY_WATCHES); in inc_inotify_watches() 65 static inline void dec_inotify_watches(struct ucounts *ucounts) in dec_inotify_watches() argument [all...] |
/kernel/linux/linux-5.10/kernel/cgroup/ |
H A D | namespace.c | 12 static struct ucounts *inc_cgroup_namespaces(struct user_namespace *ns) in inc_cgroup_namespaces() 17 static void dec_cgroup_namespaces(struct ucounts *ucounts) in dec_cgroup_namespaces() argument 19 dec_ucount(ucounts, UCOUNT_CGROUP_NAMESPACES); in dec_cgroup_namespaces() 43 dec_cgroup_namespaces(ns->ucounts); in free_cgroup_ns() 55 struct ucounts *ucounts; in copy_cgroup_ns() local 69 ucounts = inc_cgroup_namespaces(user_ns); in copy_cgroup_ns() 70 if (!ucounts) in copy_cgroup_ns() 82 dec_cgroup_namespaces(ucounts); in copy_cgroup_ns() [all...] |
/kernel/linux/linux-6.6/kernel/cgroup/ |
H A D | namespace.c | 12 static struct ucounts *inc_cgroup_namespaces(struct user_namespace *ns) in inc_cgroup_namespaces() 17 static void dec_cgroup_namespaces(struct ucounts *ucounts) in dec_cgroup_namespaces() argument 19 dec_ucount(ucounts, UCOUNT_CGROUP_NAMESPACES); in dec_cgroup_namespaces() 43 dec_cgroup_namespaces(ns->ucounts); in free_cgroup_ns() 55 struct ucounts *ucounts; in copy_cgroup_ns() local 69 ucounts = inc_cgroup_namespaces(user_ns); in copy_cgroup_ns() 70 if (!ucounts) in copy_cgroup_ns() 82 dec_cgroup_namespaces(ucounts); in copy_cgroup_ns() [all...] |
/kernel/linux/linux-5.10/ipc/ |
H A D | namespace.c | 22 static struct ucounts *inc_ipc_namespaces(struct user_namespace *ns) in inc_ipc_namespaces() 27 static void dec_ipc_namespaces(struct ucounts *ucounts) in dec_ipc_namespaces() argument 29 dec_ucount(ucounts, UCOUNT_IPC_NAMESPACES); in dec_ipc_namespaces() 36 struct ucounts *ucounts; in create_ipc_ns() local 40 ucounts = inc_ipc_namespaces(user_ns); in create_ipc_ns() 41 if (!ucounts) in create_ipc_ns() 56 ns->ucounts = ucounts; in create_ipc_ns() [all...] |
/kernel/linux/linux-6.6/ipc/ |
H A D | namespace.c | 28 static struct ucounts *inc_ipc_namespaces(struct user_namespace *ns) in inc_ipc_namespaces() 33 static void dec_ipc_namespaces(struct ucounts *ucounts) in dec_ipc_namespaces() argument 35 dec_ucount(ucounts, UCOUNT_IPC_NAMESPACES); in dec_ipc_namespaces() 42 struct ucounts *ucounts; in create_ipc_ns() local 47 ucounts = inc_ipc_namespaces(user_ns); in create_ipc_ns() 48 if (!ucounts) { in create_ipc_ns() 71 ns->ucounts = ucounts; in create_ipc_ns() [all...] |
/kernel/linux/linux-5.10/include/linux/ |
H A D | user_namespace.h | 38 struct ucounts; 91 struct ucounts *ucounts; member 95 struct ucounts { struct 107 struct ucounts *inc_ucount(struct user_namespace *ns, kuid_t uid, enum ucount_type type); 108 void dec_ucount(struct ucounts *ucounts, enum ucount_type type);
|
H A D | utsname.h | 28 struct ucounts *ucounts; member
|
H A D | pid_namespace.h | 33 struct ucounts *ucounts; member
|
/kernel/linux/linux-5.10/kernel/time/ |
H A D | namespace.c | 59 static struct ucounts *inc_time_namespaces(struct user_namespace *ns) in inc_time_namespaces() 64 static void dec_time_namespaces(struct ucounts *ucounts) in dec_time_namespaces() argument 66 dec_ucount(ucounts, UCOUNT_TIME_NAMESPACES); in dec_time_namespaces() 82 struct ucounts *ucounts; in clone_time_ns() local 86 ucounts = inc_time_namespaces(user_ns); in clone_time_ns() 87 if (!ucounts) in clone_time_ns() 105 ns->ucounts = ucounts; in clone_time_ns() [all...] |
/kernel/linux/linux-6.6/kernel/time/ |
H A D | namespace.c | 59 static struct ucounts *inc_time_namespaces(struct user_namespace *ns) in inc_time_namespaces() 64 static void dec_time_namespaces(struct ucounts *ucounts) in dec_time_namespaces() argument 66 dec_ucount(ucounts, UCOUNT_TIME_NAMESPACES); in dec_time_namespaces() 82 struct ucounts *ucounts; in clone_time_ns() local 86 ucounts = inc_time_namespaces(user_ns); in clone_time_ns() 87 if (!ucounts) in clone_time_ns() 105 ns->ucounts = ucounts; in clone_time_ns() [all...] |
/kernel/linux/linux-6.6/mm/ |
H A D | mlock.c | 751 int user_shm_lock(size_t size, struct ucounts *ucounts) in user_shm_lock() argument 762 memlock = inc_rlimit_ucounts(ucounts, UCOUNT_RLIMIT_MEMLOCK, locked); in user_shm_lock() 765 dec_rlimit_ucounts(ucounts, UCOUNT_RLIMIT_MEMLOCK, locked); in user_shm_lock() 768 if (!get_ucounts(ucounts)) { in user_shm_lock() 769 dec_rlimit_ucounts(ucounts, UCOUNT_RLIMIT_MEMLOCK, locked); in user_shm_lock() 779 void user_shm_unlock(size_t size, struct ucounts *ucounts) in user_shm_unlock() argument 782 dec_rlimit_ucounts(ucounts, UCOUNT_RLIMIT_MEMLOCK, (size + PAGE_SIZE - 1) >> PAGE_SHIFT); in user_shm_unlock() 784 put_ucounts(ucounts); in user_shm_unlock() [all...] |