| /kernel/linux/linux-5.10/tools/testing/selftests/net/forwarding/ |
| D | fib_offload_lib.sh | 7 local ns=$1; shift 13 ip -n $ns -j -p -$family route show $route \ 29 local ns=$1; shift 34 busywait 5000 __fib_trap_check $ns $family "$route" $should_fail 39 local ns=$1; shift 43 fib_trap_check $ns 4 "$route" $should_fail 48 local ns=$1; shift 52 fib_trap_check $ns 6 "$route" $should_fail 57 local ns=$1; shift 63 ip -n $ns link add name dummy$i type dummy [all …]
|
| /kernel/linux/linux-4.19/security/apparmor/ |
| D | policy_ns.c | 58 * aa_na_name - Find the ns name to display for @view from @curr 72 /* at this point if a ns is visible it is in a view ns in aa_ns_name() 73 * thus the curr ns.hname is a prefix of its name. in aa_ns_name() 93 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() [all …]
|
| /kernel/linux/linux-5.10/security/apparmor/ |
| D | policy_ns.c | 54 * aa_na_name - Find the ns name to display for @view from @curr 68 /* at this point if a ns is visible it is in a view ns in aa_ns_name() 69 * thus the curr ns.hname is a prefix of its name. in aa_ns_name() 89 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() [all …]
|
| /kernel/linux/linux-5.10/drivers/mtd/nand/raw/ |
| D | nandsim.c | 9 * Note: NS means "NAND Simulator". 190 #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 489 DEFINE_SHOW_ATTRIBUTE(ns); 493 * @ns: nandsim device description object 498 static int ns_debugfs_create(struct nandsim *ns) in ns_debugfs_create() argument [all …]
|
| /kernel/linux/linux-4.19/drivers/mtd/nand/raw/ |
| D | nandsim.c | 8 * Note: NS means "NAND Simulator". 203 #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() [all …]
|
| /kernel/linux/linux-4.19/drivers/net/netdevsim/ |
| D | netdev.c | 49 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 …]
|
| D | bpf.c | 30 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 …]
|
| /kernel/linux/linux-4.19/ipc/ |
| D | namespace.c | 22 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 …]
|
| /kernel/linux/linux-5.10/ipc/ |
| D | namespace.c | 22 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_ACCOUNT); 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 …]
|
| /kernel/linux/linux-5.10/kernel/time/ |
| D | namespace.c | 59 static struct ucounts *inc_time_namespaces(struct user_namespace *ns) in inc_time_namespaces() argument 61 return inc_ucount(ns, current_euid(), UCOUNT_TIME_NAMESPACES); in inc_time_namespaces() 81 struct time_namespace *ns; in clone_time_ns() local 91 ns = kmalloc(sizeof(*ns), GFP_KERNEL_ACCOUNT); in clone_time_ns() 92 if (!ns) in clone_time_ns() 95 kref_init(&ns->kref); in clone_time_ns() 97 ns->vvar_page = alloc_page(GFP_KERNEL_ACCOUNT | __GFP_ZERO); in clone_time_ns() 98 if (!ns->vvar_page) in clone_time_ns() 101 err = ns_alloc_inum(&ns->ns); in clone_time_ns() 105 ns->ucounts = ucounts; in clone_time_ns() [all …]
|
| /kernel/linux/linux-5.10/kernel/ |
| D | utsname.c | 20 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() 41 * Clone a new ns copying an original utsname, setting refcount to 1 43 * Return ERR_PTR(-ENOMEM) on error (failure to allocate), new ns otherwise 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() [all …]
|
| D | pid_namespace.c | 61 static struct ucounts *inc_pid_namespaces(struct user_namespace *ns) in inc_pid_namespaces() argument 63 return inc_ucount(ns, current_euid(), UCOUNT_PID_NAMESPACES); in inc_pid_namespaces() 74 struct pid_namespace *ns; in create_pid_namespace() local 91 ns = kmem_cache_zalloc(pid_ns_cachep, GFP_KERNEL); in create_pid_namespace() 92 if (ns == NULL) in create_pid_namespace() 95 idr_init(&ns->idr); in create_pid_namespace() 97 ns->pid_cachep = create_pid_cachep(level); in create_pid_namespace() 98 if (ns->pid_cachep == NULL) in create_pid_namespace() 101 err = ns_alloc_inum(&ns->ns); in create_pid_namespace() 104 ns->ns.ops = &pidns_operations; in create_pid_namespace() [all …]
|
| /kernel/linux/linux-4.19/kernel/ |
| D | utsname.c | 24 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() 45 * Clone a new ns copying an original utsname, setting refcount to 1 47 * Return ERR_PTR(-ENOMEM) on error (failure to allocate), new ns otherwise 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() [all …]
|
| D | pid_namespace.c | 63 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 …]
|
| /kernel/linux/linux-4.19/drivers/block/drbd/ |
| D | drbd_state.c | 38 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); 477 * @ns: new (wanted) state. 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() [all …]
|
| /kernel/linux/linux-5.10/drivers/block/drbd/ |
| D | drbd_state.c | 26 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); 465 * @ns: new (wanted) state. 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() [all …]
|
| /kernel/linux/linux-5.10/arch/arm/boot/dts/ |
| D | omap3430-sdp.dts | 63 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 …]
|
| /kernel/linux/linux-4.19/arch/arm/boot/dts/ |
| D | omap3430-sdp.dts | 66 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 …]
|
| /kernel/linux/linux-5.10/drivers/nvme/host/ |
| D | zns.c | 10 int nvme_revalidate_zones(struct nvme_ns *ns) in nvme_revalidate_zones() argument 12 struct request_queue *q = ns->queue; in nvme_revalidate_zones() 15 ret = blk_revalidate_disk_zones(ns->disk, NULL); in nvme_revalidate_zones() 17 blk_queue_max_zone_append_sectors(q, ns->ctrl->max_zone_append); in nvme_revalidate_zones() 49 int nvme_update_zone_info(struct nvme_ns *ns, unsigned lbaf) in nvme_update_zone_info() argument 51 struct nvme_effects_log *log = ns->head->effects; in nvme_update_zone_info() 52 struct request_queue *q = ns->queue; in nvme_update_zone_info() 60 dev_warn(ns->ctrl->device, in nvme_update_zone_info() 62 ns->head->ns_id); in nvme_update_zone_info() 67 if (!ns->ctrl->max_zone_append) { in nvme_update_zone_info() [all …]
|
| D | multipath.c | 53 void nvme_set_disk_name(char *disk_name, struct nvme_ns *ns, in nvme_set_disk_name() argument 57 sprintf(disk_name, "nvme%dn%d", ctrl->instance, ns->head->instance); in nvme_set_disk_name() 58 } else if (ns->head->disk) { in nvme_set_disk_name() 60 ctrl->instance, ns->head->instance); in nvme_set_disk_name() 64 ns->head->instance); in nvme_set_disk_name() 70 struct nvme_ns *ns = req->q->queuedata; in nvme_failover_req() local 74 nvme_mpath_clear_current_path(ns); in nvme_failover_req() 81 if (nvme_is_ana_error(status) && ns->ctrl->ana_log_buf) { in nvme_failover_req() 82 set_bit(NVME_NS_ANA_PENDING, &ns->flags); in nvme_failover_req() 83 queue_work(nvme_wq, &ns->ctrl->ana_work); in nvme_failover_req() [all …]
|
| /kernel/linux/linux-5.10/drivers/net/netdevsim/ |
| D | udp_tunnels.c | 15 struct netdevsim *ns = netdev_priv(dev); in nsim_udp_tunnel_set_port() local 18 ret = -ns->udp_ports.inject_error; in nsim_udp_tunnel_set_port() 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() 25 if (ns->udp_ports.ports[table][entry]) { in nsim_udp_tunnel_set_port() 29 ns->udp_ports.ports[table][entry] = in nsim_udp_tunnel_set_port() 44 struct netdevsim *ns = netdev_priv(dev); in nsim_udp_tunnel_unset_port() local 47 ret = -ns->udp_ports.inject_error; in nsim_udp_tunnel_unset_port() 48 ns->udp_ports.inject_error = 0; in nsim_udp_tunnel_unset_port() [all …]
|
| D | netdev.c | 31 struct netdevsim *ns = netdev_priv(dev); in nsim_start_xmit() local 33 if (!nsim_ipsec_tx(ns, skb)) in nsim_start_xmit() 36 u64_stats_update_begin(&ns->syncp); in nsim_start_xmit() 37 ns->tx_packets++; in nsim_start_xmit() 38 ns->tx_bytes += skb->len; in nsim_start_xmit() 39 u64_stats_update_end(&ns->syncp); in nsim_start_xmit() 53 struct netdevsim *ns = netdev_priv(dev); in nsim_change_mtu() local 55 if (ns->xdp.prog && new_mtu > NSIM_XDP_MAX_MTU) in nsim_change_mtu() 66 struct netdevsim *ns = netdev_priv(dev); in nsim_get_stats64() local 70 start = u64_stats_fetch_begin(&ns->syncp); in nsim_get_stats64() [all …]
|
| /kernel/linux/linux-4.19/drivers/nvme/host/ |
| D | multipath.c | 61 void nvme_set_disk_name(char *disk_name, struct nvme_ns *ns, in nvme_set_disk_name() argument 65 sprintf(disk_name, "nvme%dn%d", ctrl->instance, ns->head->instance); in nvme_set_disk_name() 66 } else if (ns->head->disk) { in nvme_set_disk_name() 68 ctrl->cntlid, ns->head->instance); in nvme_set_disk_name() 72 ns->head->instance); in nvme_set_disk_name() 78 struct nvme_ns *ns = req->q->queuedata; in nvme_failover_req() local 95 nvme_mpath_clear_current_path(ns); in nvme_failover_req() 96 if (ns->ctrl->ana_log_buf) { in nvme_failover_req() 97 set_bit(NVME_NS_ANA_PENDING, &ns->flags); in nvme_failover_req() 98 queue_work(nvme_wq, &ns->ctrl->ana_work); in nvme_failover_req() [all …]
|
| /kernel/linux/linux-4.19/drivers/nvme/target/ |
| D | io-cmd-file.c | 16 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 …]
|
| /kernel/linux/linux-4.19/kernel/cgroup/ |
| D | namespace.c | 12 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 …]
|