/kernel/linux/linux-5.10/drivers/mtd/nand/raw/ |
H A D | nandsim.c | 190 #define NS_IS_INITIALIZED(ns) ((ns)->geom.totsz != 0) 193 #define NS_STATUS_OK(ns) (NAND_STATUS_READY | (NAND_STATUS_WP * ((ns)->lines.wp == 0))) 196 #define NS_STATUS_FAILED(ns) (NAND_STATUS_FAIL | NS_STATUS_OK(ns)) 199 #define NS_RAW_OFFSET(ns) \ 200 (((ns)->regs.row * (ns)->geom.pgszoob) + (ns) 489 DEFINE_SHOW_ATTRIBUTE(ns); global() variable 498 ns_debugfs_create(struct nandsim *ns) ns_debugfs_create() argument 523 ns_debugfs_remove(struct nandsim *ns) ns_debugfs_remove() argument 534 ns_alloc_device(struct nandsim *ns) ns_alloc_device() argument 606 ns_free_device(struct nandsim *ns) ns_free_device() argument 641 struct nandsim *ns = nand_get_controller_data(chip); ns_init() local 787 ns_free(struct nandsim *ns) ns_free() argument 800 ns_parse_badblocks(struct nandsim *ns, struct mtd_info *mtd) ns_parse_badblocks() argument 1143 ns_accept_addr_byte(struct nandsim *ns, u_char bt) ns_accept_addr_byte() argument 1161 ns_switch_to_ready_state(struct nandsim *ns, u_char status) ns_switch_to_ready_state() argument 1221 ns_find_operation(struct nandsim *ns, uint32_t flag) ns_find_operation() argument 1306 ns_put_pages(struct nandsim *ns) ns_put_pages() argument 1315 ns_get_pages(struct nandsim *ns, struct file *file, size_t count, loff_t pos) ns_get_pages() argument 1346 ns_read_file(struct nandsim *ns, struct file *file, void *buf, size_t count, loff_t pos) ns_read_file() argument 1363 ns_write_file(struct nandsim *ns, struct file *file, void *buf, size_t count, loff_t pos) ns_write_file() argument 1383 NS_GET_PAGE(struct nandsim *ns) NS_GET_PAGE() argument 1391 NS_PAGE_BYTE_OFF(struct nandsim *ns) NS_PAGE_BYTE_OFF() argument 1396 ns_do_read_error(struct nandsim *ns, int num) ns_do_read_error() argument 1408 ns_do_bit_flips(struct nandsim *ns, int num) ns_do_bit_flips() argument 1428 ns_read_page(struct nandsim *ns, int num) ns_read_page() argument 1473 ns_erase_sector(struct nandsim *ns) ns_erase_sector() argument 1501 ns_prog_page(struct nandsim *ns, int num) ns_prog_page() argument 1576 ns_do_state_action(struct nandsim *ns, uint32_t action) ns_do_state_action() argument 1726 ns_switch_state(struct nandsim *ns) ns_switch_state() argument 1877 struct nandsim *ns = nand_get_controller_data(chip); ns_nand_read_byte() local 1938 struct nandsim *ns = nand_get_controller_data(chip); ns_nand_write_byte() local 2096 struct nandsim *ns = nand_get_controller_data(chip); ns_nand_write_buf() local 2123 struct nandsim *ns = nand_get_controller_data(chip); ns_nand_read_buf() local 2173 struct nandsim *ns = nand_get_controller_data(chip); ns_exec_op() local 2261 struct nandsim *ns; ns_init_module() local 2426 struct nandsim *ns = nand_get_controller_data(chip); ns_cleanup_module() local [all...] |
/kernel/linux/linux-6.6/drivers/mtd/nand/raw/ |
H A D | nandsim.c | 189 #define NS_IS_INITIALIZED(ns) ((ns)->geom.totsz != 0) 192 #define NS_STATUS_OK(ns) (NAND_STATUS_READY | (NAND_STATUS_WP * ((ns)->lines.wp == 0))) 195 #define NS_STATUS_FAILED(ns) (NAND_STATUS_FAIL | NS_STATUS_OK(ns)) 198 #define NS_RAW_OFFSET(ns) \ 199 (((ns)->regs.row * (ns)->geom.pgszoob) + (ns) 491 DEFINE_SHOW_ATTRIBUTE(ns); global() variable 500 ns_debugfs_create(struct nandsim *ns) ns_debugfs_create() argument 525 ns_debugfs_remove(struct nandsim *ns) ns_debugfs_remove() argument 536 ns_alloc_device(struct nandsim *ns) ns_alloc_device() argument 608 ns_free_device(struct nandsim *ns) ns_free_device() argument 643 struct nandsim *ns = nand_get_controller_data(chip); ns_init() local 789 ns_free(struct nandsim *ns) ns_free() argument 802 ns_parse_badblocks(struct nandsim *ns, struct mtd_info *mtd) ns_parse_badblocks() argument 1138 ns_accept_addr_byte(struct nandsim *ns, u_char bt) ns_accept_addr_byte() argument 1156 ns_switch_to_ready_state(struct nandsim *ns, u_char status) ns_switch_to_ready_state() argument 1216 ns_find_operation(struct nandsim *ns, uint32_t flag) ns_find_operation() argument 1301 ns_put_pages(struct nandsim *ns) ns_put_pages() argument 1310 ns_get_pages(struct nandsim *ns, struct file *file, size_t count, loff_t pos) ns_get_pages() argument 1341 ns_read_file(struct nandsim *ns, struct file *file, void *buf, size_t count, loff_t pos) ns_read_file() argument 1358 ns_write_file(struct nandsim *ns, struct file *file, void *buf, size_t count, loff_t pos) ns_write_file() argument 1378 NS_GET_PAGE(struct nandsim *ns) NS_GET_PAGE() argument 1386 NS_PAGE_BYTE_OFF(struct nandsim *ns) NS_PAGE_BYTE_OFF() argument 1391 ns_do_read_error(struct nandsim *ns, int num) ns_do_read_error() argument 1403 ns_do_bit_flips(struct nandsim *ns, int num) ns_do_bit_flips() argument 1423 ns_read_page(struct nandsim *ns, int num) ns_read_page() argument 1468 ns_erase_sector(struct nandsim *ns) ns_erase_sector() argument 1496 ns_prog_page(struct nandsim *ns, int num) ns_prog_page() argument 1571 ns_do_state_action(struct nandsim *ns, uint32_t action) ns_do_state_action() argument 1721 ns_switch_state(struct nandsim *ns) ns_switch_state() argument 1865 struct nandsim *ns = nand_get_controller_data(chip); ns_nand_read_byte() local 1926 struct nandsim *ns = nand_get_controller_data(chip); ns_nand_write_byte() local 2084 struct nandsim *ns = nand_get_controller_data(chip); ns_nand_write_buf() local 2111 struct nandsim *ns = nand_get_controller_data(chip); ns_nand_read_buf() local 2161 struct nandsim *ns = nand_get_controller_data(chip); ns_exec_op() local 2264 struct nandsim *ns; ns_init_module() local 2429 struct nandsim *ns = nand_get_controller_data(chip); ns_cleanup_module() local [all...] |
/kernel/linux/linux-5.10/security/apparmor/ |
H A 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 in alloc_ns() 137 aa_free_ns(struct aa_ns *ns) aa_free_ns() argument 164 struct aa_ns *ns = NULL; aa_findn_ns() local 202 struct aa_ns *ns = view; __aa_lookupn_ns() local 233 struct aa_ns *ns = NULL; aa_lookupn_ns() local 245 struct aa_ns *ns; __aa_create_ns() local 285 struct aa_ns *ns; __aa_find_or_create_ns() local 310 struct aa_ns *ns; aa_prepare_ns() local 330 destroy_ns(struct aa_ns *ns) destroy_ns() argument 360 __aa_remove_ns(struct aa_ns *ns) __aa_remove_ns() argument 376 struct aa_ns *ns, *tmp; __ns_list_release() local 404 struct aa_ns *ns = root_ns; aa_free_root_ns() local [all...] |
/kernel/linux/linux-6.6/security/apparmor/ |
H A D | policy_ns.c | 57 * aa_ns_name - Find the ns name to display for @view from @curr 71 /* at this point if a ns is visible it is in a view ns in aa_ns_name() 72 * thus the curr ns.hname is a prefix of its name. in aa_ns_name() 107 struct aa_ns *ns; in alloc_ns() local 109 ns = kzalloc(sizeof(*ns), GFP_KERNEL); in alloc_ns() 110 AA_DEBUG("%s(%p)\n", __func__, ns); in alloc_ns() 111 if (!ns) in alloc_ns() 113 if (!aa_policy_init(&ns in alloc_ns() 148 aa_free_ns(struct aa_ns *ns) aa_free_ns() argument 175 struct aa_ns *ns = NULL; aa_findn_ns() local 213 struct aa_ns *ns = view; __aa_lookupn_ns() local 244 struct aa_ns *ns = NULL; aa_lookupn_ns() local 256 struct aa_ns *ns; __aa_create_ns() local 296 struct aa_ns *ns; __aa_find_or_create_ns() local 321 struct aa_ns *ns; aa_prepare_ns() local 341 destroy_ns(struct aa_ns *ns) destroy_ns() argument 371 __aa_remove_ns(struct aa_ns *ns) __aa_remove_ns() argument 387 struct aa_ns *ns, *tmp; __ns_list_release() local 426 struct aa_ns *ns = root_ns; aa_free_root_ns() local [all...] |
/kernel/linux/linux-5.10/ipc/ |
H A 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 in create_ipc_ns() 79 copy_ipcs(unsigned long flags, struct user_namespace *user_ns, struct ipc_namespace *ns) copy_ipcs() argument 95 free_ipcs(struct ipc_namespace *ns, struct ipc_ids *ids, void (*free)(struct ipc_namespace *, struct kern_ipc_perm *)) free_ipcs() argument 118 free_ipc_ns(struct ipc_namespace *ns) free_ipc_ns() argument 165 put_ipc_ns(struct ipc_namespace *ns) put_ipc_ns() argument 176 to_ipc_ns(struct ns_common *ns) to_ipc_ns() argument 183 struct ipc_namespace *ns = NULL; ipcns_get() local 195 ipcns_put(struct ns_common *ns) ipcns_put() argument 203 struct ipc_namespace *ns = to_ipc_ns(new); ipcns_install() local 213 ipcns_owner(struct ns_common *ns) ipcns_owner() argument [all...] |
/kernel/linux/linux-5.10/tools/testing/selftests/net/forwarding/ |
H A 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 lin [all...] |
/kernel/linux/linux-6.6/tools/testing/selftests/net/forwarding/ |
H A 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 lin [all...] |
/kernel/linux/linux-6.6/ipc/ |
H A D | namespace.c | 28 static struct ucounts *inc_ipc_namespaces(struct user_namespace *ns) in inc_ipc_namespaces() argument 30 return inc_ucount(ns, current_euid(), UCOUNT_IPC_NAMESPACES); in inc_ipc_namespaces() 41 struct ipc_namespace *ns; in create_ipc_ns() local 60 ns = kzalloc(sizeof(struct ipc_namespace), GFP_KERNEL_ACCOUNT); in create_ipc_ns() 61 if (ns == NULL) in create_ipc_ns() 64 err = ns_alloc_inum(&ns->ns); in create_ipc_ns() 67 ns->ns.ops = &ipcns_operations; in create_ipc_ns() 69 refcount_set(&ns in create_ipc_ns() 107 copy_ipcs(unsigned long flags, struct user_namespace *user_ns, struct ipc_namespace *ns) copy_ipcs() argument 123 free_ipcs(struct ipc_namespace *ns, struct ipc_ids *ids, void (*free)(struct ipc_namespace *, struct kern_ipc_perm *)) free_ipcs() argument 146 free_ipc_ns(struct ipc_namespace *ns) free_ipc_ns() argument 198 put_ipc_ns(struct ipc_namespace *ns) put_ipc_ns() argument 209 to_ipc_ns(struct ns_common *ns) to_ipc_ns() argument 216 struct ipc_namespace *ns = NULL; ipcns_get() local 228 ipcns_put(struct ns_common *ns) ipcns_put() argument 236 struct ipc_namespace *ns = to_ipc_ns(new); ipcns_install() local 246 ipcns_owner(struct ns_common *ns) ipcns_owner() argument [all...] |
/kernel/linux/linux-6.6/drivers/net/netdevsim/ |
H A D | ethtool.c | 14 struct netdevsim *ns = netdev_priv(dev); in nsim_get_pause_stats() local 16 if (ns->ethtool.pauseparam.report_stats_rx) in nsim_get_pause_stats() 18 if (ns->ethtool.pauseparam.report_stats_tx) in nsim_get_pause_stats() 25 struct netdevsim *ns = netdev_priv(dev); in nsim_get_pauseparam() local 28 pause->rx_pause = ns->ethtool.pauseparam.rx; in nsim_get_pauseparam() 29 pause->tx_pause = ns->ethtool.pauseparam.tx; in nsim_get_pauseparam() 35 struct netdevsim *ns = netdev_priv(dev); in nsim_set_pauseparam() local 40 ns->ethtool.pauseparam.rx = pause->rx_pause; in nsim_set_pauseparam() 41 ns->ethtool.pauseparam.tx = pause->tx_pause; in nsim_set_pauseparam() 50 struct netdevsim *ns in nsim_get_coalesce() local 61 struct netdevsim *ns = netdev_priv(dev); nsim_set_coalesce() local 72 struct netdevsim *ns = netdev_priv(dev); nsim_get_ringparam() local 82 struct netdevsim *ns = netdev_priv(dev); nsim_set_ringparam() local 94 struct netdevsim *ns = netdev_priv(dev); nsim_get_channels() local 103 struct netdevsim *ns = netdev_priv(dev); nsim_set_channels() local 118 struct netdevsim *ns = netdev_priv(dev); nsim_get_fecparam() local 129 struct netdevsim *ns = netdev_priv(dev); nsim_set_fecparam() local 146 struct netdevsim *ns = netdev_priv(dev); nsim_get_ts_info() local 169 nsim_ethtool_ring_init(struct netdevsim *ns) nsim_ethtool_ring_init() argument 177 nsim_ethtool_init(struct netdevsim *ns) nsim_ethtool_init() argument [all...] |
H A 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 in nsim_get_stats64() 84 struct netdevsim *ns = netdev_priv(dev); nsim_set_vf_mac() local 98 struct netdevsim *ns = netdev_priv(dev); nsim_set_vf_vlan() local 113 struct netdevsim *ns = netdev_priv(dev); nsim_set_vf_rate() local 132 struct netdevsim *ns = netdev_priv(dev); nsim_set_vf_spoofchk() local 144 struct netdevsim *ns = netdev_priv(dev); nsim_set_vf_rss_query_en() local 156 struct netdevsim *ns = netdev_priv(dev); nsim_set_vf_trust() local 169 struct netdevsim *ns = netdev_priv(dev); nsim_get_vf_config() local 192 struct netdevsim *ns = netdev_priv(dev); nsim_set_vf_link_state() local 242 struct netdevsim *ns = netdev_priv(dev); nsim_setup_tc() local 260 struct netdevsim *ns = netdev_priv(dev); nsim_set_features() local 319 nsim_init_netdevsim(struct netdevsim *ns) nsim_init_netdevsim() argument 361 nsim_init_netdevsim_vf(struct netdevsim *ns) nsim_init_netdevsim_vf() argument 372 nsim_exit_netdevsim(struct netdevsim *ns) nsim_exit_netdevsim() argument 382 struct netdevsim *ns; nsim_create() local 413 nsim_destroy(struct netdevsim *ns) nsim_destroy() argument [all...] |
H A 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 in nsim_udp_tunnel_unset_port() 73 struct netdevsim *ns = netdev_priv(dev); nsim_udp_tunnel_sync_table() local 113 struct netdevsim *ns = netdev_priv(dev); nsim_udp_tunnels_info_reset_write() local 133 struct netdevsim *ns = netdev_priv(dev); nsim_udp_tunnels_info_create() local [all...] |
/kernel/linux/linux-6.6/kernel/ |
H A D | pid_namespace.c | 62 static struct ucounts *inc_pid_namespaces(struct user_namespace *ns) in inc_pid_namespaces() argument 64 return inc_ucount(ns, current_euid(), UCOUNT_PID_NAMESPACES); in inc_pid_namespaces() 75 struct pid_namespace *ns; in create_pid_namespace() local 92 ns = kmem_cache_zalloc(pid_ns_cachep, GFP_KERNEL); in create_pid_namespace() 93 if (ns == NULL) in create_pid_namespace() 96 idr_init(&ns->idr); in create_pid_namespace() 98 ns->pid_cachep = create_pid_cachep(level); in create_pid_namespace() 99 if (ns->pid_cachep == NULL) in create_pid_namespace() 102 err = ns_alloc_inum(&ns->ns); in create_pid_namespace() 129 struct pid_namespace *ns = container_of(p, struct pid_namespace, rcu); delayed_free_pidns() local 137 destroy_pid_namespace(struct pid_namespace *ns) destroy_pid_namespace() argument 155 put_pid_ns(struct pid_namespace *ns) put_pid_ns() argument 348 to_pid_ns(struct ns_common *ns) to_pid_ns() argument 355 struct pid_namespace *ns; pidns_get() local 368 struct pid_namespace *ns = NULL; pidns_for_children_get() local 389 pidns_put(struct ns_common *ns) pidns_put() argument 394 pidns_install(struct nsset *nsset, struct ns_common *ns) pidns_install() argument 426 pidns_get_parent(struct ns_common *ns) pidns_get_parent() argument 444 pidns_owner(struct ns_common *ns) pidns_owner() argument [all...] |
H A 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() 36 refcount_set(&uts_ns->ns.count, 1); in create_uts_ns() 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() 106 free_uts_ns(struct uts_namespace *ns) free_uts_ns() argument 114 to_uts_ns(struct ns_common *ns) to_uts_ns() argument 121 struct uts_namespace *ns = NULL; utsns_get() local 135 utsns_put(struct ns_common *ns) utsns_put() argument 143 struct uts_namespace *ns = to_uts_ns(new); utsns_install() local 155 utsns_owner(struct ns_common *ns) utsns_owner() argument [all...] |
/kernel/linux/linux-5.10/kernel/ |
H A 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() 126 struct pid_namespace *ns = container_of(p, struct pid_namespace, rcu); delayed_free_pidns() local 134 destroy_pid_namespace(struct pid_namespace *ns) destroy_pid_namespace() argument 154 struct pid_namespace *ns; free_pid_ns() local 160 put_pid_ns(struct pid_namespace *ns) put_pid_ns() argument 353 to_pid_ns(struct ns_common *ns) to_pid_ns() argument 360 struct pid_namespace *ns; pidns_get() local 373 struct pid_namespace *ns = NULL; pidns_for_children_get() local 394 pidns_put(struct ns_common *ns) pidns_put() argument 399 pidns_install(struct nsset *nsset, struct ns_common *ns) pidns_install() argument 431 pidns_get_parent(struct ns_common *ns) pidns_get_parent() argument 449 pidns_owner(struct ns_common *ns) pidns_owner() argument [all...] |
H A 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 in clone_uts_ns() 108 struct uts_namespace *ns; free_uts_ns() local 117 to_uts_ns(struct ns_common *ns) to_uts_ns() argument 124 struct uts_namespace *ns = NULL; utsns_get() local 138 utsns_put(struct ns_common *ns) utsns_put() argument 146 struct uts_namespace *ns = to_uts_ns(new); utsns_install() local 158 utsns_owner(struct ns_common *ns) utsns_owner() argument [all...] |
/kernel/linux/linux-6.6/kernel/time/ |
H A 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 refcount_set(&ns->ns.count, 1); in clone_time_ns() 97 ns->vvar_page = alloc_page(GFP_KERNEL_ACCOUNT | __GFP_ZERO); in clone_time_ns() 98 if (!ns in clone_time_ns() 179 timens_setup_vdso_data(struct vdso_data *vdata, struct time_namespace *ns) timens_setup_vdso_data() argument 219 timens_set_vvar_page(struct task_struct *task, struct time_namespace *ns) timens_set_vvar_page() argument 247 free_time_ns(struct time_namespace *ns) free_time_ns() argument 256 to_time_ns(struct ns_common *ns) to_time_ns() argument 263 struct time_namespace *ns = NULL; timens_get() local 279 struct time_namespace *ns = NULL; timens_for_children_get() local 293 timens_put(struct ns_common *ns) timens_put() argument 298 timens_commit(struct task_struct *tsk, struct time_namespace *ns) timens_commit() argument 307 struct time_namespace *ns = to_time_ns(new); timens_install() local 329 struct time_namespace *ns = to_time_ns(nsc); timens_on_fork() local 342 timens_owner(struct ns_common *ns) timens_owner() argument 367 struct ns_common *ns; proc_timens_show_offsets() local 383 struct ns_common *ns; proc_timens_set_offset() local [all...] |
/kernel/linux/linux-5.10/kernel/time/ |
H A 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 in clone_time_ns() 179 timens_setup_vdso_data(struct vdso_data *vdata, struct time_namespace *ns) timens_setup_vdso_data() argument 201 timens_set_vvar_page(struct task_struct *task, struct time_namespace *ns) timens_set_vvar_page() argument 231 struct time_namespace *ns; free_time_ns() local 241 to_time_ns(struct ns_common *ns) to_time_ns() argument 248 struct time_namespace *ns = NULL; timens_get() local 264 struct time_namespace *ns = NULL; timens_for_children_get() local 278 timens_put(struct ns_common *ns) timens_put() argument 283 timens_commit(struct task_struct *tsk, struct time_namespace *ns) timens_commit() argument 292 struct time_namespace *ns = to_time_ns(new); timens_install() local 314 struct time_namespace *ns = to_time_ns(nsc); timens_on_fork() local 329 timens_owner(struct ns_common *ns) timens_owner() argument 354 struct ns_common *ns; proc_timens_show_offsets() local 370 struct ns_common *ns; proc_timens_set_offset() local [all...] |
/kernel/linux/linux-6.6/include/linux/ |
H A D | ipc_namespace.h | 58 /* # queues in this ns, protected by mq_lock */ 74 /* user_ns which owns the ipc ns */ 80 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() 142 get_ipc_ns_not_zero(struct ipc_namespace *ns) get_ipc_ns_not_zero() argument 154 copy_ipcs(unsigned long flags, struct user_namespace *user_ns, struct ipc_namespace *ns) copy_ipcs() argument 163 get_ipc_ns(struct ipc_namespace *ns) get_ipc_ns() argument 168 get_ipc_ns_not_zero(struct ipc_namespace *ns) get_ipc_ns_not_zero() argument 173 put_ipc_ns(struct ipc_namespace *ns) put_ipc_ns() argument 185 retire_mq_sysctls(struct ipc_namespace *ns) retire_mq_sysctls() argument 189 setup_mq_sysctls(struct ipc_namespace *ns) setup_mq_sysctls() argument 203 retire_ipc_sysctls(struct ipc_namespace *ns) retire_ipc_sysctls() argument 207 setup_ipc_sysctls(struct ipc_namespace *ns) setup_ipc_sysctls() argument [all...] |
/kernel/linux/linux-5.10/drivers/block/drbd/ |
H A 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() 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 in cl_wide_st_chg() 467 cl_wide_st_chg(struct drbd_device *device, union drbd_state os, union drbd_state ns) cl_wide_st_chg() argument 483 union drbd_state ns; apply_mask_val() local 493 union drbd_state ns; drbd_change_state() local 520 union drbd_state os, ns; _req_st_cond() local 568 union drbd_state os, ns; drbd_req_state() local 715 print_st(struct drbd_device *device, const char *name, union drbd_state ns) print_st() argument 733 print_st_err(struct drbd_device *device, union drbd_state os, union drbd_state ns, enum drbd_state_rv err) print_st_err() argument 743 print_state_change(char *pb, union drbd_state os, union drbd_state ns, enum chg_state_flags flags) print_state_change() argument 774 drbd_pr_state_change(struct drbd_device *device, union drbd_state os, union drbd_state ns, enum chg_state_flags flags) drbd_pr_state_change() argument 799 conn_pr_state_change(struct drbd_connection *connection, union drbd_state os, union drbd_state ns, enum chg_state_flags flags) conn_pr_state_change() argument 823 is_valid_state(struct drbd_device *device, union drbd_state ns) is_valid_state() argument 912 is_valid_soft_transition(union drbd_state os, union drbd_state ns, struct drbd_connection *connection) is_valid_soft_transition() argument 1014 is_valid_transition(union drbd_state os, union drbd_state ns) is_valid_transition() argument 1052 sanitize_state(struct drbd_device *device, union drbd_state os, union drbd_state ns, enum sanitize_state_warnings *warn) sanitize_state() argument 1261 _drbd_set_state(struct drbd_device *device, union drbd_state ns, enum chg_state_flags flags, struct completion *done) _drbd_set_state() argument 1674 lost_contact_to_peer_data(enum drbd_disk_state os, enum drbd_disk_state ns) lost_contact_to_peer_data() argument 1700 after_state_ch(struct drbd_device *device, union drbd_state os, union drbd_state ns, enum chg_state_flags flags, struct drbd_state_change *state_change) after_state_ch() argument 2155 union drbd_state ns, os; conn_is_valid_transition() local 2197 union drbd_state ns, os, ns_max = { }; conn_set_state() local [all...] |
/kernel/linux/linux-6.6/drivers/block/drbd/ |
H A 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() 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 in cl_wide_st_chg() 467 cl_wide_st_chg(struct drbd_device *device, union drbd_state os, union drbd_state ns) cl_wide_st_chg() argument 483 union drbd_state ns; apply_mask_val() local 493 union drbd_state ns; drbd_change_state() local 520 union drbd_state os, ns; _req_st_cond() local 568 union drbd_state os, ns; drbd_req_state() local 715 print_st(struct drbd_device *device, const char *name, union drbd_state ns) print_st() argument 733 print_st_err(struct drbd_device *device, union drbd_state os, union drbd_state ns, enum drbd_state_rv err) print_st_err() argument 743 print_state_change(char *pb, union drbd_state os, union drbd_state ns, enum chg_state_flags flags) print_state_change() argument 774 drbd_pr_state_change(struct drbd_device *device, union drbd_state os, union drbd_state ns, enum chg_state_flags flags) drbd_pr_state_change() argument 799 conn_pr_state_change(struct drbd_connection *connection, union drbd_state os, union drbd_state ns, enum chg_state_flags flags) conn_pr_state_change() argument 823 is_valid_state(struct drbd_device *device, union drbd_state ns) is_valid_state() argument 912 is_valid_soft_transition(union drbd_state os, union drbd_state ns, struct drbd_connection *connection) is_valid_soft_transition() argument 1014 is_valid_transition(union drbd_state os, union drbd_state ns) is_valid_transition() argument 1052 sanitize_state(struct drbd_device *device, union drbd_state os, union drbd_state ns, enum sanitize_state_warnings *warn) sanitize_state() argument 1263 _drbd_set_state(struct drbd_device *device, union drbd_state ns, enum chg_state_flags flags, struct completion *done) _drbd_set_state() argument 1677 lost_contact_to_peer_data(enum drbd_disk_state os, enum drbd_disk_state ns) lost_contact_to_peer_data() argument 1704 after_state_ch(struct drbd_device *device, union drbd_state os, union drbd_state ns, enum chg_state_flags flags, struct drbd_state_change *state_change) after_state_ch() argument 2160 union drbd_state ns, os; conn_is_valid_transition() local 2202 union drbd_state ns, os, ns_max = { }; conn_set_state() local [all...] |
/kernel/linux/linux-5.10/drivers/net/netdevsim/ |
H A 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 in nsim_udp_tunnel_unset_port() 73 struct netdevsim *ns = netdev_priv(dev); nsim_udp_tunnel_sync_table() local 113 struct netdevsim *ns = netdev_priv(dev); nsim_udp_tunnels_info_reset_write() local 133 struct netdevsim *ns = netdev_priv(dev); nsim_udp_tunnels_info_create() local [all...] |
/kernel/linux/linux-6.6/drivers/nvme/host/ |
H A 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() 14 blk_queue_chunk_sectors(q, ns->zsze); in nvme_revalidate_zones() 15 blk_queue_max_zone_append_sectors(q, ns->ctrl->max_zone_append); in nvme_revalidate_zones() 17 return blk_revalidate_disk_zones(ns->disk, NULL); in nvme_revalidate_zones() 48 int nvme_update_zone_info(struct nvme_ns *ns, unsigned lbaf) in nvme_update_zone_info() argument 50 struct nvme_effects_log *log = ns->head->effects; in nvme_update_zone_info() 51 struct request_queue *q = ns->queue; in nvme_update_zone_info() 59 if (test_and_clear_bit(NVME_NS_FORCE_RO, &ns->flags)) in nvme_update_zone_info() 60 dev_warn(ns in nvme_update_zone_info() 120 nvme_zns_alloc_report_buffer(struct nvme_ns *ns, unsigned int nr_zones, size_t *buflen) nvme_zns_alloc_report_buffer() argument 150 nvme_zone_parse_entry(struct nvme_ns *ns, struct nvme_zone_descriptor *entry, unsigned int idx, report_zones_cb cb, void *data) nvme_zone_parse_entry() argument 176 nvme_ns_report_zones(struct nvme_ns *ns, sector_t sector, unsigned int nr_zones, report_zones_cb cb, void *data) nvme_ns_report_zones() argument 235 nvme_setup_zone_mgmt_send(struct nvme_ns *ns, struct request *req, struct nvme_command *c, enum nvme_zone_mgmt_action action) nvme_setup_zone_mgmt_send() argument [all...] |
H A D | multipath.c | 85 struct nvme_ns *ns = req->q->queuedata; in nvme_failover_req() local 90 nvme_mpath_clear_current_path(ns); in nvme_failover_req() 97 if (nvme_is_ana_error(status) && ns->ctrl->ana_log_buf) { in nvme_failover_req() 98 set_bit(NVME_NS_ANA_PENDING, &ns->flags); in nvme_failover_req() 99 queue_work(nvme_wq, &ns->ctrl->ana_work); in nvme_failover_req() 102 spin_lock_irqsave(&ns->head->requeue_lock, flags); in nvme_failover_req() 104 bio_set_dev(bio, ns->head->disk->part0); in nvme_failover_req() 118 blk_steal_bios(&ns->head->requeue_list, req); in nvme_failover_req() 119 spin_unlock_irqrestore(&ns->head->requeue_lock, flags); in nvme_failover_req() 122 kblockd_schedule_work(&ns in nvme_failover_req() 127 struct nvme_ns *ns = rq->q->queuedata; nvme_mpath_start_request() local 141 struct nvme_ns *ns = rq->q->queuedata; nvme_mpath_end_request() local 152 struct nvme_ns *ns; nvme_kick_requeue_lists() local 174 nvme_mpath_clear_current_path(struct nvme_ns *ns) nvme_mpath_clear_current_path() argument 195 struct nvme_ns *ns; nvme_mpath_clear_ctrl_paths() local 205 nvme_mpath_revalidate_paths(struct nvme_ns *ns) nvme_mpath_revalidate_paths() argument 224 nvme_path_is_disabled(struct nvme_ns *ns) nvme_path_is_disabled() argument 243 struct nvme_ns *found = NULL, *fallback = NULL, *ns; __nvme_find_path() local 279 nvme_next_ns(struct nvme_ns_head *head, struct nvme_ns *ns) nvme_next_ns() argument 292 struct nvme_ns *ns, *found = NULL; nvme_round_robin_path() local 332 nvme_path_is_optimized(struct nvme_ns *ns) nvme_path_is_optimized() argument 341 struct nvme_ns *ns; nvme_find_path() local 356 struct nvme_ns *ns; nvme_available_path() local 378 struct nvme_ns *ns; nvme_ns_head_submit_bio() local 430 struct nvme_ns *ns; nvme_ns_head_report_zones() local 567 nvme_mpath_set_live(struct nvme_ns *ns) nvme_mpath_set_live() argument 654 nvme_update_ns_ana_state(struct nvme_ana_group_desc *desc, struct nvme_ns *ns) nvme_update_ns_ana_state() argument 679 struct nvme_ns *ns; nvme_update_ana_state() local 828 struct nvme_ns *ns = nvme_get_ns_from_dev(dev); ana_state_show() local 846 nvme_mpath_add_disk(struct nvme_ns *ns, __le32 anagrpid) nvme_mpath_add_disk() argument [all...] |
/kernel/linux/linux-5.10/drivers/nvme/host/ |
H A 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 in nvme_update_zone_info() 116 nvme_zns_alloc_report_buffer(struct nvme_ns *ns, unsigned int nr_zones, size_t *buflen) nvme_zns_alloc_report_buffer() argument 146 nvme_zone_parse_entry(struct nvme_ns *ns, struct nvme_zone_descriptor *entry, unsigned int idx, report_zones_cb cb, void *data) nvme_zone_parse_entry() argument 169 nvme_ns_report_zones(struct nvme_ns *ns, sector_t sector, unsigned int nr_zones, report_zones_cb cb, void *data) nvme_ns_report_zones() argument 229 struct nvme_ns *ns; nvme_report_zones() local 245 nvme_setup_zone_mgmt_send(struct nvme_ns *ns, struct request *req, struct nvme_command *c, enum nvme_zone_mgmt_action action) nvme_setup_zone_mgmt_send() argument [all...] |
/kernel/linux/linux-6.6/kernel/cgroup/ |
H A 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() 35 refcount_set(&new_ns->ns.count, 1); 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 in free_cgroup_ns() 93 to_cg_ns(struct ns_common *ns) to_cg_ns() argument 98 cgroupns_install(struct nsset *nsset, struct ns_common *ns) cgroupns_install() argument 120 struct cgroup_namespace *ns = NULL; cgroupns_get() local 134 cgroupns_put(struct ns_common *ns) cgroupns_put() argument 139 cgroupns_owner(struct ns_common *ns) cgroupns_owner() argument [all...] |