Lines Matching full:ns
76 struct ns_common ns; member
78 /* parent_could_setfcap: true if the creator if this ns had CAP_SETFCAP
79 * in its effective capability set at the child ns creation time. */
109 struct user_namespace *ns; member
119 bool setup_userns_sysctls(struct user_namespace *ns);
120 void retire_userns_sysctls(struct user_namespace *ns);
121 struct ucounts *inc_ucount(struct user_namespace *ns, kuid_t uid, enum ucount_type type);
123 struct ucounts *alloc_ucounts(struct user_namespace *ns, kuid_t uid);
138 static inline long get_userns_rlimit_max(struct user_namespace *ns, enum rlimit_type type) in get_userns_rlimit_max() argument
140 return READ_ONCE(ns->rlimit_max[type]); in get_userns_rlimit_max()
143 static inline void set_userns_rlimit_max(struct user_namespace *ns, in set_userns_rlimit_max() argument
146 ns->rlimit_max[type] = max <= LONG_MAX ? max : LONG_MAX; in set_userns_rlimit_max()
151 static inline struct user_namespace *get_user_ns(struct user_namespace *ns) in get_user_ns() argument
153 if (ns) in get_user_ns()
154 refcount_inc(&ns->ns.count); in get_user_ns()
155 return ns; in get_user_ns()
160 extern void __put_user_ns(struct user_namespace *ns);
162 static inline void put_user_ns(struct user_namespace *ns) in put_user_ns() argument
164 if (ns && refcount_dec_and_test(&ns->ns.count)) in put_user_ns()
165 __put_user_ns(ns); in put_user_ns()
177 extern bool userns_may_setgroups(const struct user_namespace *ns);
181 struct ns_common *ns_get_owner(struct ns_common *ns);
184 static inline struct user_namespace *get_user_ns(struct user_namespace *ns) in get_user_ns() argument
202 static inline void put_user_ns(struct user_namespace *ns) in put_user_ns() argument
206 static inline bool userns_may_setgroups(const struct user_namespace *ns) in userns_may_setgroups() argument
222 static inline struct ns_common *ns_get_owner(struct ns_common *ns) in ns_get_owner() argument