Home
last modified time | relevance | path

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

12345678910>>...27

/Linux-v4.19/drivers/mtd/nand/raw/
Dnandsim.c203 #define NS_IS_INITIALIZED(ns) ((ns)->geom.totsz != 0) argument
206 #define NS_STATUS_OK(ns) (NAND_STATUS_READY | (NAND_STATUS_WP * ((ns)->lines.wp == 0))) argument
209 #define NS_STATUS_FAILED(ns) (NAND_STATUS_FAIL | NS_STATUS_OK(ns)) argument
212 #define NS_RAW_OFFSET(ns) \ argument
213 (((ns)->regs.row * (ns)->geom.pgszoob) + (ns)->regs.column)
216 #define NS_RAW_OFFSET_OOB(ns) (NS_RAW_OFFSET(ns) + ns->geom.pgsz) argument
549 static int __init alloc_device(struct nandsim *ns) in alloc_device() argument
568 ns->pages_written = in alloc_device()
570 BITS_TO_LONGS(ns->geom.pgnum))); in alloc_device()
571 if (!ns->pages_written) { in alloc_device()
[all …]
/Linux-v4.19/security/apparmor/
Dpolicy_ns.c93 struct aa_ns *ns; in alloc_ns() local
95 ns = kzalloc(sizeof(*ns), GFP_KERNEL); in alloc_ns()
96 AA_DEBUG("%s(%p)\n", __func__, ns); in alloc_ns()
97 if (!ns) in alloc_ns()
99 if (!aa_policy_init(&ns->base, prefix, name, GFP_KERNEL)) in alloc_ns()
102 INIT_LIST_HEAD(&ns->sub_ns); in alloc_ns()
103 INIT_LIST_HEAD(&ns->rawdata_list); in alloc_ns()
104 mutex_init(&ns->lock); in alloc_ns()
105 init_waitqueue_head(&ns->wait); in alloc_ns()
108 ns->unconfined = aa_alloc_profile("unconfined", NULL, GFP_KERNEL); in alloc_ns()
[all …]
Dpolicy.c120 AA_BUG(!profile->ns); in __add_profile()
121 AA_BUG(!mutex_is_locked(&profile->ns->lock)); in __add_profile()
126 l = aa_label_insert(&profile->ns->labels, &profile->label); in __add_profile()
146 AA_BUG(!profile->ns); in __list_remove_profile()
147 AA_BUG(!mutex_is_locked(&profile->ns->lock)); in __list_remove_profile()
162 AA_BUG(!profile->ns); in __remove_profile()
163 AA_BUG(!mutex_is_locked(&profile->ns->lock)); in __remove_profile()
224 aa_put_ns(profile->ns); in aa_free_profile()
362 static struct aa_policy *__lookup_parent(struct aa_ns *ns, in __lookup_parent() argument
369 policy = &ns->base; in __lookup_parent()
[all …]
/Linux-v4.19/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 = kmalloc(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-v4.19/drivers/net/netdevsim/
Dnetdev.c49 struct netdevsim *ns = to_nsim(dev); in nsim_num_vf() local
51 return ns->num_vfs; in nsim_num_vf()
60 static int nsim_vfs_enable(struct netdevsim *ns, unsigned int num_vfs) in nsim_vfs_enable() argument
62 ns->vfconfigs = kcalloc(num_vfs, sizeof(struct nsim_vf_config), in nsim_vfs_enable()
64 if (!ns->vfconfigs) in nsim_vfs_enable()
66 ns->num_vfs = num_vfs; in nsim_vfs_enable()
71 static void nsim_vfs_disable(struct netdevsim *ns) in nsim_vfs_disable() argument
73 kfree(ns->vfconfigs); in nsim_vfs_disable()
74 ns->vfconfigs = NULL; in nsim_vfs_disable()
75 ns->num_vfs = 0; in nsim_vfs_disable()
[all …]
Dbpf.c30 struct netdevsim *ns; member
41 struct netdevsim *ns; member
80 if (state->ns->bpf_bind_verifier_delay && !insn_idx) in nsim_bpf_verify_insn()
81 msleep(state->ns->bpf_bind_verifier_delay); in nsim_bpf_verify_insn()
93 static bool nsim_xdp_offload_active(struct netdevsim *ns) in nsim_xdp_offload_active() argument
95 return ns->xdp_hw.prog; in nsim_xdp_offload_active()
110 nsim_bpf_offload(struct netdevsim *ns, struct bpf_prog *prog, bool oldprog) in nsim_bpf_offload() argument
112 nsim_prog_set_loaded(ns->bpf_offloaded, false); in nsim_bpf_offload()
114 WARN(!!ns->bpf_offloaded != oldprog, in nsim_bpf_offload()
117 ns->bpf_offloaded = prog; in nsim_bpf_offload()
[all …]
/Linux-v4.19/kernel/
Dutsname.c24 static struct ucounts *inc_uts_namespaces(struct user_namespace *ns) in inc_uts_namespaces() argument
26 return inc_ucount(ns, current_euid(), UCOUNT_UTS_NAMESPACES); in inc_uts_namespaces()
52 struct uts_namespace *ns; in clone_uts_ns() local
62 ns = create_uts_ns(); in clone_uts_ns()
63 if (!ns) in clone_uts_ns()
66 err = ns_alloc_inum(&ns->ns); in clone_uts_ns()
70 ns->ucounts = ucounts; in clone_uts_ns()
71 ns->ns.ops = &utsns_operations; in clone_uts_ns()
74 memcpy(&ns->name, &old_ns->name, sizeof(ns->name)); in clone_uts_ns()
75 ns->user_ns = get_user_ns(user_ns); in clone_uts_ns()
[all …]
Dpid_namespace.c63 struct pid_namespace *ns = container_of(work, struct pid_namespace, proc_work); in proc_cleanup_work() local
64 pid_ns_release_proc(ns); in proc_cleanup_work()
67 static struct ucounts *inc_pid_namespaces(struct user_namespace *ns) in inc_pid_namespaces() argument
69 return inc_ucount(ns, current_euid(), UCOUNT_PID_NAMESPACES); in inc_pid_namespaces()
80 struct pid_namespace *ns; in create_pid_namespace() local
97 ns = kmem_cache_zalloc(pid_ns_cachep, GFP_KERNEL); in create_pid_namespace()
98 if (ns == NULL) in create_pid_namespace()
101 idr_init(&ns->idr); in create_pid_namespace()
103 ns->pid_cachep = create_pid_cachep(level); in create_pid_namespace()
104 if (ns->pid_cachep == NULL) in create_pid_namespace()
[all …]
Dpid.c54 .ns = &init_pid_ns,
78 .ns.inum = PROC_PID_INIT_INO,
80 .ns.ops = &pidns_operations,
103 struct pid_namespace *ns; in put_pid() local
108 ns = pid->numbers[pid->level].ns; in put_pid()
111 kmem_cache_free(ns->pid_cachep, pid); in put_pid()
112 put_pid_ns(ns); in put_pid()
132 struct pid_namespace *ns = upid->ns; in free_pid() local
133 switch (--ns->pid_allocated) { in free_pid()
140 wake_up_process(ns->child_reaper); in free_pid()
[all …]
Duser_namespace.c33 struct user_namespace *ns, int cap_setid,
37 static struct ucounts *inc_user_namespaces(struct user_namespace *ns, kuid_t uid) in inc_user_namespaces() argument
39 return inc_ucount(ns, uid, UCOUNT_USER_NAMESPACES); in inc_user_namespaces()
76 struct user_namespace *ns, *parent_ns = new->user_ns; in create_user_ns() local
110 ns = kmem_cache_zalloc(user_ns_cachep, GFP_KERNEL); in create_user_ns()
111 if (!ns) in create_user_ns()
114 ret = ns_alloc_inum(&ns->ns); in create_user_ns()
117 ns->ns.ops = &userns_operations; in create_user_ns()
119 atomic_set(&ns->count, 1); in create_user_ns()
121 ns->parent = parent_ns; in create_user_ns()
[all …]
Ducount.c20 #define ucounts_hashfn(ns, uid) \ argument
21 hash_long((unsigned long)__kuid_val(uid) + (unsigned long)(ns), \
23 #define ucounts_hashentry(ns, uid) \ argument
24 (ucounts_hashtable + ucounts_hashfn(ns, uid))
87 bool setup_userns_sysctls(struct user_namespace *ns) in setup_userns_sysctls() argument
91 setup_sysctl_set(&ns->set, &set_root, set_is_seen); in setup_userns_sysctls()
96 tbl[i].data = &ns->ucount_max[i]; in setup_userns_sysctls()
98 ns->sysctls = __register_sysctl_table(&ns->set, "user", tbl); in setup_userns_sysctls()
100 if (!ns->sysctls) { in setup_userns_sysctls()
102 retire_sysctl_set(&ns->set); in setup_userns_sysctls()
[all …]
/Linux-v4.19/drivers/block/drbd/
Ddrbd_state.c38 union drbd_state ns; member
293 union drbd_state ns, enum chg_state_flags flags,
297 static enum drbd_state_rv is_valid_transition(union drbd_state os, union drbd_state ns);
299 union drbd_state ns, enum sanitize_state_warnings *warn);
480 union drbd_state os, union drbd_state ns) in cl_wide_st_chg() argument
482 return (os.conn >= C_CONNECTED && ns.conn >= C_CONNECTED && in cl_wide_st_chg()
483 ((os.role != R_PRIMARY && ns.role == R_PRIMARY) || in cl_wide_st_chg()
484 (os.conn != C_STARTING_SYNC_T && ns.conn == C_STARTING_SYNC_T) || in cl_wide_st_chg()
485 (os.conn != C_STARTING_SYNC_S && ns.conn == C_STARTING_SYNC_S) || in cl_wide_st_chg()
486 (os.disk != D_FAILED && ns.disk == D_FAILED))) || in cl_wide_st_chg()
[all …]
/Linux-v4.19/drivers/nvme/host/
Dmultipath.c35 void nvme_set_disk_name(char *disk_name, struct nvme_ns *ns, in nvme_set_disk_name() argument
39 sprintf(disk_name, "nvme%dn%d", ctrl->instance, ns->head->instance); in nvme_set_disk_name()
40 } else if (ns->head->disk) { in nvme_set_disk_name()
42 ctrl->cntlid, ns->head->instance); in nvme_set_disk_name()
46 ns->head->instance); in nvme_set_disk_name()
52 struct nvme_ns *ns = req->q->queuedata; in nvme_failover_req() local
56 spin_lock_irqsave(&ns->head->requeue_lock, flags); in nvme_failover_req()
57 blk_steal_bios(&ns->head->requeue_list, req); in nvme_failover_req()
58 spin_unlock_irqrestore(&ns->head->requeue_lock, flags); in nvme_failover_req()
74 nvme_mpath_clear_current_path(ns); in nvme_failover_req()
[all …]
/Linux-v4.19/arch/arm/boot/dts/
Domap3430-sdp.dts66 gpmc,cs-on-ns = <0>;
67 gpmc,cs-rd-off-ns = <186>;
68 gpmc,cs-wr-off-ns = <186>;
69 gpmc,adv-on-ns = <12>;
70 gpmc,adv-rd-off-ns = <48>;
71 gpmc,adv-wr-off-ns = <48>;
72 gpmc,oe-on-ns = <54>;
73 gpmc,oe-off-ns = <168>;
74 gpmc,we-on-ns = <54>;
75 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.dts51 gpmc,cs-on-ns = <6>;
52 gpmc,cs-rd-off-ns = <187>;
53 gpmc,cs-wr-off-ns = <187>;
54 gpmc,adv-on-ns = <18>;
55 gpmc,adv-rd-off-ns = <48>;
56 gpmc,adv-wr-off-ns = <48>;
57 gpmc,oe-on-ns = <60>;
58 gpmc,oe-off-ns = <169>;
59 gpmc,we-on-ns = <66>;
60 gpmc,we-off-ns = <169>;
[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-v4.19/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-v4.19/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 …]
Dio-cmd-bdev.c19 int nvmet_bdev_ns_enable(struct nvmet_ns *ns) in nvmet_bdev_ns_enable() argument
23 ns->bdev = blkdev_get_by_path(ns->device_path, in nvmet_bdev_ns_enable()
25 if (IS_ERR(ns->bdev)) { in nvmet_bdev_ns_enable()
26 ret = PTR_ERR(ns->bdev); in nvmet_bdev_ns_enable()
29 ns->device_path, PTR_ERR(ns->bdev)); in nvmet_bdev_ns_enable()
31 ns->bdev = NULL; in nvmet_bdev_ns_enable()
34 ns->size = i_size_read(ns->bdev->bd_inode); in nvmet_bdev_ns_enable()
35 ns->blksize_shift = blksize_bits(bdev_logical_block_size(ns->bdev)); in nvmet_bdev_ns_enable()
39 void nvmet_bdev_ns_disable(struct nvmet_ns *ns) in nvmet_bdev_ns_disable() argument
41 if (ns->bdev) { in nvmet_bdev_ns_disable()
[all …]
/Linux-v4.19/fs/
Dnsfs.c35 struct ns_common *ns = inode->i_private; in ns_prune_dentry() local
36 atomic_long_set(&ns->stashed, 0); in ns_prune_dentry()
49 struct ns_common *ns = inode->i_private; in nsfs_evict() local
51 ns->ops->put(ns); in nsfs_evict()
54 static void *__ns_get_path(struct path *path, struct ns_common *ns) in __ns_get_path() argument
62 d = atomic_long_read(&ns->stashed); in __ns_get_path()
69 ns->ops->put(ns); in __ns_get_path()
78 ns->ops->put(ns); in __ns_get_path()
81 inode->i_ino = ns->inum; in __ns_get_path()
86 inode->i_private = ns; in __ns_get_path()
[all …]
/Linux-v4.19/Documentation/devicetree/bindings/opp/
Dkryo-cpufreq.txt138 clock-latency-ns = <200000>;
144 clock-latency-ns = <200000>;
150 clock-latency-ns = <200000>;
156 clock-latency-ns = <200000>;
162 clock-latency-ns = <200000>;
168 clock-latency-ns = <200000>;
174 clock-latency-ns = <200000>;
180 clock-latency-ns = <200000>;
186 clock-latency-ns = <200000>;
192 clock-latency-ns = <200000>;
[all …]
/Linux-v4.19/include/linux/
Dipc_namespace.h70 struct ns_common ns; member
77 extern void shm_destroy_orphaned(struct ipc_namespace *ns);
79 static inline void shm_destroy_orphaned(struct ipc_namespace *ns) {} in shm_destroy_orphaned() argument
83 extern int mq_init_ns(struct ipc_namespace *ns);
118 static inline int mq_init_ns(struct ipc_namespace *ns) { return 0; } in mq_init_ns() argument
123 struct user_namespace *user_ns, struct ipc_namespace *ns);
125 static inline struct ipc_namespace *get_ipc_ns(struct ipc_namespace *ns) in get_ipc_ns() argument
127 if (ns) in get_ipc_ns()
128 refcount_inc(&ns->count); in get_ipc_ns()
129 return ns; in get_ipc_ns()
[all …]
Duser_namespace.h64 struct ns_common ns; member
83 struct user_namespace *ns; member
91 bool setup_userns_sysctls(struct user_namespace *ns);
92 void retire_userns_sysctls(struct user_namespace *ns);
93 struct ucounts *inc_ucount(struct user_namespace *ns, kuid_t uid, enum ucount_type type);
98 static inline struct user_namespace *get_user_ns(struct user_namespace *ns) in get_user_ns() argument
100 if (ns) in get_user_ns()
101 atomic_inc(&ns->count); in get_user_ns()
102 return ns; in get_user_ns()
107 extern void __put_user_ns(struct user_namespace *ns);
[all …]
/Linux-v4.19/security/keys/
Dpersistent.c24 static int key_create_persistent_register(struct user_namespace *ns) in key_create_persistent_register() argument
35 ns->persistent_keyring_register = reg; in key_create_persistent_register()
44 static key_ref_t key_create_persistent(struct user_namespace *ns, kuid_t uid, in key_create_persistent() argument
50 if (!ns->persistent_keyring_register) { in key_create_persistent()
51 long err = key_create_persistent_register(ns); in key_create_persistent()
55 reg_ref = make_key_ref(ns->persistent_keyring_register, true); in key_create_persistent()
66 ns->persistent_keyring_register); in key_create_persistent()
77 static long key_get_persistent(struct user_namespace *ns, kuid_t uid, in key_get_persistent() argument
89 index_key.desc_len = sprintf(buf, "_persistent.%u", from_kuid(ns, uid)); in key_get_persistent()
91 if (ns->persistent_keyring_register) { in key_get_persistent()
[all …]

12345678910>>...27