Home
last modified time | relevance | path

Searched refs:ns (Results 1 – 25 of 67) sorted by relevance

123

/include/linux/
Dipc_namespace.h80 struct ns_common ns; member
87 extern void shm_destroy_orphaned(struct ipc_namespace *ns);
89 static inline void shm_destroy_orphaned(struct ipc_namespace *ns) {} in shm_destroy_orphaned() argument
93 extern int mq_init_ns(struct ipc_namespace *ns);
128 static inline int mq_init_ns(struct ipc_namespace *ns) { return 0; } in mq_init_ns() argument
133 struct user_namespace *user_ns, struct ipc_namespace *ns);
135 static inline struct ipc_namespace *get_ipc_ns(struct ipc_namespace *ns) in get_ipc_ns() argument
137 if (ns) in get_ipc_ns()
138 refcount_inc(&ns->ns.count); in get_ipc_ns()
139 return ns; in get_ipc_ns()
[all …]
Dpid_namespace.h40 struct ns_common ns; member
51 static inline struct pid_namespace *get_pid_ns(struct pid_namespace *ns) in get_pid_ns() argument
53 if (ns != &init_pid_ns) in get_pid_ns()
54 refcount_inc(&ns->ns.count); in get_pid_ns()
55 return ns; in get_pid_ns()
59 static inline int pidns_memfd_noexec_scope(struct pid_namespace *ns) in pidns_memfd_noexec_scope() argument
63 for (; ns; ns = ns->parent) in pidns_memfd_noexec_scope()
64 scope = max(scope, READ_ONCE(ns->memfd_noexec_scope)); in pidns_memfd_noexec_scope()
69 static inline int pidns_memfd_noexec_scope(struct pid_namespace *ns) in pidns_memfd_noexec_scope() argument
76 struct user_namespace *user_ns, struct pid_namespace *ns);
[all …]
Dnsproxy.h47 struct cgroup_namespace *: &(__ns->ns), \
48 struct ipc_namespace *: &(__ns->ns), \
49 struct net *: &(__ns->ns), \
50 struct pid_namespace *: &(__ns->ns), \
51 struct mnt_namespace *: &(__ns->ns), \
52 struct time_namespace *: &(__ns->ns), \
53 struct user_namespace *: &(__ns->ns), \
54 struct uts_namespace *: &(__ns->ns))
110 void free_nsproxy(struct nsproxy *ns);
115 static inline void put_nsproxy(struct nsproxy *ns) in put_nsproxy() argument
[all …]
Duser_namespace.h83 struct ns_common ns; member
122 struct user_namespace *ns; member
132 bool setup_userns_sysctls(struct user_namespace *ns);
133 void retire_userns_sysctls(struct user_namespace *ns);
134 struct ucounts *inc_ucount(struct user_namespace *ns, kuid_t uid, enum ucount_type type);
136 struct ucounts *alloc_ucounts(struct user_namespace *ns, kuid_t uid);
152 static inline long get_userns_rlimit_max(struct user_namespace *ns, enum rlimit_type type) in get_userns_rlimit_max() argument
154 return READ_ONCE(ns->rlimit_max[type]); in get_userns_rlimit_max()
157 static inline void set_userns_rlimit_max(struct user_namespace *ns, in set_userns_rlimit_max() argument
160 ns->rlimit_max[type] = max <= LONG_MAX ? max : LONG_MAX; in set_userns_rlimit_max()
[all …]
Dutsname.h28 struct ns_common ns; member
33 static inline void get_uts_ns(struct uts_namespace *ns) in get_uts_ns() argument
35 refcount_inc(&ns->ns.count); in get_uts_ns()
40 extern void free_uts_ns(struct uts_namespace *ns);
42 static inline void put_uts_ns(struct uts_namespace *ns) in put_uts_ns() argument
44 if (refcount_dec_and_test(&ns->ns.count)) in put_uts_ns()
45 free_uts_ns(ns); in put_uts_ns()
50 static inline void get_uts_ns(struct uts_namespace *ns) in get_uts_ns() argument
54 static inline void put_uts_ns(struct uts_namespace *ns) in put_uts_ns() argument
Dexport.h33 #define ___EXPORT_SYMBOL(sym, license, ns...) \ argument
37 .ascii ns "\0" ASM_NL \
48 #define __EXPORT_SYMBOL(sym, license, ns) argument
52 #define __EXPORT_SYMBOL(sym, license, ns) __GENKSYMS_EXPORT_SYMBOL(sym) argument
56 #define __EXPORT_SYMBOL(sym, license, ns) \ argument
57 ___EXPORT_SYMBOL(sym, license, ns)
75 #define __EXPORT_SYMBOL(sym, license, ns) \ argument
79 asm(__stringify(___EXPORT_SYMBOL(sym, license, ns)))
91 #define EXPORT_SYMBOL_NS(sym, ns) __EXPORT_SYMBOL(sym, "", __stringify(ns)) argument
92 #define EXPORT_SYMBOL_NS_GPL(sym, ns) __EXPORT_SYMBOL(sym, "GPL", __stringify(ns)) argument
Dtime_namespace.h25 struct ns_common ns; member
36 struct time_namespace *ns);
37 extern void timens_commit(struct task_struct *tsk, struct time_namespace *ns);
39 static inline struct time_namespace *get_time_ns(struct time_namespace *ns) in get_time_ns() argument
41 refcount_inc(&ns->ns.count); in get_time_ns()
42 return ns; in get_time_ns()
48 void free_time_ns(struct time_namespace *ns);
52 static inline void put_time_ns(struct time_namespace *ns) in put_time_ns() argument
54 if (refcount_dec_and_test(&ns->ns.count)) in put_time_ns()
55 free_time_ns(ns); in put_time_ns()
[all …]
Dproc_ns.h21 void (*put)(struct ns_common *ns);
22 int (*install)(struct nsset *nsset, struct ns_common *ns);
23 struct user_namespace *(*owner)(struct ns_common *ns);
24 struct ns_common *(*get_parent)(struct ns_common *ns);
67 static inline int ns_alloc_inum(struct ns_common *ns) in ns_alloc_inum() argument
69 WRITE_ONCE(ns->stashed, NULL); in ns_alloc_inum()
70 return proc_alloc_inum(&ns->inum); in ns_alloc_inum()
73 #define ns_free_inum(ns) proc_free_inum((ns)->inum) argument
82 extern bool ns_match(const struct ns_common *ns, dev_t dev, ino_t ino);
Dcapability.h144 struct user_namespace *ns, int cap);
147 struct user_namespace *ns, int cap);
149 extern bool ns_capable(struct user_namespace *ns, int cap);
150 extern bool ns_capable_noaudit(struct user_namespace *ns, int cap);
151 extern bool ns_capable_setid(struct user_namespace *ns, int cap);
158 struct user_namespace *ns, int cap) in has_ns_capability() argument
167 struct user_namespace *ns, int cap) in has_ns_capability_noaudit() argument
175 static inline bool ns_capable(struct user_namespace *ns, int cap) in ns_capable() argument
179 static inline bool ns_capable_noaudit(struct user_namespace *ns, int cap) in ns_capable_noaudit() argument
183 static inline bool ns_capable_setid(struct user_namespace *ns, int cap) in ns_capable_setid() argument
[all …]
Dpid.h52 struct pid_namespace *ns; member
121 extern struct pid *find_pid_ns(int nr, struct pid_namespace *ns);
130 extern struct pid *alloc_pid(struct pid_namespace *ns, pid_t *set_tid,
133 extern void disable_pid_allocation(struct pid_namespace *ns);
147 struct pid_namespace *ns = NULL; in ns_of_pid() local
149 ns = pid->numbers[pid->level].ns; in ns_of_pid()
150 return ns; in ns_of_pid()
183 pid_t pid_nr_ns(struct pid *pid, struct pid_namespace *ns);
228 pid_t __task_pid_nr_ns(struct task_struct *task, enum pid_type type, struct pid_namespace *ns);
235 static inline pid_t task_pid_nr_ns(struct task_struct *tsk, struct pid_namespace *ns) in task_pid_nr_ns() argument
[all …]
Dexport-internal.h40 #define __KSYMTAB(name, sym, sec, ns) \ argument
45 " .asciz \"" ns "\"" "\n" \
62 #define KSYMTAB_FUNC(name, sec, ns) __KSYMTAB(name, KSYM_FUNC(name), sec, ns) argument
63 #define KSYMTAB_DATA(name, sec, ns) __KSYMTAB(name, name, sec, ns) argument
Dtimecounter.h75 u64 ns = (u64) cycles; in cyclecounter_cyc2ns() local
77 ns = (ns * cc->mult) + *frac; in cyclecounter_cyc2ns()
78 *frac = ns & mask; in cyclecounter_cyc2ns()
79 return ns >> cc->shift; in cyclecounter_cyc2ns()
Dpm.h380 #define _EXPORT_PM_OPS(name, license, ns) \ argument
382 __EXPORT_SYMBOL(name, license, ns); \
385 #define _DISCARD_PM_OPS(name, license, ns) \ argument
389 #define _EXPORT_DEV_PM_OPS(name, license, ns) _EXPORT_PM_OPS(name, license, ns) argument
391 #define EXPORT_PM_FN_NS_GPL(name, ns) EXPORT_SYMBOL_NS_GPL(name, ns) argument
393 #define _EXPORT_DEV_PM_OPS(name, license, ns) _DISCARD_PM_OPS(name, license, ns) argument
395 #define EXPORT_PM_FN_NS_GPL(name, ns) argument
399 #define _EXPORT_DEV_SLEEP_PM_OPS(name, license, ns) _EXPORT_PM_OPS(name, license, ns) argument
401 #define _EXPORT_DEV_SLEEP_PM_OPS(name, license, ns) _DISCARD_PM_OPS(name, license, ns) argument
406 #define EXPORT_NS_DEV_PM_OPS(name, ns) _EXPORT_DEV_PM_OPS(name, "", #ns) argument
[all …]
Dktime.h136 s64 ns = kt; in ktime_divns() local
137 u64 tmp = ns < 0 ? -ns : ns; in ktime_divns()
140 return ns < 0 ? -tmp : tmp; in ktime_divns()
220 static inline ktime_t ns_to_ktime(u64 ns) in ns_to_ktime() argument
222 return ns; in ns_to_ktime()
Duidgid.h123 static inline bool kuid_has_mapping(struct user_namespace *ns, kuid_t uid) in kuid_has_mapping() argument
125 return from_kuid(ns, uid) != (uid_t) -1; in kuid_has_mapping()
128 static inline bool kgid_has_mapping(struct user_namespace *ns, kgid_t gid) in kgid_has_mapping() argument
130 return from_kgid(ns, gid) != (gid_t) -1; in kgid_has_mapping()
174 static inline bool kuid_has_mapping(struct user_namespace *ns, kuid_t uid) in kuid_has_mapping() argument
179 static inline bool kgid_has_mapping(struct user_namespace *ns, kgid_t gid) in kgid_has_mapping() argument
Dtime64.h158 static __always_inline void timespec64_add_ns(struct timespec64 *a, u64 ns) in timespec64_add_ns() argument
160 a->tv_sec += __iter_div_u64_rem(a->tv_nsec + ns, NSEC_PER_SEC, &ns); in timespec64_add_ns()
161 a->tv_nsec = ns; in timespec64_add_ns()
Dprojid.h58 static inline bool kprojid_has_mapping(struct user_namespace *ns, kprojid_t projid) in kprojid_has_mapping() argument
60 return from_kprojid(ns, projid) != (projid_t)-1; in kprojid_has_mapping()
83 static inline bool kprojid_has_mapping(struct user_namespace *ns, kprojid_t projid) in kprojid_has_mapping() argument
Dcgroup.h124 int proc_cgroup_show(struct seq_file *m, struct pid_namespace *ns,
773 struct ns_common ns; member
783 void free_cgroup_ns(struct cgroup_namespace *ns);
790 struct cgroup_namespace *ns);
794 static inline void free_cgroup_ns(struct cgroup_namespace *ns) { } in free_cgroup_ns() argument
804 static inline void get_cgroup_ns(struct cgroup_namespace *ns) in get_cgroup_ns() argument
806 if (ns) in get_cgroup_ns()
807 refcount_inc(&ns->ns.count); in get_cgroup_ns()
810 static inline void put_cgroup_ns(struct cgroup_namespace *ns) in put_cgroup_ns() argument
812 if (ns && refcount_dec_and_test(&ns->ns.count)) in put_cgroup_ns()
[all …]
Dkernfs.h208 const void *ns; /* namespace tag */ member
416 const char *name, const void *ns);
418 const char *path, const void *ns);
435 void *priv, const void *ns);
443 void *priv, const void *ns,
455 const void *ns);
503 const void *ns) in kernfs_find_and_get_ns() argument
507 const void *ns) in kernfs_walk_and_get_ns() argument
533 void *priv, const void *ns) in kernfs_create_dir_ns() argument
540 void *priv, const void *ns, struct lock_class_key *key) in __kernfs_create_file() argument
[all …]
/include/linux/irqchip/
Darm-gic-v3-prio.h37 #define __gicv3_ns_to_prio(ns) (0x80 | ((ns) >> 1)) argument
/include/linux/regulator/
Dfixed.h57 #define regulator_register_fixed(id, s, ns) regulator_register_always_on(id, \ argument
58 "fixed-dummy", s, ns, 0)
/include/linux/dsa/
Dksz_common.h20 u64 ns = FIELD_GET(KSZ_TSTAMP_SEC_MASK, tstamp) * NSEC_PER_SEC + in ksz_decode_tstamp() local
23 return ns_to_ktime(ns); in ksz_decode_tstamp()
/include/net/
Dioam6.h33 struct ioam6_namespace __rcu *ns; member
59 struct ioam6_namespace *ns,
Dnet_namespace.h93 struct ns_common ns; member
207 struct ns_common *get_net_ns(struct ns_common *ns);
229 static inline struct ns_common *get_net_ns(struct ns_common *ns) in get_net_ns() argument
259 refcount_inc(&net->ns.count); in get_net()
270 if (!refcount_inc_not_zero(&net->ns.count)) in maybe_get_net()
278 if (refcount_dec_and_test(&net->ns.count)) in put_net()
290 return refcount_read(&net->ns.count) != 0; in check_net()
/include/uapi/linux/
Dkfd_ioctl.h624 #define KFD_EVENT_FMT_PAGEFAULT_START(ns, pid, addr, node, rw)\ argument
625 "%lld -%d @%lx(%x) %c\n", (ns), (pid), (addr), (node), (rw)
627 #define KFD_EVENT_FMT_PAGEFAULT_END(ns, pid, addr, node, migrate_update)\ argument
628 "%lld -%d @%lx(%x) %c\n", (ns), (pid), (addr), (node), (migrate_update)
630 #define KFD_EVENT_FMT_MIGRATE_START(ns, pid, start, size, from, to, prefetch_loc,\ argument
632 "%lld -%d @%lx(%lx) %x->%x %x:%x %d\n", (ns), (pid), (start), (size),\
635 #define KFD_EVENT_FMT_MIGRATE_END(ns, pid, start, size, from, to, migrate_trigger)\ argument
636 "%lld -%d @%lx(%lx) %x->%x %d\n", (ns), (pid), (start), (size),\
639 #define KFD_EVENT_FMT_QUEUE_EVICTION(ns, pid, node, evict_trigger)\ argument
640 "%lld -%d %x %d\n", (ns), (pid), (node), (evict_trigger)
[all …]

123