Home
last modified time | relevance | path

Searched full:namespace (Results 1 – 25 of 1062) sorted by relevance

12345678910>>...43

/linux/tools/testing/selftests/namespaces/
H A Dnsid_test.c48 /* Open the current mount namespace */ in TEST()
52 /* Get the mount namespace ID */ in TEST()
75 /* Get parent's mount namespace ID */ in TEST_F()
92 /* Create new mount namespace */ in TEST_F()
107 /* Keep namespace alive */ in TEST_F()
123 /* Child couldn't create namespace, skip test */ in TEST_F()
125 SKIP(return, "No permission to create mount namespace"); in TEST_F()
130 /* Open child's mount namespace */ in TEST_F()
136 /* Get child's mount namespace ID */ in TEST_F()
141 /* Parent and child should have different mount namespace IDs */ in TEST_F()
[all …]
H A Dfile_handle_test.c39 /* 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 …]
H A Dns_active_ref_test.c46 /* Open initial network namespace */ in TEST()
50 /* Get file handle for initial namespace */ in TEST()
59 /* Close the namespace fd */ in TEST()
70 /* Verify we opened the same namespace */ in TEST()
83 * Test namespace lifecycle: create a namespace in a child process,
85 * the process exits (namespace becomes inactive).
108 /* Create new network namespace */ in TEST()
115 /* Open our new namespace */ in TEST()
122 /* Get file handle for the namespace */ in TEST()
137 /* Exit - namespace should become inactive */ in TEST()
[all …]
H A Dlistns_permissions_test.c25 * Create a namespace, drop privileges, verify we can only see our own namespaces.
58 /* Create user namespace to be unprivileged */ in TEST()
64 /* Create a network namespace */ in TEST()
70 /* Get our network namespace ID */ in TEST()
91 /* We should only see our own network namespace */ in TEST()
124 /* Child should have seen its own namespace */ in TEST()
127 TH_LOG("Unprivileged child saw its own namespace, plus %d others (likely init_net)", in TEST()
132 * Test that users with CAP_SYS_ADMIN in a user namespace can see
133 * all namespaces owned by that user namespace.
143 .user_ns_id = 0, /* Will be set to our created user namespace */ in TEST()
[all …]
H A Dcred_change_test.c23 * Test credential changes and their impact on namespace active references.
27 * Test setuid() in a user namespace properly swaps active references.
28 * Create a user namespace with multiple UIDs mapped, then setuid() between them.
29 * Verify that the user namespace remains active throughout.
64 /* Create new user namespace with multiple UIDs mapped (0-9) */ in TEST()
78 /* Get user namespace ID */ in TEST()
92 /* Send namespace ID to parent */ in TEST()
121 SKIP(return, "Failed to get namespace ID from child"); in TEST()
125 TH_LOG("Child user namespace ID: %llu", (unsigned long long)userns_id); in TEST()
127 /* Verify namespace is active while child is running */ in TEST()
[all …]
H A Dlistns_test.c23 * Test basic listns() functionality with the unified namespace tree.
88 /* Verify we can open each namespace and it's actually a network namespace */ in TEST()
109 /* Verify it's a network namespace via ioctl */ in TEST()
174 * List namespaces owned by current user namespace.
199 TH_LOG("Found %zd namespaces owned by current user namespace", ret); in TEST()
207 * Create a namespace, let it become inactive, verify it's not listed.
238 /* Create a new namespace in a child process and get its ID */ in TEST()
250 /* Create new network namespace */ in TEST()
274 /* Keep namespace active briefly */ in TEST()
279 /* Parent reads the new namespace ID */ in TEST()
[all …]
H A Dsiocgskns_test.c38 * Create a socket and verify SIOCGSKNS returns the correct network namespace.
49 /* Use SIOCGSKNS to get network namespace */ in TEST()
58 /* Get current network namespace */ in TEST()
74 * Create a network namespace, create a socket in it, then exit the namespace.
75 * The namespace should remain active while the socket FD is held.
100 /* Create a socket in the new network namespace */ in TEST()
168 /* Get network namespace from socket */ in TEST()
180 * Namespace should still be active because socket FD keeps it alive. in TEST()
190 /* Close socket - namespace should become inactive */ in TEST()
241 /* Verify all return the same network namespace */ in TEST()
[all …]
/linux/tools/testing/selftests/uevent/
H A Duevent_filtering.c132 "%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/security/apparmor/
H A Dpolicy_ns.c11 * 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 Dnsfs.h10 /* 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 …]
/linux/tools/include/uapi/linux/
H A Dnsfs.h10 /* 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 Dsched.h
/linux/security/apparmor/include/
H A Dpolicy_ns.h24 /* struct aa_ns_acct - accounting of profiles in namespace
25 * @max_size: maximum space allowed for all profiles in namespace
26 * @max_count: maximum number of profiles that can be in this namespace
37 /* struct aa_ns - namespace for a set of profiles
39 * @parent: parent of namespace
41 * @acct: accounting for the namespace
42 * @unconfined: special unconfined profile for the namespace
43 * @sub_ns: list of namespaces under the current namespace.
45 * @uniq_id: a unique id count for the profiles in the namespace
51 * and profile names within a namespace are guaranteed to be unique. When
[all …]
/linux/include/linux/ns/
H A Dnstree_types.h10 * struct ns_tree_root - Root of a namespace tree
14 * Each namespace tree maintains both an rbtree (for O(log n) lookups)
24 * struct ns_tree_node - Node in a namespace tree
28 * Represents a namespace's position in a tree. Each namespace has
37 * struct ns_tree - Namespace tree nodes and active reference count
38 * @ns_id: Unique namespace identifier
40 * @ns_unified_node: Node in the global namespace tree
41 * @ns_tree_node: Node in the per-type namespace tree
42 * @ns_owner_node: Node in the owner namespace's tree of owned namespaces
43 * @ns_owner_root: Root of the tree of namespaces owned by this namespace
[all …]
/linux/kernel/
H A Dnscommon.c81 * Tree ref starts at 0. It's incremented when namespace enters in __ns_common_init()
115 * The active reference count works by having each namespace that gets
116 * created take a single active reference on its owning user namespace.
117 * That single reference is only released once the child namespace's
120 * A regular namespace tree might look as follow:
124 * x : always active (initial namespace)
161 * The iteration stops once we reach a namespace that still has active
191 * The active reference count works by having each namespace that gets
192 * created take a single active reference on its owning user namespace.
193 * That single reference is only released once the child namespace's
[all …]
/linux/Documentation/admin-guide/sysctl/
H A Duser.rst16 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 Dsysfs-tagging.rst11 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 Dpidfd_setns_test.c122 TH_LOG("%m - Failed to open %s namespace for process %d", in FIXTURE_SETUP()
130 TH_LOG("%m - Failed to derive %s namespace from pidfd of process %d", in FIXTURE_SETUP()
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 for process %d", self->pid); in FIXTURE_SETUP()
[all …]
/linux/include/linux/
H A Dnd.h90 * 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/tools/testing/selftests/bpf/prog_tests/
H A Dtest_xdp_veth.c72 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 Dscan_handlers.rst12 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 Dnamespace.rst5 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 Dnsload.c4 * 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 Dsched.h20 #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 */
42 #define CLONE_EMPTY_MNTNS (1ULL << 37) /* Create an empty mount namespace. */
48 #define CLONE_NEWTIME 0x00000080 /* New time namespace */
54 #define UNSHARE_EMPTY_MNTNS 0x00100000 /* Unshare an empty mount namespace
[all...]
/linux/tools/testing/selftests/bpf/
H A Dtest_tunnel.sh

12345678910>>...43