Lines Matching +full:6 +full:ns
15 #define ucounts_hashfn(ns, uid) \ argument
16 hash_long((unsigned long)__kuid_val(uid) + (unsigned long)(ns), \
18 #define ucounts_hashentry(ns, uid) \ argument
19 (ucounts_hashtable + ucounts_hashfn(ns, uid))
43 mode = (table->mode & S_IRWXU) >> 6; in set_permissions()
47 return (mode << 6) | (mode << 3) | mode; in set_permissions()
81 bool setup_userns_sysctls(struct user_namespace *ns) in setup_userns_sysctls() argument
87 setup_sysctl_set(&ns->set, &set_root, set_is_seen); in setup_userns_sysctls()
92 tbl[i].data = &ns->ucount_max[i]; in setup_userns_sysctls()
94 ns->sysctls = __register_sysctl_table(&ns->set, "user", tbl); in setup_userns_sysctls()
96 if (!ns->sysctls) { in setup_userns_sysctls()
98 retire_sysctl_set(&ns->set); in setup_userns_sysctls()
105 void retire_userns_sysctls(struct user_namespace *ns) in retire_userns_sysctls() argument
110 tbl = ns->sysctls->ctl_table_arg; in retire_userns_sysctls()
111 unregister_sysctl_table(ns->sysctls); in retire_userns_sysctls()
112 retire_sysctl_set(&ns->set); in retire_userns_sysctls()
117 static struct ucounts *find_ucounts(struct user_namespace *ns, kuid_t uid, struct hlist_head *hashe… in find_ucounts() argument
122 if (uid_eq(ucounts->uid, uid) && (ucounts->ns == ns)) in find_ucounts()
128 static struct ucounts *get_ucounts(struct user_namespace *ns, kuid_t uid) in get_ucounts() argument
130 struct hlist_head *hashent = ucounts_hashentry(ns, uid); in get_ucounts()
134 ucounts = find_ucounts(ns, uid, hashent); in get_ucounts()
142 new->ns = ns; in get_ucounts()
147 ucounts = find_ucounts(ns, uid, hashent); in get_ucounts()
192 struct ucounts *inc_ucount(struct user_namespace *ns, kuid_t uid, in inc_ucount() argument
197 ucounts = get_ucounts(ns, uid); in inc_ucount()
200 tns = iter->ns; in inc_ucount()
208 for (iter = ucounts; iter != bad; iter = iter->ns->ucounts) in inc_ucount()
218 for (iter = ucounts; iter; iter = iter->ns->ucounts) { in dec_ucount()