| /linux/tools/testing/selftests/net/forwarding/ |
| H A D | fib_offload_lib.sh | 1 # SPDX-License-Identifier: GPL-2.0 7 local ns=$1; shift 13 ip -n $ns -j -p -$family route show $route \ 14 | jq -e '.[]["flags"] | contains(["trap"])' &> /dev/null 17 if [[ $ret -ne 0 ]]; then 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 [all …]
|
| /linux/drivers/mtd/nand/raw/ |
| H A D | nandsim.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 9 * Note: NS means "NAND Simulator". 142 MODULE_PARM_DESC(bus_width, "Chip's bus width (8- or 16-bit)"); 143 MODULE_PARM_DESC(do_delays, "Simulate NAND delays using busy-waits if not zero"); 165 "be correctable in 512-byte blocks"); 182 /* Busy-wait delay macros (microseconds, milliseconds) */ 189 #define NS_IS_INITIALIZED(ns) ((ns)->geom.totsz != 0) argument 192 #define NS_STATUS_OK(ns) (NAND_STATUS_READY | (NAND_STATUS_WP * ((ns)->lines.wp == 0))) argument 195 #define NS_STATUS_FAILED(ns) (NAND_STATUS_FAIL | NS_STATUS_OK(ns)) argument 198 #define NS_RAW_OFFSET(ns) \ argument [all …]
|
| /linux/security/apparmor/ |
| H A D | policy_ns.c | 1 // SPDX-License-Identifier: GPL-2.0-only 7 * Copyright (C) 1998-2008 Novell/SUSE 8 * Copyright 2009-2017 Canonical Ltd. 30 const char *aa_hidden_ns_name = "---"; 33 * aa_ns_visible - test if @view is visible from @curr 48 for ( ; view; view = view->parent) { in aa_ns_visible() 49 if (view->parent == curr) in aa_ns_visible() 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() [all …]
|
| /linux/drivers/net/netdevsim/ |
| H A D | netdev.c | 5 * June 1991 as shown in the file COPYING in the top-level directory of this 42 struct netdevsim *ns = netdev_priv(dev); in nsim_start_peer_tx_queue() local 48 idx = rq->napi.index; in nsim_start_peer_tx_queue() 50 peer_ns = rcu_dereference(ns->peer); in nsim_start_peer_tx_queue() 55 peer_dev = peer_ns->netdev; in nsim_start_peer_tx_queue() 56 if (dev->real_num_tx_queues != peer_dev->num_rx_queues) in nsim_start_peer_tx_queue() 76 if (rx_dev->real_num_tx_queues != tx_dev->num_rx_queues) in nsim_stop_tx_queue() 81 NSIM_RING_SIZE - skb_queue_len(&rq->skb_queue), in nsim_stop_tx_queue() 88 if (skb_queue_len(&rq->skb_queue) > NSIM_RING_SIZE) { in nsim_napi_rx() 93 skb_queue_tail(&rq->skb_queue, skb); in nsim_napi_rx() [all …]
|
| H A D | psp.c | 1 // SPDX-License-Identifier: GPL-2.0 18 nsim_do_psp(struct sk_buff *skb, struct netdevsim *ns, in nsim_do_psp() argument 40 if (*ptr != ns) { in nsim_do_psp() 45 net = sock_net(skb->sk); in nsim_do_psp() 46 if (!psp_dev_encapsulate(net, skb, pas->tx.spi, pas->version, 0)) { in nsim_do_psp() 52 peer_psd = rcu_dereference(peer_ns->psp.dev); in nsim_do_psp() 53 if (peer_psd && peer_psd->config.versions & (1 << pas->version)) { in nsim_do_psp() 62 generation = pas->tx.key[0]; in nsim_do_psp() 65 skb->mac_len = ETH_HLEN; in nsim_do_psp() 66 if (psp_dev_rcv(skb, peer_psd->id, generation, strip_icv)) { in nsim_do_psp() [all …]
|
| H A D | udp_tunnels.c | 1 // SPDX-License-Identifier: GPL-2.0-only 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() 22 if (ns->udp_ports.ports[table][entry]) { in nsim_udp_tunnel_set_port() 24 ret = -EBUSY; in nsim_udp_tunnel_set_port() 26 ns->udp_ports.ports[table][entry] = in nsim_udp_tunnel_set_port() 27 be16_to_cpu(ti->port) << 16 | ti->type; in nsim_udp_tunnel_set_port() 31 netdev_info(dev, "set [%d, %d] type %d family %d port %d - %d\n", in nsim_udp_tunnel_set_port() 32 table, entry, ti->type, ti->sa_family, ntohs(ti->port), in nsim_udp_tunnel_set_port() [all …]
|
| H A D | bpf.c | 5 * June 1991 as shown in the file COPYING in the top-level directory of this 41 struct netdevsim *ns; member 53 const char **str = file->private; in nsim_bpf_string_show() 68 state = env->prog->aux->offload->dev_priv; in nsim_bpf_verify_insn() 69 if (state->nsim_dev->bpf_bind_verifier_delay && !insn_idx) in nsim_bpf_verify_insn() 70 msleep(state->nsim_dev->bpf_bind_verifier_delay); in nsim_bpf_verify_insn() 72 if (insn_idx == env->prog->len - 1) { in nsim_bpf_verify_insn() 75 if (!state->nsim_dev->bpf_bind_verifier_accept) in nsim_bpf_verify_insn() 76 ret = -EOPNOTSUPP; in nsim_bpf_verify_insn() 87 static bool nsim_xdp_offload_active(struct netdevsim *ns) in nsim_xdp_offload_active() argument [all …]
|
| /linux/fs/ |
| H A D | nsfs.c | 1 // SPDX-License-Identifier: GPL-2.0 46 struct ns_common *ns = inode->i_private; in ns_dname() local 47 const struct proc_ns_operations *ns_ops = ns->ops; in ns_dname() 50 ns_ops->name, inode->i_ino); in ns_dname() 60 struct ns_common *ns = inode->i_private; in nsfs_evict() local 62 __ns_ref_active_put(ns); in nsfs_evict() 64 ns->ops->put(ns); in nsfs_evict() 70 struct ns_common *ns; in ns_get_path_cb() local 72 ns = ns_get_cb(private_data); in ns_get_path_cb() 73 if (!ns) in ns_get_path_cb() [all …]
|
| /linux/ipc/ |
| H A D | namespace.c | 1 // SPDX-License-Identifier: GPL-2.0 29 static struct ucounts *inc_ipc_namespaces(struct user_namespace *ns) in inc_ipc_namespaces() argument 31 return inc_ucount(ns, current_euid(), UCOUNT_IPC_NAMESPACES); in inc_ipc_namespaces() 42 struct ipc_namespace *ns; in create_ipc_ns() local 46 err = -ENOSPC; in create_ipc_ns() 60 err = -ENOMEM; in create_ipc_ns() 61 ns = kzalloc_obj(struct ipc_namespace, GFP_KERNEL_ACCOUNT); in create_ipc_ns() 62 if (ns == NULL) in create_ipc_ns() 65 err = ns_common_init(ns); in create_ipc_ns() 69 ns_tree_gen_id(ns); in create_ipc_ns() [all …]
|
| /linux/tools/testing/selftests/net/ |
| H A D | bridge_vlan_dump.sh | 2 # SPDX-License-Identifier: GPL-2.0 5 # the dump if they have the same per-VLAN options. These tests verify that 6 # VLANs with different per-VLAN option values are not grouped together. 20 setup_ns NS 23 ip -n "$NS" link add name br0 type bridge vlan_filtering 1 \ 25 ip -n "$NS" link set dev br0 up 27 ip -n "$NS" link add name dummy0 type dummy 28 ip -n "$NS" link set dev dummy0 master br0 29 ip -n "$NS" link set dev dummy0 up 37 bridge -n "$NS" vlan add vid 10 dev dummy0 [all …]
|
| H A D | xfrm_policy.sh | 2 # SPDX-License-Identifier: GPL-2.0 8 # ns1 ---- ns3 ----- ns4 ---- ns2 31 local ns=$1 38 …ip -net $ns xfrm policy add src $lnet dst $rnet dir out tmpl src $me dst $remote proto esp mode tu… 40 …ip -net $ns xfrm policy add src $rnet dst $lnet dir fwd tmpl src $remote dst $me proto esp mode tu… 44 local ns=$1 52 …ip -net $ns xfrm state add src $remote dst $me proto esp spi $spi_in enc aes $KEY_AES auth sha1 … 53 …ip -net $ns xfrm state add src $me dst $remote proto esp spi $spi_out enc aes $KEY_AES auth sha1 … 55 do_esp_policy $ns $me $remote $lnet $rnet 60 # re-built. [all …]
|
| /linux/include/linux/ |
| H A D | ns_common.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 5 #include <linux/ns/ns_common_types.h> 11 bool is_current_namespace(struct ns_common *ns); 12 int __ns_common_init(struct ns_common *ns, u32 ns_type, const struct proc_ns_operations *ops, int i… 13 void __ns_common_free(struct ns_common *ns); 14 struct ns_common *__must_check ns_owner(struct ns_common *ns); 16 static __always_inline bool is_ns_init_inum(const struct ns_common *ns) in is_ns_init_inum() argument 18 VFS_WARN_ON_ONCE(ns->inum == 0); in is_ns_init_inum() 19 return unlikely(in_range(ns->inum, MNT_NS_INIT_INO, in is_ns_init_inum() 20 IPC_NS_INIT_INO - MNT_NS_INIT_INO + 1)); in is_ns_init_inum() [all …]
|
| H A D | ipc_namespace.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 12 #include <linux/rhashtable-types.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); 106 * Per app minimum openable message queues - 8. This does not map well 110 * Minimum maximum for HARD_MSGMAX - 32767. I bumped this to 65536. [all …]
|
| /linux/drivers/block/drbd/ |
| H A D | drbd_state.c | 1 // SPDX-License-Identifier: GPL-2.0-only 7 Copyright (C) 2001-2008, LINBIT Information Technologies GmbH. 8 Copyright (C) 1999-2008, Philipp Reisner <philipp.reisner@linbit.com>. 9 Copyright (C) 2002-2008, Lars Ellenberg <lars.ellenberg@linbit.com>. 26 union drbd_state ns; member 52 idr_for_each_entry(&resource->devices, device, vnr) in count_objects() 70 state_change->n_devices = n_devices; in alloc_state_change() 71 state_change->n_connections = n_connections; in alloc_state_change() 72 state_change->devices = (void *)(state_change + 1); in alloc_state_change() 73 state_change->connections = (void *)&state_change->devices[n_devices]; in alloc_state_change() [all …]
|
| /linux/kernel/ |
| H A D | utsname.c | 1 // SPDX-License-Identifier: GPL-2.0-only 21 static struct ucounts *inc_uts_namespaces(struct user_namespace *ns) in inc_uts_namespaces() argument 23 return inc_ucount(ns, current_euid(), UCOUNT_UTS_NAMESPACES); in inc_uts_namespaces() 32 * Clone a new ns copying an original utsname, setting refcount to 1 34 * Return ERR_PTR(-ENOMEM) on error (failure to allocate), new ns otherwise 39 struct uts_namespace *ns; in clone_uts_ns() local 43 err = -ENOSPC; in clone_uts_ns() 48 err = -ENOMEM; in clone_uts_ns() 49 ns = kmem_cache_zalloc(uts_ns_cache, GFP_KERNEL); in clone_uts_ns() 50 if (!ns) in clone_uts_ns() [all …]
|
| H A D | nscommon.c | 1 // SPDX-License-Identifier: GPL-2.0-only 11 static void ns_debug(struct ns_common *ns, const struct proc_ns_operations *ops) in ns_debug() argument 13 switch (ns->ns_type) { in ns_debug() 56 int __ns_common_init(struct ns_common *ns, u32 ns_type, const struct proc_ns_operations *ops, int i… in __ns_common_init() argument 60 refcount_set(&ns->__ns_ref, 1); in __ns_common_init() 61 ns->stashed = NULL; in __ns_common_init() 62 ns->ops = ops; in __ns_common_init() 63 ns->ns_id = 0; in __ns_common_init() 64 ns->ns_type = ns_type; in __ns_common_init() 65 ns_tree_node_init(&ns->ns_tree_node); in __ns_common_init() [all …]
|
| H A D | nstree.c | 1 // SPDX-License-Identifier: GPL-2.0-only 68 * ns_tree_node_init - Initialize a namespace tree node 75 RB_CLEAR_NODE(&node->ns_node); in ns_tree_node_init() 76 INIT_LIST_HEAD(&node->ns_list_entry); in ns_tree_node_init() 80 * ns_tree_root_init - Initialize a namespace tree root 87 root->ns_rb = RB_ROOT; in ns_tree_root_init() 88 INIT_LIST_HEAD(&root->ns_list_head); in ns_tree_root_init() 92 * ns_tree_node_empty - Check if a namespace tree node is empty 99 return RB_EMPTY_NODE(&node->ns_node); in ns_tree_node_empty() 103 * ns_tree_node_add - Add a node to a namespace tree [all …]
|
| H A D | user_namespace.c | 1 // SPDX-License-Identifier: GPL-2.0-only 14 #include <linux/key-type.h> 15 #include <keys/user-type.h> 30 struct user_namespace *ns, int cap_setid, 34 static struct ucounts *inc_user_namespaces(struct user_namespace *ns, kuid_t uid) in inc_user_namespaces() argument 36 return inc_ucount(ns, uid, UCOUNT_USER_NAMESPACES); in inc_user_namespaces() 49 cred->securebits = SECUREBITS_DEFAULT; in set_cred_user_ns() 50 cred->cap_inheritable = CAP_EMPTY_SET; in set_cred_user_ns() 51 cred->cap_permitted = CAP_FULL_SET; in set_cred_user_ns() 52 cred->cap_effective = CAP_FULL_SET; in set_cred_user_ns() [all …]
|
| /linux/drivers/nvme/host/ |
| H A D | multipath.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Copyright (c) 2017-2018 Christoph Hellwig. 6 #include <linux/backing-dev.h> 18 bool *arg = kp->arg; in multipath_param_set() 27 return -EINVAL; in multipath_param_set() 46 bool *arg = kp->arg; in multipath_always_on_set() 66 …"create multipath node always except for private namespace with non-unique nsid; note that this al… 70 [NVME_IOPOLICY_RR] = "round-robin", 71 [NVME_IOPOLICY_QD] = "queue-depth", 79 return -EINVAL; in nvme_set_iopolicy() [all …]
|
| H A D | zns.c | 1 // SPDX-License-Identifier: GPL-2.0 18 return -ENOMEM; in nvme_set_max_append() 24 status = nvme_submit_sync_cmd(ctrl->admin_q, &c, id, sizeof(*id)); in nvme_set_max_append() 30 if (id->zasl) in nvme_set_max_append() 31 ctrl->max_zone_append = 1 << (id->zasl + 3); in nvme_set_max_append() 33 ctrl->max_zone_append = ctrl->max_hw_sectors; in nvme_set_max_append() 38 int nvme_query_zone_info(struct nvme_ns *ns, unsigned lbaf, in nvme_query_zone_info() argument 41 struct nvme_effects_log *log = ns->head->effects; in nvme_query_zone_info() 47 if ((le32_to_cpu(log->iocs[nvme_cmd_zone_append]) & in nvme_query_zone_info() 49 if (test_and_clear_bit(NVME_NS_FORCE_RO, &ns->flags)) in nvme_query_zone_info() [all …]
|
| /linux/arch/arm/boot/dts/nvidia/ |
| H A D | tegra30-cpu-opp.dtsi | 1 // SPDX-License-Identifier: GPL-2.0 4 cpu0_opp_table: opp-table-cpu0 { 5 compatible = "operating-points-v2"; 6 opp-shared; 8 opp-51000000-800 { 9 clock-latency-ns = <100000>; 10 opp-supported-hw = <0x1F 0x31FE>; 11 opp-hz = /bits/ 64 <51000000>; 14 opp-51000000-850 { 15 clock-latency-ns = <100000>; [all …]
|
| H A D | tegra20-cpu-opp.dtsi | 1 // SPDX-License-Identifier: GPL-2.0 4 cpu0_opp_table: opp-table-cpu0 { 5 compatible = "operating-points-v2"; 6 opp-shared; 8 opp-216000000-750 { 9 clock-latency-ns = <400000>; 10 opp-supported-hw = <0x0F 0x0003>; 11 opp-hz = /bits/ 64 <216000000>; 12 opp-suspend; 15 opp-216000000-800 { [all …]
|
| /linux/drivers/clk/qcom/ |
| H A D | clk-rcg.c | 1 // SPDX-License-Identifier: GPL-2.0-only 10 #include <linux/clk-provider.h> 15 #include "clk-rcg.h" 18 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 30 mask <<= s->src_sel_shift; in src_to_ns() 31 ns &= ~mask; in src_to_ns() [all …]
|
| /linux/tools/testing/selftests/drivers/net/mlxsw/ |
| H A D | fib.sh | 2 # SPDX-License-Identifier: GPL-2.0 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 104 fib4_trap_check $ns "table local 192.0.2.1/32 dev dummy1" false 107 ip -n $ns route add table main 192.0.2.1/32 dev dummy1 108 fib4_trap_check $ns "table main 192.0.2.1/32 dev dummy1" true 111 fib4_trap_check $ns "table local 192.0.2.1/32 dev dummy1" false 115 ip -n $ns route add table main 192.0.2.2/32 dev dummy1 [all …]
|
| /linux/arch/arm/boot/dts/ti/omap/ |
| H A D | omap-gpmc-smsc911x.dtsi | 1 // SPDX-License-Identifier: GPL-2.0 10 vddvario: regulator-vddvario { 11 compatible = "regulator-fixed"; 12 regulator-name = "vddvario"; 13 regulator-always-on; 16 vdd33a: regulator-vdd33a { 17 compatible = "regulator-fixed"; 18 regulator-name = "vdd33a"; 19 regulator-always-on; 26 bank-width = <2>; [all …]
|