| /linux/tools/testing/selftests/namespaces/ |
| H A D | nsid_test.c | 29 /* Open the current mount namespace */ in TEST() 33 /* Get the mount namespace ID */ in TEST() 56 /* Get parent's mount namespace ID */ in TEST() 73 /* Create new mount namespace */ in TEST() 88 /* Keep namespace alive */ in TEST() 101 /* Child couldn't create namespace, skip test */ in TEST() 105 SKIP(return, "No permission to create mount namespace"); in TEST() 110 /* Open child's mount namespace */ in TEST() 116 /* Get child's mount namespace ID */ in TEST() 121 /* Parent and child should have different mount namespace IDs */ in TEST() [all …]
|
| H A D | file_handle_test.c | 39 /* Open a namespace file descriptor */ in TEST() 43 /* Get handle for the namespace */ in TEST() 67 /* Verify we opened the correct namespace */ in TEST() 94 /* Open UTS namespace file descriptor */ in TEST() 98 /* Get handle for the namespace */ in TEST() 117 /* Verify we opened the correct namespace */ in TEST() 144 /* Open IPC namespace file descriptor */ in TEST() 148 /* Get handle for the namespace */ in TEST() 167 /* Verify we opened the correct namespace */ in TEST() 194 /* Open PID namespace file descriptor */ in TEST() [all …]
|
| /linux/Documentation/core-api/ |
| H A D | symbol-namespaces.rst | 15 documentation purposes (think of the SUBSYSTEM_DEBUG namespace) as well as for 18 are required to import the namespace. Otherwise the kernel will, depending on 21 Additionally, it is possible to put symbols into a module namespace, strictly 27 Symbols can be exported into namespace using different methods. All of them are 36 available to export symbols into a certain namespace: EXPORT_SYMBOL_NS() and 37 EXPORT_SYMBOL_NS_GPL(). They take one additional argument: the namespace as a 40 namespace ``USB_STORAGE``, use:: 45 ``namespace`` set accordingly. A symbol that is exported without a namespace will 46 refer to ``NULL``. There is no default namespace if none is defined. ``modpost`` 47 and kernel/module/main.c make use the namespace at build time or module load [all …]
|
| /linux/tools/testing/selftests/uevent/ |
| H A D | uevent_filtering.c | 132 "%s - Failed to unshare user namespace\n", in uevent_listener() 142 "%s - Failed to unshare network namespace\n", in uevent_listener() 279 "%s - Failed to unshare user namespace\n", in do_test() 289 "%s - Failed to unshare network namespace\n", in do_test() 382 * - Open uevent listening socket in initial network namespace owned by in TEST() 383 * initial user namespace. in TEST() 384 * - Trigger uevent in initial network namespace owned by initial user in TEST() 385 * namespace. in TEST() 396 * - Open uevent listening socket in non-initial network namespace in TEST() 397 * owned by initial user namespace. in TEST() [all …]
|
| /linux/tools/include/uapi/linux/ |
| H A D | nsfs.h | 10 /* Returns a file descriptor that refers to an owning user namespace */ 12 /* Returns a file descriptor that refers to a parent namespace */ 14 /* Returns the type of namespace (CLONE_NEW* value) referred to by 17 /* Get owner UID (in the caller's user namespace) for a user namespace */ 19 /* Translate pid from target pid namespace into the caller's pid namespace. */ 21 /* Return thread-group leader id of pid in the callers pid namespace. */ 23 /* Translate pid from caller's pid namespace into a target pid namespace. */ 25 /* Return thread-group leader id of pid in the target pid namespace. */ 36 /* Get information about namespace. */ 38 /* Get next namespace. */ [all …]
|
| H A D | sched.h | |
| /linux/security/apparmor/ |
| H A D | policy_ns.c | 11 * to be loaded for tasks within the namespace. 28 /* root profile namespace */ 34 * @curr: namespace to treat as the parent (NOT NULL) 35 * @view: namespace to test if visible from @curr (NOT NULL) 58 * @curr: current namespace (NOT NULL) 59 * @view: namespace attempting to view (NOT NULL) 66 /* if view == curr then the namespace name isn't displayed */ in aa_ns_name() 99 * alloc_ns - allocate, initialize and return a new namespace 100 * @prefix: parent namespace name (MAYBE NULL) 103 * Returns: refcounted namespace or NULL on failure. [all …]
|
| /linux/include/uapi/linux/ |
| H A D | nsfs.h | 10 /* Returns a file descriptor that refers to an owning user namespace */ 12 /* Returns a file descriptor that refers to a parent namespace */ 14 /* Returns the type of namespace (CLONE_NEW* value) referred to by 17 /* Get owner UID (in the caller's user namespace) for a user namespace */ 19 /* Translate pid from target pid namespace into the caller's pid namespace. */ 21 /* Return thread-group leader id of pid in the callers pid namespace. */ 23 /* Translate pid from caller's pid namespace into a target pid namespace. */ 25 /* Return thread-group leader id of pid in the target pid namespace. */ 36 /* Get information about namespace. */ 38 /* Get next namespace. */ [all …]
|
| H A D | sched.h | 20 #define CLONE_NEWNS 0x00020000 /* New mount namespace group */ 28 #define CLONE_NEWCGROUP 0x02000000 /* New cgroup namespace */ 29 #define CLONE_NEWUTS 0x04000000 /* New utsname namespace */ 30 #define CLONE_NEWIPC 0x08000000 /* New ipc namespace */ 31 #define CLONE_NEWUSER 0x10000000 /* New user namespace */ 32 #define CLONE_NEWPID 0x20000000 /* New pid namespace */ 33 #define CLONE_NEWNET 0x40000000 /* New network namespace */ 44 #define CLONE_NEWTIME 0x00000080 /* New time namespace */ 76 * namespace. Each additional element in the array 77 * defines the PID in the parent PID namespace of [all …]
|
| /linux/include/linux/ |
| H A D | nstree.h | 47 * ns_tree_add_raw - Add a namespace to a namespace 48 * @ns: Namespace to add 50 * This function adds a namespace to the appropriate namespace tree 56 * ns_tree_add - Add a namespace to a namespace tree 57 * @ns: Namespace to add 59 * This function assigns a new id to the namespace and adds it to the 60 * appropriate namespace tree and list. 65 * ns_tree_remove - Remove a namespace from a namespace tree 66 * @ns: Namespace to remove 68 * This function removes a namespace from the appropriate namespace
|
| H A D | nd.h | 90 * struct nd_namespace_common - core infrastructure of a namespace 91 * @force_raw: ignore other personalities for the namespace (e.g. btt) 93 * @claim: when set a another personality has taken ownership of the namespace 95 * @rw_bytes: access the raw namespace capacity with byte-aligned transfers 113 * @dev: namespace device created by the nd region driver 116 * @addr: virtual address to access the namespace range 117 * @bb: badblocks list for the namespace range 128 * struct nd_namespace_pmem - namespace device for dimm-backed interleaved memory 130 * @lbasize: logical sector size for the namespace in block-device-mode 131 * @alt_name: namespace name supplied in the dimm label [all …]
|
| /linux/security/apparmor/include/ |
| H A D | policy_ns.h | 22 /* struct aa_ns_acct - accounting of profiles in namespace 23 * @max_size: maximum space allowed for all profiles in namespace 24 * @max_count: maximum number of profiles that can be in this namespace 35 /* struct aa_ns - namespace for a set of profiles 37 * @parent: parent of namespace 39 * @acct: accounting for the namespace 40 * @unconfined: special unconfined profile for the namespace 41 * @sub_ns: list of namespaces under the current namespace. 43 * @uniq_id: a unique id count for the profiles in the namespace 49 * and profile names within a namespace are guaranteed to be unique. When [all …]
|
| /linux/Documentation/admin-guide/sysctl/ |
| H A D | user.rst | 16 per user per user namespace limits. 24 The creation of per user per user namespace objects are charged to 25 the user in the user namespace who created the object and 26 verified to be below the per user limit in that user namespace. 34 user namespace does not allow a user to escape their current limits. 42 user namespace may create. 48 user namespace may create. 54 user namespace may create. 60 current user namespace may create. 66 user namespace may create. [all …]
|
| /linux/Documentation/networking/ |
| H A D | sysfs-tagging.rst | 11 namespace active multiple devices with the same name can show up in 18 By using the network namespace pointers as tags to separate out 23 Each sysfs directory entry may be tagged with a namespace via the 26 and KOBJ_NS_TYPES, and ns will point to the namespace to which it 30 ``void *ns[KOBJ_NS_TYPES]``. When a task in a tagging namespace 33 ``s_fs_info->ns[kobj_nstype]`` set to the new namespace. Note that 36 namespace exits, it will call kobj_ns_exit() to invalidate any 44 - current_ns() which returns current's namespace 45 - netlink_ns() which returns a socket's namespace 46 - initial_ns() which returns the initial namespace
|
| /linux/tools/testing/selftests/pidfd/ |
| H A D | pidfd_setns_test.c | 122 TH_LOG("%m - Failed to open %s namespace for process %d", in switch_timens() 130 TH_LOG("%m - Failed to derive %s namespace from pidfd of process %d", in switch_timens() 173 TH_LOG("%m - Failed to unshare mount namespace for process %d", self->pid); in FIXTURE_SETUP() 177 TH_LOG("%m - Failed to unshare cgroup namespace for process %d", self->pid); in FIXTURE_SETUP() 181 TH_LOG("%m - Failed to unshare ipc namespace for process %d", self->pid); in FIXTURE_SETUP() 185 TH_LOG("%m - Failed to unshare uts namespace for process %d", self->pid); in FIXTURE_SETUP() 189 TH_LOG("%m - Failed to unshare net namespace for process %d", self->pid); in FIXTURE_SETUP() 193 TH_LOG("%m - Failed to unshare time namespace for process %d", self->pid); in FIXTURE_SETUP() 227 TH_LOG("%m - Failed to unshare mount namespace for process %d", self->pid); in FIXTURE_SETUP() 231 TH_LOG("%m - Failed to unshare cgroup namespace fo in FIXTURE_SETUP() [all...] |
| /linux/tools/testing/selftests/bpf/prog_tests/ |
| H A D | test_xdp_veth.c | 72 char local_veth[VETH_NAME_MAX_LEN]; /* Interface in main namespace */ in attach_programs_to_veth_pair() 73 char remote_veth[VETH_NAME_MAX_LEN]; /* Peer interface in dedicated namespace*/ in attach_programs_to_veth_pair() 74 char namespace[NS_NAME_MAX_LEN]; /* Namespace for the remote veth */ in attach_programs_to_veth_pair() 92 .namespace = "ns-veth11-" in attach_programs_to_veth_pair() 99 .namespace = "ns-veth22-" in attach_programs_to_veth_pair() 106 .namespace = "ns-veth33-" in attach_programs_to_veth_pair() 151 nstoken = open_netns(net_config->veth_cfg[index].namespace); in configure_network() 152 if (!ASSERT_OK_PTR(nstoken, "switch to remote veth namespace")) in configure_network() 186 err = append_tid(net_config->veth_cfg[i].namespace, NS_NAME_MAX_LE in test_xdp_veth_redirect() 43 const char *namespace; /* Namespace for the remote veth */ global() member [all...] |
| /linux/Documentation/driver-api/acpi/ |
| H A D | scan_handlers.rst | 12 During system initialization and ACPI-based device hot-add, the ACPI namespace 15 registered with the driver core for every device object in the ACPI namespace 16 and the hierarchy of those struct acpi_device objects reflects the namespace 17 layout (i.e. parent device objects in the namespace are represented by parent 26 The core ACPI namespace scanning code in drivers/acpi/scan.c carries out basic 54 The namespace scanning function, acpi_bus_scan(), first registers all of the 55 device nodes in the given namespace scope with the driver core. Then, it tries 68 the namespace scan should be terminated due to a serious error. The error code 71 The namespace trimming function, acpi_bus_trim(), first executes .detach() 72 callbacks from the scan handlers of all device nodes in the given namespace [all …]
|
| /linux/Documentation/firmware-guide/acpi/ |
| H A D | namespace.rst | 5 ACPI Device Tree - Representation of ACPI Namespace 17 The Linux ACPI subsystem converts ACPI namespace objects into a Linux 42 data structure called the ACPI namespace whose topology reflects the 69 | ACPI Namespace | 80 Example ACPI Namespace 83 All definition blocks are loaded into a single namespace. The namespace 86 namespace: 93 5. The '\' symbol represents the root of the namespace (i.e. names 94 prepended with '\' are relative to the namespace root). 95 6. The '^' symbol represents the parent of the current namespace node [all …]
|
| /linux/drivers/acpi/acpica/ |
| H A D | nsload.c | 4 * Module Name: nsload - namespace loading/expanding/contracting procedures 36 * DESCRIPTION: Load one ACPI table into the namespace 47 /* If table already loaded into namespace, just return */ in acpi_ns_load_table() 55 "**** Loading table into namespace ****\n")); in acpi_ns_load_table() 63 * Parse the table and load the namespace with all named in acpi_ns_load_table() 66 * parsed until the entire namespace is loaded, because in acpi_ns_load_table() 76 * On error, delete any namespace objects created by this table. in acpi_ns_load_table() 79 * AE_ALREADY_EXISTS - namespace collision. in acpi_ns_load_table() 82 * namespace, as per the ACPI specification. in acpi_ns_load_table() 143 * Load the namespace. The DSDT is required, in acpi_ns_load_namespace() [all …]
|
| /linux/tools/perf/trace/beauty/include/uapi/linux/ |
| H A D | sched.h | 20 #define CLONE_NEWNS 0x00020000 /* New mount namespace group */ 28 #define CLONE_NEWCGROUP 0x02000000 /* New cgroup namespace */ 29 #define CLONE_NEWUTS 0x04000000 /* New utsname namespace */ 30 #define CLONE_NEWIPC 0x08000000 /* New ipc namespace */ 31 #define CLONE_NEWUSER 0x10000000 /* New user namespace */ 32 #define CLONE_NEWPID 0x20000000 /* New pid namespace */ 33 #define CLONE_NEWNET 0x40000000 /* New network namespace */ 44 #define CLONE_NEWTIME 0x00000080 /* New time namespace */ 76 * namespace. Each additional element in the array 77 * defines the PID in the parent PID namespace of [all …]
|
| /linux/tools/testing/selftests/bpf/ |
| H A D | test_tunnel.sh | |
| /linux/kernel/ |
| H A D | user_namespace.c | 47 * anything as the capabilities are bound to the new user namespace. in set_cred_user_ns() 76 * Create a new user namespace, deriving the creator from the user in the 78 * new namespace. 103 * mount namespace which allows all files to be accessed. in create_user_ns() 109 /* The creator needs a mapping in the parent user namespace in create_user_ns() 133 /* Leave the new->user_ns reference with the new user namespace. */ in create_user_ns() 410 * make_kuid - Map a user-namespace uid pair into a kuid. 411 * @ns: User namespace that the uid is in 414 * Maps a user-namespace uid pair into a kernel internal kuid, 417 * When there is no mapping defined for the user-namespace uid [all …]
|
| H A D | nstree.c | 8 * struct ns_tree - Namespace tree 206 * ns_tree_adjoined_rcu - find the next/previous namespace in the same 208 * @ns: namespace to start from 209 * @previous: if true find the previous namespace, otherwise the next 211 * Find the next or previous namespace in the same tree as @ns. If 212 * there is no next/previous namespace, -ENOENT is returned. 234 * ns_tree_gen_id - generate a new namespace id 235 * @ns: namespace to generate id for 237 * Generates a new namespace id and assigns it to the namespace. All 239 * directly. IOW, when two ids of two namespace are equal, they are
|
| /linux/drivers/nvdimm/ |
| H A D | label.h | 20 NSLABEL_FLAG_LOCAL = 0x2, /* DIMM-local namespace */ 21 NSLABEL_FLAG_BTT = 0x4, /* namespace contains a BTT */ 102 * struct nvdimm_efi_label - namespace superblock 111 * @rawsize: size of namespace 113 * @align: physical address alignment of the namespace 145 * @type: uuid identifying this label format (namespace) 146 * @uuid: uuid for the namespace this label describes 147 * @name: friendly name for the namespace 149 * @nrange: discontiguous namespace support 152 * @rawsize: size of this label's contribution to namespace [all …]
|
| /linux/tools/testing/selftests/drivers/net/lib/sh/ |
| H A D | lib_netcons.sh | 28 # NAMESPACE will be populated by setup_ns with a random value 29 NAMESPACE="" 61 exec {NAMESPACE_FD}</var/run/netns/"${NAMESPACE}" 64 # Bind the dst interface to namespace 65 ip link set "${DSTIF}" netns "${NAMESPACE}" 67 # Linking one device to the other one (on the other namespace} 78 ip netns exec "${NAMESPACE}" ip addr add "${DSTIP}"/24 dev "${DSTIF}" 79 ip netns exec "${NAMESPACE}" ip link set "${DSTIF}" up 103 setup_ns NAMESPACE 106 # namespace [all...] |