Lines Matching full:ns
82 struct ns_common ns; member
84 /* parent_could_setfcap: true if the creator if this ns had CAP_SETFCAP
85 * in its effective capability set at the child ns creation time. */
119 struct user_namespace *ns; member
129 bool setup_userns_sysctls(struct user_namespace *ns);
130 void retire_userns_sysctls(struct user_namespace *ns);
131 struct ucounts *inc_ucount(struct user_namespace *ns, kuid_t uid, enum ucount_type type);
133 struct ucounts *alloc_ucounts(struct user_namespace *ns, kuid_t uid);
149 static inline long get_userns_rlimit_max(struct user_namespace *ns, enum rlimit_type type) in get_userns_rlimit_max() argument
151 return READ_ONCE(ns->rlimit_max[type]); in get_userns_rlimit_max()
154 static inline void set_userns_rlimit_max(struct user_namespace *ns, in set_userns_rlimit_max() argument
157 ns->rlimit_max[type] = max <= LONG_MAX ? max : LONG_MAX; in set_userns_rlimit_max()
162 static inline struct user_namespace *get_user_ns(struct user_namespace *ns) in get_user_ns() argument
164 if (ns) in get_user_ns()
165 refcount_inc(&ns->ns.count); in get_user_ns()
166 return ns; in get_user_ns()
171 extern void __put_user_ns(struct user_namespace *ns);
173 static inline void put_user_ns(struct user_namespace *ns) in put_user_ns() argument
175 if (ns && refcount_dec_and_test(&ns->ns.count)) in put_user_ns()
176 __put_user_ns(ns); in put_user_ns()
188 extern bool userns_may_setgroups(const struct user_namespace *ns);
192 struct ns_common *ns_get_owner(struct ns_common *ns);
195 static inline struct user_namespace *get_user_ns(struct user_namespace *ns) in get_user_ns() argument
213 static inline void put_user_ns(struct user_namespace *ns) in put_user_ns() argument
217 static inline bool userns_may_setgroups(const struct user_namespace *ns) in userns_may_setgroups() argument
233 static inline struct ns_common *ns_get_owner(struct ns_common *ns) in ns_get_owner() argument