/linux/drivers/mtd/nand/raw/ |
A D | nandsim.c | 656 ns->geom.pgszoob = ns->geom.pgsz + ns->geom.oobsz; in ns_init() 662 ns->geom.secszoob = ns->geom.secsz + ns->geom.oobsz * ns->geom.pgsec; in ns_init() 1270 ns->state = ns->op[ns->stateidx]; in ns_find_operation() 1271 ns->nxstate = ns->op[ns->stateidx + 1]; in ns_find_operation() 1300 ns->pstates[ns->npstates++] = ns->state; in ns_find_operation() 1440 ns->regs.row, ns->regs.column + ns->regs.off); in ns_read_page() 1461 ns->regs.row, ns->regs.column + ns->regs.off); in ns_read_page() 1682 num, ns->regs.row, ns->regs.column, NS_RAW_OFFSET(ns) + ns->regs.off); in ns_do_state_action() 1735 ns->nxstate = ns->op[ns->stateidx + 1]; in ns_switch_state() 1805 ns->nxstate = ns->op[++ns->stateidx + 1]; in ns_switch_state() [all …]
|
/linux/tools/testing/selftests/net/forwarding/ |
A D | fib_offload_lib.sh | 7 local ns=$1; shift 29 local ns=$1; shift 39 local ns=$1; shift 48 local ns=$1; shift 57 local ns=$1; shift 91 local ns=$1; shift 120 local ns=$1; shift 149 local ns=$1; shift 186 local ns=$1; shift 219 local ns=$1; shift [all …]
|
/linux/security/apparmor/ |
A D | policy_ns.c | 91 ns = kzalloc(sizeof(*ns), GFP_KERNEL); in alloc_ns() 93 if (!ns) in alloc_ns() 115 ns->unconfined->ns = ns; in alloc_ns() 139 if (!ns) in aa_free_ns() 146 ns->unconfined->ns = NULL; in aa_free_ns() 253 if (!ns) in __aa_create_ns() 256 mutex_lock_nested(&ns->lock, ns->level); in __aa_create_ns() 292 if (!ns) in __aa_find_or_create_ns() 316 if (!ns) in aa_prepare_ns() 332 if (!ns) in destroy_ns() [all …]
|
A D | policy.c | 467 if (!ns) in aa_fqlookupn_profile() 474 else if (ns) in aa_fqlookupn_profile() 546 profile->ns = aa_get_ns(parent->ns); in aa_new_null_profile() 550 mutex_lock_nested(&profile->ns->lock, profile->ns->level); in aa_new_null_profile() 666 if (!ns) in aa_policy_view_capable() 946 ns = NULL; in aa_replace_profiles() 953 mutex_lock_nested(&ns->lock, ns->level); in aa_replace_profiles() 988 ent->new->ns = aa_get_ns(ns); in aa_replace_profiles() 1157 if (!ns) { in aa_remove_profiles() 1168 mutex_lock_nested(&ns->parent->lock, ns->level); in aa_remove_profiles() [all …]
|
/linux/ipc/ |
A D | namespace.c | 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->ns.count, 1); in create_ipc_ns() 66 return ns; in create_ipc_ns() 70 ns_free_inum(&ns->ns); in create_ipc_ns() 72 kfree(ns); in create_ipc_ns() 130 ns_free_inum(&ns->ns); in free_ipc_ns() 131 kfree(ns); in free_ipc_ns() 167 if (refcount_dec_and_lock(&ns->ns.count, &mq_lock)) { in put_ipc_ns() 178 return container_of(ns, struct ipc_namespace, ns); in to_ipc_ns() [all …]
|
/linux/kernel/time/ |
A D | namespace.c | 91 ns = kmalloc(sizeof(*ns), GFP_KERNEL_ACCOUNT); in clone_time_ns() 92 if (!ns) in clone_time_ns() 95 refcount_set(&ns->ns.count, 1); in clone_time_ns() 101 err = ns_alloc_inum(&ns->ns); in clone_time_ns() 106 ns->ns.ops = &timens_operations; in clone_time_ns() 110 return ns; in clone_time_ns() 115 kfree(ns); in clone_time_ns() 233 ns_free_inum(&ns->ns); in free_time_ns() 256 return ns ? &ns->ns : NULL; in timens_get() 272 return ns ? &ns->ns : NULL; in timens_for_children_get() [all …]
|
/linux/drivers/net/netdevsim/ |
A D | ethtool.c | 52 memcpy(coal, &ns->ethtool.coalesce, sizeof(ns->ethtool.coalesce)); in nsim_get_coalesce() 63 memcpy(&ns->ethtool.coalesce, coal, sizeof(ns->ethtool.coalesce)); in nsim_set_coalesce() 72 memcpy(ring, &ns->ethtool.ring, sizeof(ns->ethtool.ring)); in nsim_get_ringparam() 116 if (ns->ethtool.get_err) in nsim_get_fecparam() 117 return -ns->ethtool.get_err; in nsim_get_fecparam() 118 memcpy(fecparam, &ns->ethtool.fec, sizeof(ns->ethtool.fec)); in nsim_get_fecparam() 128 if (ns->ethtool.set_err) in nsim_set_fecparam() 129 return -ns->ethtool.set_err; in nsim_set_fecparam() 130 memcpy(&ns->ethtool.fec, fecparam, sizeof(ns->ethtool.fec)); in nsim_set_fecparam() 168 nsim_ethtool_ring_init(ns); in nsim_ethtool_init() [all …]
|
A D | netdev.c | 37 ns->tx_packets++; in nsim_start_xmit() 38 ns->tx_bytes += skb->len; in nsim_start_xmit() 224 ns, ns, true); in nsim_setup_tc() 306 err = nsim_udp_tunnels_info_create(ns->nsim_dev, ns->netdev); in nsim_init_netdevsim() 315 nsim_ipsec_init(ns); in nsim_init_netdevsim() 325 nsim_bpf_uninit(ns); in nsim_init_netdevsim() 347 struct netdevsim *ns; in nsim_create() local 356 ns = netdev_priv(dev); in nsim_create() 357 ns->netdev = dev; in nsim_create() 370 return ns; in nsim_create() [all …]
|
A D | udp_tunnels.c | 19 ns->udp_ports.inject_error = 0; in nsim_udp_tunnel_set_port() 21 if (ns->udp_ports.sleep) in nsim_udp_tunnel_set_port() 22 msleep(ns->udp_ports.sleep); in nsim_udp_tunnel_set_port() 50 if (ns->udp_ports.sleep) in nsim_udp_tunnel_unset_port() 51 msleep(ns->udp_ports.sleep); in nsim_udp_tunnel_unset_port() 115 memset(ns->udp_ports.ports, 0, sizeof(ns->udp_ports.__ports)); in nsim_udp_tunnels_info_reset_write() 143 ns->udp_ports.ports = ns->udp_ports.__ports; in nsim_udp_tunnels_info_create() 151 ns->udp_ports.dfs_ports[0].array = ns->udp_ports.ports[0]; in nsim_udp_tunnels_info_create() 154 ns->nsim_dev_port->ddir, in nsim_udp_tunnels_info_create() 157 ns->udp_ports.dfs_ports[1].array = ns->udp_ports.ports[1]; in nsim_udp_tunnels_info_create() [all …]
|
A D | bpf.c | 41 struct netdevsim *ns; member 89 return ns->xdp_hw.prog; in nsim_xdp_offload_active() 111 ns->bpf_offloaded = prog; in nsim_bpf_offload() 175 if (ns->bpf_offloaded && !nsim_xdp_offload_active(ns)) in nsim_bpf_disable_tc() 184 if (!nsim_xdp_offload_active(ns) && bpf->prog && ns->bpf_offloaded) { in nsim_xdp_offload_prog() 189 return nsim_bpf_offload(ns, bpf->prog, nsim_xdp_offload_active(ns)); in nsim_xdp_offload_prog() 504 nmap->ns = ns; in nsim_bpf_map_alloc() 562 return nsim_xdp_set_prog(ns, bpf, &ns->xdp); in nsim_bpf() 568 return nsim_xdp_set_prog(ns, bpf, &ns->xdp_hw); in nsim_bpf() 623 ns->netdev); in nsim_bpf_init() [all …]
|
/linux/kernel/ |
A D | pid_namespace.c | 101 err = ns_alloc_inum(&ns->ns); in create_pid_namespace() 104 ns->ns.ops = &pidns_operations; in create_pid_namespace() 106 refcount_set(&ns->ns.count, 1); in create_pid_namespace() 113 return ns; in create_pid_namespace() 136 ns_free_inum(&ns->ns); in destroy_pid_namespace() 158 if (!refcount_dec_and_test(&ns->ns.count)) in put_pid_ns() 331 return container_of(ns, struct pid_namespace, ns); in to_pid_ns() 340 if (ns) in pidns_get() 344 return ns ? &ns->ns : NULL; in pidns_get() 358 if (ns) { in pidns_for_children_get() [all …]
|
A D | utsname.c | 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() 67 ns->ns.ops = &utsns_operations; in clone_uts_ns() 70 memcpy(&ns->name, &old_ns->name, sizeof(ns->name)); in clone_uts_ns() 73 return ns; in clone_uts_ns() 110 ns_free_inum(&ns->ns); in free_uts_ns() 116 return container_of(ns, struct uts_namespace, ns); in to_uts_ns() 128 get_uts_ns(ns); in utsns_get() 132 return ns ? &ns->ns : NULL; in utsns_get() [all …]
|
A D | user_namespace.c | 106 if (!ns) in create_user_ns() 110 ret = ns_alloc_inum(&ns->ns); in create_user_ns() 113 ns->ns.ops = &userns_operations; in create_user_ns() 115 refcount_set(&ns->ns.count, 1); in create_user_ns() 150 ns_free_inum(&ns->ns); in create_user_ns() 201 ns_free_inum(&ns->ns); in free_user_ns() 1101 if ((seq_ns != ns) && (seq_ns != ns->parent)) in proc_uid_map_write() 1105 &ns->uid_map, &ns->parent->uid_map); in proc_uid_map_write() 1122 &ns->gid_map, &ns->parent->gid_map); in proc_gid_map_write() 1287 for (ns = child; ns->level > ancestor->level; ns = ns->parent) in in_userns() [all …]
|
/linux/tools/testing/selftests/net/ |
A D | unicast_extensions.sh | 76 nettest -B -N bar-ns -O foo-ns -r $1 || return 1 77 nettest -B -N foo-ns -O bar-ns -r $2 || return 1 114 nettest -B -N bar-ns -O foo-ns -r $1 || return 1 115 nettest -B -N foo-ns -O bar-ns -r $4 || return 1 124 ip netns add foo-ns 125 ip netns add bar-ns 126 ip link add foo netns foo-ns type veth peer name bar netns bar-ns 133 ip netns del foo-ns 134 ip netns del bar-ns 150 ip netns add foo-ns [all …]
|
/linux/drivers/block/drbd/ |
A D | drbd_state.c | 857 ns.role == R_PRIMARY && ns.conn < C_CONNECTED && ns.pdsk >= D_UNKNOWN) in is_valid_state() 1078 if (ns.conn == C_STANDALONE && ns.disk == D_DISKLESS && ns.role == R_SECONDARY) in sanitize_state() 1083 if (ns.conn > C_CONNECTED && (ns.disk <= D_FAILED || ns.pdsk <= D_FAILED)) { in sanitize_state() 1194 (ns.role == R_PRIMARY && ns.conn < C_CONNECTED && ns.pdsk > D_OUTDATED) && in sanitize_state() 1203 if (ns.aftr_isp || ns.peer_isp || ns.user_isp) { in sanitize_state() 1274 ns = sanitize_state(device, os, ns, &ssw); in _drbd_set_state() 1472 ascw->ns = ns; in _drbd_set_state() 1677 && (ns < D_INCONSISTENT || ns == D_UNKNOWN || ns == D_OUTDATED)) in lost_contact_to_peer_data() 1687 && (ns == D_DISKLESS || ns == D_FAILED || ns == D_OUTDATED)) in lost_contact_to_peer_data() 1714 sib.ns = ns; in after_state_ch() [all …]
|
/linux/drivers/nvme/host/ |
A D | multipath.c | 63 ns->ctrl->instance, ns->head->instance); in nvme_mpath_set_disk_name() 232 if (ns) in nvme_next_ns() 233 return ns; in nvme_next_ns() 249 ns && ns != old; in nvme_round_robin_path() 250 ns = nvme_next_ns(head, ns)) { in nvme_round_robin_path() 255 found = ns; in nvme_round_robin_path() 259 found = ns; in nvme_round_robin_path() 299 return ns; in nvme_find_path() 382 if (ns) in nvme_ns_head_report_zones() 800 if (blk_queue_is_zoned(ns->queue) && ns->head->disk) in nvme_mpath_add_disk() [all …]
|
A D | zns.c | 61 dev_warn(ns->ctrl->device, in nvme_update_zone_info() 63 ns->head->ns_id); in nvme_update_zone_info() 66 dev_warn(ns->ctrl->device, in nvme_update_zone_info() 68 ns->head->ns_id); in nvme_update_zone_info() 96 dev_warn(ns->ctrl->device, in nvme_update_zone_info() 103 ns->zsze = nvme_lba_to_sect(ns, le64_to_cpu(id->lbafe[lbaf].zsze)); in nvme_update_zone_info() 105 dev_warn(ns->ctrl->device, in nvme_update_zone_info() 107 ns->zsze, ns->head->ns_id); in nvme_update_zone_info() 132 get_capacity(ns->disk) >> ilog2(ns->zsze)); in nvme_zns_alloc_report_buffer() 166 zone.len = ns->zsze; in nvme_zone_parse_entry() [all …]
|
/linux/arch/arm/boot/dts/ |
A D | omap3430-sdp.dts | 63 gpmc,cs-on-ns = <0>; 66 gpmc,adv-on-ns = <12>; 69 gpmc,oe-on-ns = <54>; 70 gpmc,oe-off-ns = <168>; 71 gpmc,we-on-ns = <54>; 113 gpmc,cs-on-ns = <0>; 116 gpmc,adv-on-ns = <6>; 119 gpmc,oe-on-ns = <6>; 121 gpmc,we-on-ns = <6>; 159 gpmc,cs-on-ns = <0>; [all …]
|
A D | tegra30-cpu-opp.dtsi | 9 clock-latency-ns = <100000>; 15 clock-latency-ns = <100000>; 21 clock-latency-ns = <100000>; 27 clock-latency-ns = <100000>; 33 clock-latency-ns = <100000>; 39 clock-latency-ns = <100000>; 45 clock-latency-ns = <100000>; 52 clock-latency-ns = <100000>; 59 clock-latency-ns = <100000>; 66 clock-latency-ns = <100000>; [all …]
|
A D | tegra20-cpu-opp.dtsi | 9 clock-latency-ns = <400000>; 16 clock-latency-ns = <400000>; 23 clock-latency-ns = <400000>; 29 clock-latency-ns = <400000>; 35 clock-latency-ns = <400000>; 41 clock-latency-ns = <400000>; 48 clock-latency-ns = <400000>; 54 clock-latency-ns = <400000>; 60 clock-latency-ns = <400000>; 66 clock-latency-ns = <400000>; [all …]
|
/linux/include/linux/ |
A D | ipc_namespace.h | 72 struct ns_common ns; member 85 extern int mq_init_ns(struct ipc_namespace *ns); 129 if (ns) in get_ipc_ns() 130 refcount_inc(&ns->ns.count); in get_ipc_ns() 131 return ns; in get_ipc_ns() 136 if (ns) { in get_ipc_ns_not_zero() 137 if (refcount_inc_not_zero(&ns->ns.count)) in get_ipc_ns_not_zero() 138 return ns; in get_ipc_ns_not_zero() 152 return ns; in copy_ipcs() 157 return ns; in get_ipc_ns() [all …]
|
/linux/kernel/cgroup/ |
A D | namespace.c | 30 ret = ns_alloc_inum(&new_ns->ns); in alloc_cgroup_ns() 42 put_css_set(ns->root_cset); 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() 95 return container_of(ns, struct cgroup_namespace, ns); in to_cg_ns() 126 ns = nsproxy->cgroup_ns; in cgroupns_get() 127 get_cgroup_ns(ns); in cgroupns_get() 131 return ns ? &ns->ns : NULL; in cgroupns_get() 136 put_cgroup_ns(to_cg_ns(ns)); in cgroupns_put() [all …]
|
/linux/tools/testing/selftests/drivers/net/mlxsw/ |
A D | fib.sh | 96 local ns="testns1" 100 ip -n $ns link add name dummy1 type dummy 101 ip -n $ns link set dev dummy1 up 103 ip -n $ns route add table local 192.0.2.1/32 dev dummy1 107 ip -n $ns route add table main 192.0.2.1/32 dev dummy1 115 ip -n $ns route add table main 192.0.2.2/32 dev dummy1 128 ip -n $ns link del dev dummy1 193 local ns="testns1" 197 ip -n $ns link add name dummy1 type dummy 198 ip -n $ns link set dev dummy1 up [all …]
|
/linux/drivers/nvme/target/ |
A D | io-cmd-file.c | 25 ns->size = stat.size; in nvmet_file_ns_revalidate() 31 if (ns->file) { in nvmet_file_ns_disable() 32 if (ns->buffered_io) in nvmet_file_ns_disable() 35 ns->bvec_pool = NULL; in nvmet_file_ns_disable() 38 fput(ns->file); in nvmet_file_ns_disable() 39 ns->file = NULL; in nvmet_file_ns_disable() 48 if (!ns->buffered_io) in nvmet_file_ns_enable() 51 ns->file = filp_open(ns->device_path, flags, 0); in nvmet_file_ns_enable() 56 ns->file = NULL; in nvmet_file_ns_enable() 82 if (!ns->bvec_pool) { in nvmet_file_ns_enable() [all …]
|
/linux/fs/ |
A D | nsfs.c | 55 ns->ops->put(ns); in nsfs_evict() 73 ns->ops->put(ns); in __ns_get_path() 82 ns->ops->put(ns); in __ns_get_path() 90 inode->i_private = ns; in __ns_get_path() 116 if (!ns) in ns_get_path_cb() 202 return open_related_ns(ns, ns->ops->get_parent); in ns_ioctl() 204 return ns->ops->type; in ns_ioctl() 208 user_ns = container_of(ns, struct user_namespace, ns); in ns_ioctl() 220 struct ns_common *ns; in ns_get_name() local 224 if (ns) { in ns_get_name() [all …]
|