Home
last modified time | relevance | path

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

12345678910>>...30

/Linux-v5.4/drivers/mtd/nand/raw/
Dnandsim.c190 #define NS_IS_INITIALIZED(ns) ((ns)->geom.totsz != 0) argument
193 #define NS_STATUS_OK(ns) (NAND_STATUS_READY | (NAND_STATUS_WP * ((ns)->lines.wp == 0))) argument
196 #define NS_STATUS_FAILED(ns) (NAND_STATUS_FAIL | NS_STATUS_OK(ns)) argument
199 #define NS_RAW_OFFSET(ns) \ argument
200 (((ns)->regs.row * (ns)->geom.pgszoob) + (ns)->regs.column)
203 #define NS_RAW_OFFSET_OOB(ns) (NS_RAW_OFFSET(ns) + ns->geom.pgsz) argument
527 static int __init alloc_device(struct nandsim *ns) in alloc_device() argument
546 ns->pages_written = in alloc_device()
548 BITS_TO_LONGS(ns->geom.pgnum))); in alloc_device()
549 if (!ns->pages_written) { in alloc_device()
[all …]
/Linux-v5.4/security/apparmor/
Dpolicy_ns.c89 struct aa_ns *ns; in alloc_ns() local
91 ns = kzalloc(sizeof(*ns), GFP_KERNEL); in alloc_ns()
92 AA_DEBUG("%s(%p)\n", __func__, ns); in alloc_ns()
93 if (!ns) in alloc_ns()
95 if (!aa_policy_init(&ns->base, prefix, name, GFP_KERNEL)) in alloc_ns()
98 INIT_LIST_HEAD(&ns->sub_ns); in alloc_ns()
99 INIT_LIST_HEAD(&ns->rawdata_list); in alloc_ns()
100 mutex_init(&ns->lock); in alloc_ns()
101 init_waitqueue_head(&ns->wait); in alloc_ns()
104 ns->unconfined = aa_alloc_profile("unconfined", NULL, GFP_KERNEL); in alloc_ns()
[all …]
Dpolicy.c115 AA_BUG(!profile->ns); in __add_profile()
116 AA_BUG(!mutex_is_locked(&profile->ns->lock)); in __add_profile()
121 l = aa_label_insert(&profile->ns->labels, &profile->label); in __add_profile()
141 AA_BUG(!profile->ns); in __list_remove_profile()
142 AA_BUG(!mutex_is_locked(&profile->ns->lock)); in __list_remove_profile()
157 AA_BUG(!profile->ns); in __remove_profile()
158 AA_BUG(!mutex_is_locked(&profile->ns->lock)); in __remove_profile()
219 aa_put_ns(profile->ns); in aa_free_profile()
360 static struct aa_policy *__lookup_parent(struct aa_ns *ns, in __lookup_parent() argument
367 policy = &ns->base; in __lookup_parent()
[all …]
/Linux-v5.4/ipc/
Dnamespace.c22 static struct ucounts *inc_ipc_namespaces(struct user_namespace *ns) in inc_ipc_namespaces() argument
24 return inc_ucount(ns, current_euid(), UCOUNT_IPC_NAMESPACES); in inc_ipc_namespaces()
35 struct ipc_namespace *ns; in create_ipc_ns() local
45 ns = kzalloc(sizeof(struct ipc_namespace), GFP_KERNEL); in create_ipc_ns()
46 if (ns == NULL) in create_ipc_ns()
49 err = ns_alloc_inum(&ns->ns); in create_ipc_ns()
52 ns->ns.ops = &ipcns_operations; in create_ipc_ns()
54 refcount_set(&ns->count, 1); in create_ipc_ns()
55 ns->user_ns = get_user_ns(user_ns); in create_ipc_ns()
56 ns->ucounts = ucounts; in create_ipc_ns()
[all …]
/Linux-v5.4/kernel/
Dutsname.c20 static struct ucounts *inc_uts_namespaces(struct user_namespace *ns) in inc_uts_namespaces() argument
22 return inc_ucount(ns, current_euid(), UCOUNT_UTS_NAMESPACES); in inc_uts_namespaces()
48 struct uts_namespace *ns; in clone_uts_ns() local
58 ns = create_uts_ns(); in clone_uts_ns()
59 if (!ns) in clone_uts_ns()
62 err = ns_alloc_inum(&ns->ns); in clone_uts_ns()
66 ns->ucounts = ucounts; in clone_uts_ns()
67 ns->ns.ops = &utsns_operations; in clone_uts_ns()
70 memcpy(&ns->name, &old_ns->name, sizeof(ns->name)); in clone_uts_ns()
71 ns->user_ns = get_user_ns(user_ns); in clone_uts_ns()
[all …]
Dpid_namespace.c64 struct pid_namespace *ns = container_of(work, struct pid_namespace, proc_work); in proc_cleanup_work() local
65 pid_ns_release_proc(ns); in proc_cleanup_work()
68 static struct ucounts *inc_pid_namespaces(struct user_namespace *ns) in inc_pid_namespaces() argument
70 return inc_ucount(ns, current_euid(), UCOUNT_PID_NAMESPACES); in inc_pid_namespaces()
81 struct pid_namespace *ns; in create_pid_namespace() local
98 ns = kmem_cache_zalloc(pid_ns_cachep, GFP_KERNEL); in create_pid_namespace()
99 if (ns == NULL) in create_pid_namespace()
102 idr_init(&ns->idr); in create_pid_namespace()
104 ns->pid_cachep = create_pid_cachep(level); in create_pid_namespace()
105 if (ns->pid_cachep == NULL) in create_pid_namespace()
[all …]
Duser_namespace.c28 struct user_namespace *ns, int cap_setid,
32 static struct ucounts *inc_user_namespaces(struct user_namespace *ns, kuid_t uid) in inc_user_namespaces() argument
34 return inc_ucount(ns, uid, UCOUNT_USER_NAMESPACES); in inc_user_namespaces()
71 struct user_namespace *ns, *parent_ns = new->user_ns; in create_user_ns() local
105 ns = kmem_cache_zalloc(user_ns_cachep, GFP_KERNEL); in create_user_ns()
106 if (!ns) in create_user_ns()
109 ret = ns_alloc_inum(&ns->ns); in create_user_ns()
112 ns->ns.ops = &userns_operations; in create_user_ns()
114 atomic_set(&ns->count, 1); in create_user_ns()
116 ns->parent = parent_ns; in create_user_ns()
[all …]
Dpid.c56 .ns = &init_pid_ns,
80 .ns.inum = PROC_PID_INIT_INO,
82 .ns.ops = &pidns_operations,
105 struct pid_namespace *ns; in put_pid() local
110 ns = pid->numbers[pid->level].ns; in put_pid()
112 kmem_cache_free(ns->pid_cachep, pid); in put_pid()
113 put_pid_ns(ns); in put_pid()
133 struct pid_namespace *ns = upid->ns; in free_pid() local
134 switch (--ns->pid_allocated) { in free_pid()
141 wake_up_process(ns->child_reaper); in free_pid()
[all …]
Ducount.c15 #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))
80 bool setup_userns_sysctls(struct user_namespace *ns) in setup_userns_sysctls() argument
84 setup_sysctl_set(&ns->set, &set_root, set_is_seen); in setup_userns_sysctls()
89 tbl[i].data = &ns->ucount_max[i]; in setup_userns_sysctls()
91 ns->sysctls = __register_sysctl_table(&ns->set, "user", tbl); in setup_userns_sysctls()
93 if (!ns->sysctls) { in setup_userns_sysctls()
95 retire_sysctl_set(&ns->set); in setup_userns_sysctls()
[all …]
/Linux-v5.4/drivers/nvme/host/
Dmultipath.c52 void nvme_set_disk_name(char *disk_name, struct nvme_ns *ns, in nvme_set_disk_name() argument
56 sprintf(disk_name, "nvme%dn%d", ctrl->instance, ns->head->instance); in nvme_set_disk_name()
57 } else if (ns->head->disk) { in nvme_set_disk_name()
59 ctrl->instance, ns->head->instance); in nvme_set_disk_name()
63 ns->head->instance); in nvme_set_disk_name()
69 struct nvme_ns *ns = req->q->queuedata; in nvme_failover_req() local
73 spin_lock_irqsave(&ns->head->requeue_lock, flags); in nvme_failover_req()
74 blk_steal_bios(&ns->head->requeue_list, req); in nvme_failover_req()
75 spin_unlock_irqrestore(&ns->head->requeue_lock, flags); in nvme_failover_req()
91 nvme_mpath_clear_current_path(ns); in nvme_failover_req()
[all …]
/Linux-v5.4/drivers/block/drbd/
Ddrbd_state.c26 union drbd_state ns; member
281 union drbd_state ns, enum chg_state_flags flags,
285 static enum drbd_state_rv is_valid_transition(union drbd_state os, union drbd_state ns);
287 union drbd_state ns, enum sanitize_state_warnings *warn);
468 union drbd_state os, union drbd_state ns) in cl_wide_st_chg() argument
470 return (os.conn >= C_CONNECTED && ns.conn >= C_CONNECTED && in cl_wide_st_chg()
471 ((os.role != R_PRIMARY && ns.role == R_PRIMARY) || in cl_wide_st_chg()
472 (os.conn != C_STARTING_SYNC_T && ns.conn == C_STARTING_SYNC_T) || in cl_wide_st_chg()
473 (os.conn != C_STARTING_SYNC_S && ns.conn == C_STARTING_SYNC_S) || in cl_wide_st_chg()
474 (os.disk != D_FAILED && ns.disk == D_FAILED))) || in cl_wide_st_chg()
[all …]
/Linux-v5.4/arch/arm/boot/dts/
Domap3430-sdp.dts63 gpmc,cs-on-ns = <0>;
64 gpmc,cs-rd-off-ns = <186>;
65 gpmc,cs-wr-off-ns = <186>;
66 gpmc,adv-on-ns = <12>;
67 gpmc,adv-rd-off-ns = <48>;
68 gpmc,adv-wr-off-ns = <48>;
69 gpmc,oe-on-ns = <54>;
70 gpmc,oe-off-ns = <168>;
71 gpmc,we-on-ns = <54>;
72 gpmc,we-off-ns = <168>;
[all …]
Domap-gpmc-smsc911x.dtsi30 gpmc,cs-on-ns = <5>;
31 gpmc,cs-rd-off-ns = <150>;
32 gpmc,cs-wr-off-ns = <150>;
33 gpmc,adv-on-ns = <0>;
34 gpmc,adv-rd-off-ns = <15>;
35 gpmc,adv-wr-off-ns = <40>;
36 gpmc,oe-on-ns = <45>;
37 gpmc,oe-off-ns = <140>;
38 gpmc,we-on-ns = <45>;
39 gpmc,we-off-ns = <140>;
[all …]
Domap2430-sdp.dts48 gpmc,cs-on-ns = <6>;
49 gpmc,cs-rd-off-ns = <187>;
50 gpmc,cs-wr-off-ns = <187>;
51 gpmc,adv-on-ns = <18>;
52 gpmc,adv-rd-off-ns = <48>;
53 gpmc,adv-wr-off-ns = <48>;
54 gpmc,oe-on-ns = <60>;
55 gpmc,oe-off-ns = <169>;
56 gpmc,we-on-ns = <66>;
57 gpmc,we-off-ns = <169>;
[all …]
Domap3-overo-tobiduo-common.dtsi26 gpmc,cs-on-ns = <0>;
27 gpmc,cs-rd-off-ns = <42>;
28 gpmc,cs-wr-off-ns = <36>;
29 gpmc,adv-on-ns = <6>;
30 gpmc,adv-rd-off-ns = <12>;
31 gpmc,adv-wr-off-ns = <12>;
32 gpmc,oe-on-ns = <0>;
33 gpmc,oe-off-ns = <42>;
34 gpmc,we-on-ns = <0>;
35 gpmc,we-off-ns = <36>;
[all …]
Domap-gpmc-smsc9221.dtsi33 gpmc,cs-on-ns = <0>;
34 gpmc,cs-rd-off-ns = <42>;
35 gpmc,cs-wr-off-ns = <36>;
36 gpmc,adv-on-ns = <6>;
37 gpmc,adv-rd-off-ns = <12>;
38 gpmc,adv-wr-off-ns = <12>;
39 gpmc,oe-on-ns = <0>;
40 gpmc,oe-off-ns = <42>;
41 gpmc,we-on-ns = <0>;
42 gpmc,we-off-ns = <36>;
[all …]
/Linux-v5.4/drivers/net/netdevsim/
Dnetdev.c30 struct netdevsim *ns = netdev_priv(dev); in nsim_start_xmit() local
32 if (!nsim_ipsec_tx(ns, skb)) in nsim_start_xmit()
35 u64_stats_update_begin(&ns->syncp); in nsim_start_xmit()
36 ns->tx_packets++; in nsim_start_xmit()
37 ns->tx_bytes += skb->len; in nsim_start_xmit()
38 u64_stats_update_end(&ns->syncp); in nsim_start_xmit()
52 struct netdevsim *ns = netdev_priv(dev); in nsim_change_mtu() local
54 if (ns->xdp.prog && new_mtu > NSIM_XDP_MAX_MTU) in nsim_change_mtu()
65 struct netdevsim *ns = netdev_priv(dev); in nsim_get_stats64() local
69 start = u64_stats_fetch_begin(&ns->syncp); in nsim_get_stats64()
[all …]
Dbpf.c41 struct netdevsim *ns; member
82 static bool nsim_xdp_offload_active(struct netdevsim *ns) in nsim_xdp_offload_active() argument
84 return ns->xdp_hw.prog; in nsim_xdp_offload_active()
99 nsim_bpf_offload(struct netdevsim *ns, struct bpf_prog *prog, bool oldprog) in nsim_bpf_offload() argument
101 nsim_prog_set_loaded(ns->bpf_offloaded, false); in nsim_bpf_offload()
103 WARN(!!ns->bpf_offloaded != oldprog, in nsim_bpf_offload()
106 ns->bpf_offloaded = prog; in nsim_bpf_offload()
107 ns->bpf_offloaded_id = prog ? prog->aux->id : 0; in nsim_bpf_offload()
118 struct netdevsim *ns = cb_priv; in nsim_bpf_setup_tc_block_cb() local
127 if (!tc_cls_can_offload_and_chain0(ns->netdev, &cls_bpf->common)) in nsim_bpf_setup_tc_block_cb()
[all …]
/Linux-v5.4/kernel/cgroup/
Dnamespace.c12 static struct ucounts *inc_cgroup_namespaces(struct user_namespace *ns) in inc_cgroup_namespaces() argument
14 return inc_ucount(ns, current_euid(), UCOUNT_CGROUP_NAMESPACES); in inc_cgroup_namespaces()
30 ret = ns_alloc_inum(&new_ns->ns); in alloc_cgroup_ns()
36 new_ns->ns.ops = &cgroupns_operations; in alloc_cgroup_ns()
40 void free_cgroup_ns(struct cgroup_namespace *ns) in free_cgroup_ns() argument
42 put_css_set(ns->root_cset); in free_cgroup_ns()
43 dec_cgroup_namespaces(ns->ucounts); in free_cgroup_ns()
44 put_user_ns(ns->user_ns); in free_cgroup_ns()
45 ns_free_inum(&ns->ns); in free_cgroup_ns()
46 kfree(ns); in free_cgroup_ns()
[all …]
/Linux-v5.4/fs/
Dnsfs.c36 struct ns_common *ns = inode->i_private; in ns_prune_dentry() local
37 atomic_long_set(&ns->stashed, 0); in ns_prune_dentry()
50 struct ns_common *ns = inode->i_private; in nsfs_evict() local
52 ns->ops->put(ns); in nsfs_evict()
55 static void *__ns_get_path(struct path *path, struct ns_common *ns) in __ns_get_path() argument
63 d = atomic_long_read(&ns->stashed); in __ns_get_path()
70 ns->ops->put(ns); in __ns_get_path()
79 ns->ops->put(ns); in __ns_get_path()
82 inode->i_ino = ns->inum; in __ns_get_path()
87 inode->i_private = ns; in __ns_get_path()
[all …]
/Linux-v5.4/drivers/nvme/target/
Dio-cmd-file.c16 void nvmet_file_ns_disable(struct nvmet_ns *ns) in nvmet_file_ns_disable() argument
18 if (ns->file) { in nvmet_file_ns_disable()
19 if (ns->buffered_io) in nvmet_file_ns_disable()
21 mempool_destroy(ns->bvec_pool); in nvmet_file_ns_disable()
22 ns->bvec_pool = NULL; in nvmet_file_ns_disable()
23 kmem_cache_destroy(ns->bvec_cache); in nvmet_file_ns_disable()
24 ns->bvec_cache = NULL; in nvmet_file_ns_disable()
25 fput(ns->file); in nvmet_file_ns_disable()
26 ns->file = NULL; in nvmet_file_ns_disable()
30 int nvmet_file_ns_enable(struct nvmet_ns *ns) in nvmet_file_ns_enable() argument
[all …]
/Linux-v5.4/include/linux/
Dipc_namespace.h71 struct ns_common ns; member
78 extern void shm_destroy_orphaned(struct ipc_namespace *ns);
80 static inline void shm_destroy_orphaned(struct ipc_namespace *ns) {} in shm_destroy_orphaned() argument
84 extern int mq_init_ns(struct ipc_namespace *ns);
119 static inline int mq_init_ns(struct ipc_namespace *ns) { return 0; } in mq_init_ns() argument
124 struct user_namespace *user_ns, struct ipc_namespace *ns);
126 static inline struct ipc_namespace *get_ipc_ns(struct ipc_namespace *ns) in get_ipc_ns() argument
128 if (ns) in get_ipc_ns()
129 refcount_inc(&ns->count); in get_ipc_ns()
130 return ns; in get_ipc_ns()
[all …]
Duser_namespace.h64 struct ns_common ns; member
93 struct user_namespace *ns; member
101 bool setup_userns_sysctls(struct user_namespace *ns);
102 void retire_userns_sysctls(struct user_namespace *ns);
103 struct ucounts *inc_ucount(struct user_namespace *ns, kuid_t uid, enum ucount_type type);
108 static inline struct user_namespace *get_user_ns(struct user_namespace *ns) in get_user_ns() argument
110 if (ns) in get_user_ns()
111 atomic_inc(&ns->count); in get_user_ns()
112 return ns; in get_user_ns()
117 extern void __put_user_ns(struct user_namespace *ns);
[all …]
/Linux-v5.4/security/keys/
Dpersistent.c20 static int key_create_persistent_register(struct user_namespace *ns) in key_create_persistent_register() argument
31 ns->persistent_keyring_register = reg; in key_create_persistent_register()
40 static key_ref_t key_create_persistent(struct user_namespace *ns, kuid_t uid, in key_create_persistent() argument
46 if (!ns->persistent_keyring_register) { in key_create_persistent()
47 long err = key_create_persistent_register(ns); in key_create_persistent()
51 reg_ref = make_key_ref(ns->persistent_keyring_register, true); in key_create_persistent()
62 ns->persistent_keyring_register); in key_create_persistent()
73 static long key_get_persistent(struct user_namespace *ns, kuid_t uid, in key_get_persistent() argument
86 index_key.desc_len = sprintf(buf, "_persistent.%u", from_kuid(ns, uid)); in key_get_persistent()
89 if (ns->persistent_keyring_register) { in key_get_persistent()
[all …]
/Linux-v5.4/drivers/clk/qcom/
Dclk-rcg.c18 static u32 ns_to_src(struct src_sel *s, u32 ns) in ns_to_src() argument
20 ns >>= s->src_sel_shift; in ns_to_src()
21 ns &= SRC_SEL_MASK; in ns_to_src()
22 return ns; in ns_to_src()
25 static u32 src_to_ns(struct src_sel *s, u8 src, u32 ns) in src_to_ns() argument
31 ns &= ~mask; in src_to_ns()
33 ns |= src << s->src_sel_shift; in src_to_ns()
34 return ns; in src_to_ns()
41 u32 ns; in clk_rcg_get_parent() local
44 ret = regmap_read(rcg->clkr.regmap, rcg->ns_reg, &ns); in clk_rcg_get_parent()
[all …]

12345678910>>...30