Home
last modified time | relevance | path

Searched refs:unshare (Results 1 – 25 of 81) sorted by relevance

1234

/linux-6.1.9/Documentation/userspace-api/
Dunshare.rst1 unshare system call
4 This document describes the new system call, unshare(). The document
42 unshare() system call adds a primitive to the Linux thread model that
43 allows threads to selectively 'unshare' any resources that were being
44 shared at the time of their creation. unshare() was conceptualized by
46 of the discussion on POSIX threads on Linux. unshare() augments the
48 shared resources without creating a new process. unshare() is a natural
55 unshare() would be useful to large application frameworks such as PAM
58 when creating a new process using fork or clone, unshare() can benefit
61 where unshare() can be used.
[all …]
Dindex.rst22 unshare
/linux-6.1.9/tools/testing/selftests/net/af_unix/
Ddiag_uid.c29 int unshare; in FIXTURE_VARIANT() local
35 .unshare = 0, in FIXTURE_VARIANT_ADD()
41 .unshare = CLONE_NEWUSER, in FIXTURE_VARIANT_ADD()
51 if (variant->unshare) in FIXTURE_SETUP()
52 ASSERT_EQ(unshare(variant->unshare), 0); in FIXTURE_SETUP()
/linux-6.1.9/tools/testing/selftests/pid_namespace/
Dregression_enomem.c27 EXPECT_EQ(0, unshare(CLONE_NEWUSER)); in TEST()
29 EXPECT_EQ(0, unshare(CLONE_NEWPID)); in TEST()
/linux-6.1.9/tools/testing/selftests/proc/
Dsetns-dcache.c54 if (unshare(CLONE_NEWNET) == -1) { in main()
75 if (unshare(CLONE_NEWNET) == -1) { in main()
Dsetns-sysvipc.c53 if (unshare(CLONE_NEWIPC) == -1) { in main()
74 if (unshare(CLONE_NEWIPC) == -1) { in main()
Dproc-loadavg-001.c30 if (unshare(CLONE_NEWPID) == -1) { in main()
Dproc-subset-pid.c42 if (unshare(CLONE_NEWNS) == -1) { in make_private_proc()
/linux-6.1.9/tools/testing/selftests/mount/
Dunprivileged-remount-test.c162 if (unshare(CLONE_NEWUSER) !=0) { in create_and_enter_userns()
211 if (unshare(CLONE_NEWNS) != 0) { in test_unpriv_remount()
225 if (unshare(CLONE_NEWNS) != 0) { in test_unpriv_remount()
291 ret = unshare(CLONE_NEWNS); in test_priv_mount_unpriv_remount()
Dnosymfollow-test.c99 if (unshare(CLONE_NEWUSER) != 0) in create_and_enter_ns()
111 if (unshare(CLONE_NEWNS) != 0) in create_and_enter_ns()
/linux-6.1.9/tools/testing/selftests/nsfs/
Downer.c42 if (unshare(CLONE_NEWUTS | CLONE_NEWUSER)) in main()
81 if (unshare(CLONE_NEWUSER)) in main()
/linux-6.1.9/tools/testing/selftests/uevent/
Duevent_filtering.c128 ret = unshare(CLONE_NEWUSER); in uevent_listener()
138 ret = unshare(CLONE_NEWNET); in uevent_listener()
274 ret = unshare(CLONE_NEWUSER); in do_test()
284 ret = unshare(CLONE_NEWNET); in do_test()
/linux-6.1.9/tools/testing/selftests/bpf/
Dtest_flow_dissector.sh30 if ! unshare --net $bpftool prog attach pinned \
39 if unshare --net $bpftool prog attach pinned \
/linux-6.1.9/tools/testing/selftests/tmpfs/
Dbug-link-o-tmpfile.c30 if (unshare(CLONE_NEWNS) == -1) { in main()
/linux-6.1.9/tools/testing/selftests/exec/
Drecursion-depth.c29 if (unshare(CLONE_NEWNS) == -1) { in main()
/linux-6.1.9/tools/testing/selftests/net/
Dso_netns_cookie.c41 if (unshare(CLONE_NEWNET)) in main()
/linux-6.1.9/tools/testing/selftests/move_mount_set_group/
Dmove_mount_set_group_test.c85 if (unshare(CLONE_NEWUSER)) in create_and_enter_userns()
115 if (unshare(CLONE_NEWNS)) in prepare_unpriv_mountns()
/linux-6.1.9/tools/testing/selftests/timens/
Dtimens.h56 if (unshare(CLONE_NEWTIME)) { in unshare_timens()
/linux-6.1.9/tools/testing/selftests/bpf/prog_tests/
Ddeny_namespace.c41 if (unshare(CLONE_NEWUSER)) in create_user_ns()
Dbind_perm.c16 if (!ASSERT_OK(unshare(CLONE_NEWNET), "create netns")) in create_netns()
Dsetget_sockopt.c24 if (!ASSERT_OK(unshare(CLONE_NEWNET), "create netns")) in create_netns()
/linux-6.1.9/samples/binderfs/
Dbinderfs_example.c23 ret = unshare(CLONE_NEWNS); in main()
/linux-6.1.9/tools/testing/selftests/openat2/
Dhelpers.h87 #define E_unshare(...) E_func(unshare, __VA_ARGS__)
/linux-6.1.9/tools/testing/selftests/capabilities/
Dtest_execve.c103 if (unshare(CLONE_NEWNS) == 0) { in create_and_enter_ns()
121 } else if (unshare(CLONE_NEWUSER | CLONE_NEWNS) == 0) { in create_and_enter_ns()
/linux-6.1.9/tools/testing/selftests/mount_setattr/
Dmount_setattr_test.c203 if (unshare(CLONE_NEWUSER)) in create_and_enter_userns()
233 if (unshare(CLONE_NEWNS)) in prepare_unpriv_mountns()
996 ASSERT_EQ(unshare(CLONE_NEWNS), 0); in TEST_F()
1010 ASSERT_EQ(unshare(CLONE_NEWNS), 0); in FIXTURE_SETUP()
1290 ASSERT_EQ(unshare(CLONE_NEWNS), 0); in TEST_F()
1351 ASSERT_EQ(unshare(CLONE_NEWNS), 0); in TEST_F()

1234