€•®Œsphinx.addnodes”Œdocument”“”)�”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)�”}”(hhh]”(hŒ pending_xref”“”)�”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…”�”}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ)/translations/zh_CN/filesystems/fuse/fuse”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)�”}”(hhh]”hŒChinese (Traditional)”…”�”}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ)/translations/zh_TW/filesystems/fuse/fuse”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒItalian”…”�”}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ)/translations/it_IT/filesystems/fuse/fuse”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒJapanese”…”�”}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ)/translations/ja_JP/filesystems/fuse/fuse”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒKorean”…”�”}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ)/translations/ko_KR/filesystems/fuse/fuse”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒPortuguese (Brazilian)”…”�”}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ)/translations/pt_BR/filesystems/fuse/fuse”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒSpanish”…”�”}”hh–sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ)/translations/sp_SP/filesystems/fuse/fuse”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒcomment”“”)�”}”(hŒ SPDX-License-Identifier: GPL-2.0”h]”hŒ SPDX-License-Identifier: GPL-2.0”…”�”}”hh·sbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1hµhhh²hh³ŒC/var/lib/git/docbuild/linux/Documentation/filesystems/fuse/fuse.rst”h´KubhŒsection”“”)�”}”(hhh]”(hŒtitle”“”)�”}”(hŒ FUSE Overview”h]”hŒ FUSE Overview”…”�”}”(hhÏh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhhÊh²hh³hÇh´KubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒ Definitions”h]”hŒ Definitions”…”�”}”(hhàh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhhÝh²hh³hÇh´KubhŒdefinition_list”“”)�”}”(hhh]”(hŒdefinition_list_item”“”)�”}”(hŒ´Userspace filesystem: A filesystem in which data and metadata are provided by an ordinary userspace process. The filesystem can be accessed normally through the kernel interface. ”h]”(hŒterm”“”)�”}”(hŒUserspace filesystem:”h]”hŒUserspace filesystem:”…”�”}”(hhûh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hùh³hÇh´K hhõubhŒ definition”“”)�”}”(hhh]”hŒ paragraph”“”)�”}”(hŒ�A filesystem in which data and metadata are provided by an ordinary userspace process. The filesystem can be accessed normally through the kernel interface.”h]”hŒ�A filesystem in which data and metadata are provided by an ordinary userspace process. The filesystem can be accessed normally through the kernel interface.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´K hj ubah}”(h]”h ]”h"]”h$]”h&]”uh1j hhõubeh}”(h]”h ]”h"]”h$]”h&]”uh1hóh³hÇh´K hhðubhô)�”}”(hŒVFilesystem daemon: The process(es) providing the data and metadata of the filesystem. ”h]”(hú)�”}”(hŒFilesystem daemon:”h]”hŒFilesystem daemon:”…”�”}”(hj.h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hùh³hÇh´Khj*ubj )�”}”(hhh]”j)�”}”(hŒBThe process(es) providing the data and metadata of the filesystem.”h]”hŒBThe process(es) providing the data and metadata of the filesystem.”…”�”}”(hj?h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´Khj<ubah}”(h]”h ]”h"]”h$]”h&]”uh1j hj*ubeh}”(h]”h ]”h"]”h$]”h&]”uh1hóh³hÇh´Khhðh²hubhô)�”}”(hX&Non-privileged mount (or user mount): A userspace filesystem mounted by a non-privileged (non-root) user. The filesystem daemon is running with the privileges of the mounting user. NOTE: this is not the same as mounts allowed with the "user" option in /etc/fstab, which is not discussed here. ”h]”(hú)�”}”(hŒ%Non-privileged mount (or user mount):”h]”hŒ%Non-privileged mount (or user mount):”…”�”}”(hj]h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hùh³hÇh´KhjYubj )�”}”(hhh]”j)�”}”(hŒÿA userspace filesystem mounted by a non-privileged (non-root) user. The filesystem daemon is running with the privileges of the mounting user. NOTE: this is not the same as mounts allowed with the "user" option in /etc/fstab, which is not discussed here.”h]”hXA userspace filesystem mounted by a non-privileged (non-root) user. The filesystem daemon is running with the privileges of the mounting user. NOTE: this is not the same as mounts allowed with the “userâ€� option in /etc/fstab, which is not discussed here.”…”�”}”(hjnh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´Khjkubah}”(h]”h ]”h"]”h$]”h&]”uh1j hjYubeh}”(h]”h ]”h"]”h$]”h&]”uh1hóh³hÇh´Khhðh²hubhô)�”}”(hXRFilesystem connection: A connection between the filesystem daemon and the kernel. The connection exists until either the daemon dies, or the filesystem is umounted. Note that detaching (or lazy umounting) the filesystem does *not* break the connection, in this case it will exist until the last reference to the filesystem is released. ”h]”(hú)�”}”(hŒFilesystem connection:”h]”hŒFilesystem connection:”…”�”}”(hjŒh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hùh³hÇh´Khjˆubj )�”}”(hhh]”j)�”}”(hX:A connection between the filesystem daemon and the kernel. The connection exists until either the daemon dies, or the filesystem is umounted. Note that detaching (or lazy umounting) the filesystem does *not* break the connection, in this case it will exist until the last reference to the filesystem is released.”h]”(hŒÌA connection between the filesystem daemon and the kernel. The connection exists until either the daemon dies, or the filesystem is umounted. Note that detaching (or lazy umounting) the filesystem does ”…”�”}”(hj�h²hh³Nh´NubhŒemphasis”“”)�”}”(hŒ*not*”h]”hŒnot”…”�”}”(hj§h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hj�ubhŒi break the connection, in this case it will exist until the last reference to the filesystem is released.”…”�”}”(hj�h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´Khjšubah}”(h]”h ]”h"]”h$]”h&]”uh1j hjˆubeh}”(h]”h ]”h"]”h$]”h&]”uh1hóh³hÇh´Khhðh²hubhô)�”}”(hŒ-Mount owner: The user who does the mounting. ”h]”(hú)�”}”(hŒ Mount owner:”h]”hŒ Mount owner:”…”�”}”(hjÏh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hùh³hÇh´K hjËubj )�”}”(hhh]”j)�”}”(hŒThe user who does the mounting.”h]”hŒThe user who does the mounting.”…”�”}”(hjàh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´K hjÝubah}”(h]”h ]”h"]”h$]”h&]”uh1j hjËubeh}”(h]”h ]”h"]”h$]”h&]”uh1hóh³hÇh´K hhðh²hubhô)�”}”(hŒ8User: The user who is performing filesystem operations. ”h]”(hú)�”}”(hŒUser:”h]”hŒUser:”…”�”}”(hjþh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hùh³hÇh´K#hjúubj )�”}”(hhh]”j)�”}”(hŒ1The user who is performing filesystem operations.”h]”hŒ1The user who is performing filesystem operations.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´K#hj ubah}”(h]”h ]”h"]”h$]”h&]”uh1j hjúubeh}”(h]”h ]”h"]”h$]”h&]”uh1hóh³hÇh´K#hhðh²hubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîhhÝh²hh³hÇh´Nubeh}”(h]”Œ definitions”ah ]”h"]”Œ definitions”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´KubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒ What is FUSE?”h]”hŒ What is FUSE?”…”�”}”(hj:h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj7h²hh³hÇh´K&ubj)�”}”(hŒ–FUSE is a userspace filesystem framework. It consists of a kernel module (fuse.ko), a userspace library (libfuse.*) and a mount utility (fusermount).”h]”hŒ–FUSE is a userspace filesystem framework. It consists of a kernel module (fuse.ko), a userspace library (libfuse.*) and a mount utility (fusermount).”…”�”}”(hjHh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´K(hj7h²hubj)�”}”(hŒáOne of the most important features of FUSE is allowing secure, non-privileged mounts. This opens up new possibilities for the use of filesystems. A good example is sshfs: a secure network filesystem using the sftp protocol.”h]”hŒáOne of the most important features of FUSE is allowing secure, non-privileged mounts. This opens up new possibilities for the use of filesystems. A good example is sshfs: a secure network filesystem using the sftp protocol.”…”�”}”(hjVh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´K,hj7h²hubj)�”}”(hŒjThe userspace library and utilities are available from the `FUSE homepage: `_”h]”(hŒ;The userspace library and utilities are available from the ”…”�”}”(hjdh²hh³Nh´NubhŒ reference”“”)�”}”(hŒ/`FUSE homepage: `_”h]”hŒFUSE homepage:”…”�”}”(hjnh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œname”ŒFUSE homepage:”Œrefuri”Œhttps://github.com/libfuse/”uh1jlhjdubhŒtarget”“”)�”}”(hŒ ”h]”h}”(h]”Œ fuse-homepage”ah ]”h"]”Œfuse homepage:”ah$]”h&]”Œrefuri”juh1j€Œ referenced”Khjdubeh}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´K1hj7h²hubeh}”(h]”Œ what-is-fuse”ah ]”h"]”Œ what is fuse?”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´K&ubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒFilesystem type”h]”hŒFilesystem type”…”�”}”(hj¡h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjžh²hh³hÇh´K5ubj)�”}”(hŒBThe filesystem type given to mount(2) can be one of the following:”h]”hŒBThe filesystem type given to mount(2) can be one of the following:”…”�”}”(hj¯h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´K7hjžh²hubhŒ block_quote”“”)�”}”(hX=fuse This is the usual way to mount a FUSE filesystem. The first argument of the mount system call may contain an arbitrary string, which is not interpreted by the kernel. fuseblk The filesystem is block device based. The first argument of the mount system call is interpreted as the name of the device. ”h]”hï)�”}”(hhh]”(hô)�”}”(hŒ­fuse This is the usual way to mount a FUSE filesystem. The first argument of the mount system call may contain an arbitrary string, which is not interpreted by the kernel. ”h]”(hú)�”}”(hŒfuse”h]”hŒfuse”…”�”}”(hjÊh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hùh³hÇh´KIt can slow down or indefinitely delay the execution of a filesystem operation creating a DoS against the user or the whole system. For example a suid application locking a system file, and then accessing a file on the mount owner's filesystem could be stopped, and thus causing the system file to be locked forever. ”h]”j)�”}”(hX=It can slow down or indefinitely delay the execution of a filesystem operation creating a DoS against the user or the whole system. For example a suid application locking a system file, and then accessing a file on the mount owner's filesystem could be stopped, and thus causing the system file to be locked forever.”h]”hX?It can slow down or indefinitely delay the execution of a filesystem operation creating a DoS against the user or the whole system. For example a suid application locking a system file, and then accessing a file on the mount owner’s filesystem could be stopped, and thus causing the system file to be locked forever.”…”�”}”(hjá h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´MhjÝ ubah}”(h]”h ]”h"]”h$]”h&]”uh1j0hjÚ ubj1)�”}”(hŒÌIt can present files or directories of unlimited length, or directory structures of unlimited depth, possibly causing a system process to eat up diskspace, memory or other resources, again causing *DoS*. ”h]”j)�”}”(hŒËIt can present files or directories of unlimited length, or directory structures of unlimited depth, possibly causing a system process to eat up diskspace, memory or other resources, again causing *DoS*.”h]”(hŒÅIt can present files or directories of unlimited length, or directory structures of unlimited depth, possibly causing a system process to eat up diskspace, memory or other resources, again causing ”…”�”}”(hjù h²hh³Nh´Nubj¦)�”}”(hŒ*DoS*”h]”hŒDoS”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hjù ubhŒ.”…”�”}”(hjù h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´Mhjõ ubah}”(h]”h ]”h"]”h$]”h&]”uh1j0hjÚ ubeh}”(h]”h ]”h"]”h$]”h&]”jŒ lowerroman”jhjj¹uh1jÈhjÖ ubah}”(h]”h ]”h"]”h$]”h&]”uh1j½h³hÇh´MhjÄ ubj)�”}”(hXyThe solution to this as well as B) is not to allow processes to access the filesystem, which could otherwise not be monitored or manipulated by the mount owner. Since if the mount owner can ptrace a process, it can do all of the above without using a FUSE mount, the same criteria as used in ptrace can be used to check if a process is allowed to access the filesystem or not.”h]”hXyThe solution to this as well as B) is not to allow processes to access the filesystem, which could otherwise not be monitored or manipulated by the mount owner. Since if the mount owner can ptrace a process, it can do all of the above without using a FUSE mount, the same criteria as used in ptrace can be used to check if a process is allowed to access the filesystem or not.”…”�”}”(hj, h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´MhjÄ ubj)�”}”(hŒïNote that the *ptrace* check is not strictly necessary to prevent C/2/i, it is enough to check if mount owner has enough privilege to send signal to the process accessing the filesystem, since *SIGSTOP* can be used to get a similar effect.”h]”(hŒNote that the ”…”�”}”(hj: h²hh³Nh´Nubj¦)�”}”(hŒ*ptrace*”h]”hŒptrace”…”�”}”(hjB h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hj: ubhŒ« check is not strictly necessary to prevent C/2/i, it is enough to check if mount owner has enough privilege to send signal to the process accessing the filesystem, since ”…”�”}”(hj: h²hh³Nh´Nubj¦)�”}”(hŒ *SIGSTOP*”h]”hŒSIGSTOP”…”�”}”(hjT h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hj: ubhŒ% can be used to get a similar effect.”…”�”}”(hj: h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´M'hjÄ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j0hj› ubeh}”(h]”h ]”h"]”h$]”h&]”jjjhjj¹uh1jÈhj— ubah}”(h]”h ]”h"]”h$]”h&]”uh1j½h³hÇh´Mhj… ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j0hjýubeh}”(h]”h ]”h"]”h$]”h&]”jjÙjhjj¹uh1jÈhjùubah}”(h]”h ]”h"]”h$]”h&]”uh1j½h³hÇh´Kðhjèh²hubeh}”(h]”Œhow-are-requirements-fulfilled”ah ]”h"]”Œhow are requirements fulfilled?”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´KîubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒ+I think these limitations are unacceptable?”h]”hŒ+I think these limitations are unacceptable?”…”�”}”(hj› h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj˜ h²hh³hÇh´M-ubj)�”}”(hŒ¼If a sysadmin trusts the users enough, or can ensure through other measures, that system processes will never enter non-privileged mounts, it can relax the last limitation in several ways:”h]”hŒ¼If a sysadmin trusts the users enough, or can ensure through other measures, that system processes will never enter non-privileged mounts, it can relax the last limitation in several ways:”…”�”}”(hj© h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´M/hj˜ h²hubj¾)�”}”(hXz- With the 'user_allow_other' config option. If this config option is set, the mounting user can add the 'allow_other' mount option which disables the check for other users' processes. User namespaces have an unintuitive interaction with 'allow_other': an unprivileged user - normally restricted from mounting with 'allow_other' - could do so in a user namespace where they're privileged. If any process could access such an 'allow_other' mount this would give the mounting user the ability to manipulate processes in user namespaces where they're unprivileged. For this reason 'allow_other' restricts access to users in the same userns or a descendant. - With the 'allow_sys_admin_access' module option. If this option is set, super user's processes have unrestricted access to mounts irrespective of allow_other setting or user namespace of the mounting user. ”h]”j,)�”}”(hhh]”(j1)�”}”(hX�With the 'user_allow_other' config option. If this config option is set, the mounting user can add the 'allow_other' mount option which disables the check for other users' processes. User namespaces have an unintuitive interaction with 'allow_other': an unprivileged user - normally restricted from mounting with 'allow_other' - could do so in a user namespace where they're privileged. If any process could access such an 'allow_other' mount this would give the mounting user the ability to manipulate processes in user namespaces where they're unprivileged. For this reason 'allow_other' restricts access to users in the same userns or a descendant. ”h]”(j)�”}”(hŒ¶With the 'user_allow_other' config option. If this config option is set, the mounting user can add the 'allow_other' mount option which disables the check for other users' processes.”h]”hŒÀWith the ‘user_allow_other’ config option. If this config option is set, the mounting user can add the ‘allow_other’ mount option which disables the check for other users’ processes.”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´M3hj¾ ubj)�”}”(hXÔUser namespaces have an unintuitive interaction with 'allow_other': an unprivileged user - normally restricted from mounting with 'allow_other' - could do so in a user namespace where they're privileged. If any process could access such an 'allow_other' mount this would give the mounting user the ability to manipulate processes in user namespaces where they're unprivileged. For this reason 'allow_other' restricts access to users in the same userns or a descendant.”h]”hXèUser namespaces have an unintuitive interaction with ‘allow_other’: an unprivileged user - normally restricted from mounting with ‘allow_other’ - could do so in a user namespace where they’re privileged. If any process could access such an ‘allow_other’ mount this would give the mounting user the ability to manipulate processes in user namespaces where they’re unprivileged. For this reason ‘allow_other’ restricts access to users in the same userns or a descendant.”…”�”}”(hjÐ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´M7hj¾ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j0hj» ubj1)�”}”(hŒÎWith the 'allow_sys_admin_access' module option. If this option is set, super user's processes have unrestricted access to mounts irrespective of allow_other setting or user namespace of the mounting user. ”h]”j)�”}”(hŒÍWith the 'allow_sys_admin_access' module option. If this option is set, super user's processes have unrestricted access to mounts irrespective of allow_other setting or user namespace of the mounting user.”h]”hŒÓWith the ‘allow_sys_admin_access’ module option. If this option is set, super user’s processes have unrestricted access to mounts irrespective of allow_other setting or user namespace of the mounting user.”…”�”}”(hjè h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´M@hjä ubah}”(h]”h ]”h"]”h$]”h&]”uh1j0hj» ubeh}”(h]”h ]”h"]”h$]”h&]”j€j�uh1j+h³hÇh´M3hj· ubah}”(h]”h ]”h"]”h$]”h&]”uh1j½h³hÇh´M3hj˜ h²hubj)�”}”(hŒœNote that both of these relaxations expose the system to potential information leak or *DoS* as described in points B and C/2/i-ii in the preceding section.”h]”(hŒWNote that both of these relaxations expose the system to potential information leak or ”…”�”}”(hj h²hh³Nh´Nubj¦)�”}”(hŒ*DoS*”h]”hŒDoS”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hj ubhŒ@ as described in points B and C/2/i-ii in the preceding section.”…”�”}”(hj h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´MEhj˜ h²hubeh}”(h]”Œ*i-think-these-limitations-are-unacceptable”ah ]”h"]”Œ+i think these limitations are unacceptable?”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´M-ubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒKernel - userspace interface”h]”hŒKernel - userspace interface”…”�”}”(hj3 h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj0 h²hh³hÇh´MJubj)�”}”(hŒhThe following diagram shows how a filesystem operation (in this example unlink) is performed in FUSE. ::”h]”hŒeThe following diagram shows how a filesystem operation (in this example unlink) is performed in FUSE.”…”�”}”(hjA h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´MLhj0 h²hubjò)�”}”(hXÞ| "rm /mnt/fuse/file" | FUSE filesystem daemon | | | | >sys_read() | | >fuse_dev_read() | | >request_wait() | | [sleep on fc->waitq] | | | >sys_unlink() | | >fuse_unlink() | | [get request from | | fc->unused_list] | | >request_send() | | [queue req on fc->pending] | | [wake up fc->waitq] | [woken up] | >request_wait_answer() | | [sleep on req->waitq] | | | pending] | | [copy req to read buffer] | | [add req to fc->processing] | | sys_write() | | >fuse_dev_write() | | [look up req in fc->processing] | | [remove from fc->processing] | | [copy write buffer to req] | [woken up] | [wake up req->waitq] | | unused_list] | | sys_read() | | >fuse_dev_read() | | >request_wait() | | [sleep on fc->waitq] | | | >sys_unlink() | | >fuse_unlink() | | [get request from | | fc->unused_list] | | >request_send() | | [queue req on fc->pending] | | [wake up fc->waitq] | [woken up] | >request_wait_answer() | | [sleep on req->waitq] | | | pending] | | [copy req to read buffer] | | [add req to fc->processing] | | sys_write() | | >fuse_dev_write() | | [look up req in fc->processing] | | [remove from fc->processing] | | [copy write buffer to req] | [woken up] | [wake up req->waitq] | | unused_list] | | sys_unlink("/mnt/fuse/file") | | [acquire inode semaphore | | for "file"] | | >fuse_unlink() | | [sleep on req->waitq] | | | sys_unlink("/mnt/fuse/file") | | [acquire inode semaphore | | for "file"] | | *DEADLOCK*”h]”hXQ| "rm /mnt/fuse/file" | FUSE filesystem daemon | | | >sys_unlink("/mnt/fuse/file") | | [acquire inode semaphore | | for "file"] | | >fuse_unlink() | | [sleep on req->waitq] | | | sys_unlink("/mnt/fuse/file") | | [acquire inode semaphore | | for "file"] | | *DEADLOCK*”…”�”}”hj¢ sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jñh³hÇh´M€hj0 h²hubj)�”}”(hŒ?The solution for this is to allow the filesystem to be aborted.”h]”hŒ?The solution for this is to allow the filesystem to be aborted.”…”�”}”(hj° h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´M�hj0 h²hubj)�”}”(hŒ **Scenario 2 - Tricky deadlock**”h]”j‰ )�”}”(hjÀ h]”hŒScenario 2 - Tricky deadlock”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jˆ hj¾ ubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´M�hj0 h²hubj)�”}”(hŒ¥This one needs a carefully crafted filesystem. It's a variation on the above, only the call back to the filesystem is not explicit, but is caused by a pagefault. ::”h]”hŒ¤This one needs a carefully crafted filesystem. It’s a variation on the above, only the call back to the filesystem is not explicit, but is caused by a pagefault.”…”�”}”(hjÕ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´M’hj0 h²hubjò)�”}”(hX| Kamikaze filesystem thread 1 | Kamikaze filesystem thread 2 | | | [fd = open("/mnt/fuse/file")] | [request served normally] | [mmap fd to 'addr'] | | [close fd] | [FLUSH triggers 'magic' flag] | [read a byte from addr] | | >do_page_fault() | | [find or create page] | | [lock page] | | >fuse_readpage() | | [queue READ request] | | [sleep on req->waitq] | | | [read request to buffer] | | [create reply header before addr] | | >sys_write(addr - headerlength) | | >fuse_dev_write() | | [look up req in fc->processing] | | [remove from fc->processing] | | [copy write buffer to req] | | >do_page_fault() | | [find or create page] | | [lock page] | | * DEADLOCK *”h]”hX| Kamikaze filesystem thread 1 | Kamikaze filesystem thread 2 | | | [fd = open("/mnt/fuse/file")] | [request served normally] | [mmap fd to 'addr'] | | [close fd] | [FLUSH triggers 'magic' flag] | [read a byte from addr] | | >do_page_fault() | | [find or create page] | | [lock page] | | >fuse_readpage() | | [queue READ request] | | [sleep on req->waitq] | | | [read request to buffer] | | [create reply header before addr] | | >sys_write(addr - headerlength) | | >fuse_dev_write() | | [look up req in fc->processing] | | [remove from fc->processing] | | [copy write buffer to req] | | >do_page_fault() | | [find or create page] | | [lock page] | | * DEADLOCK *”…”�”}”hjã sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jñh³hÇh´M–hj0 h²hubj)�”}”(hŒ,The solution is basically the same as above.”h]”hŒ,The solution is basically the same as above.”…”�”}”(hjñ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´M®hj0 h²hubj)�”}”(hŒçAn additional problem is that while the write buffer is being copied to the request, the request must not be interrupted/aborted. This is because the destination address of the copy may not be valid after the request has returned.”h]”hŒçAn additional problem is that while the write buffer is being copied to the request, the request must not be interrupted/aborted. This is because the destination address of the copy may not be valid after the request has returned.”…”�”}”(hjÿ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´M°hj0 h²hubj)�”}”(hXThis is solved with doing the copy atomically, and allowing abort while the page(s) belonging to the write buffer are faulted with get_user_pages(). The 'req->locked' flag indicates when the copy is taking place, and abort is delayed until this flag is unset.”h]”hXThis is solved with doing the copy atomically, and allowing abort while the page(s) belonging to the write buffer are faulted with get_user_pages(). The ‘req->locked’ flag indicates when the copy is taking place, and abort is delayed until this flag is unset.”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´Mµhj0 h²hubeh}”(h]”Œkernel-userspace-interface”ah ]”h"]”Œkernel - userspace interface”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´MJubeh}”(h]”Œ fuse-overview”ah ]”h"]”Œ fuse overview”ah$]”h&]”uh1hÈhhh²hh³hÇh´Kubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”hÇuh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)�”}”(hÍNŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”Œentry”Œfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”jN Œerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”hÇŒ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”Œnameids”}”(j( j% j4j1j›j˜j‹jˆj5j2jÏjÌj)j&j!jjTjQjåjâj• j’ j- j* j j uŒ nametypes”}”(j( ‰j4‰j›‰j‹ˆj5‰jωj)‰j!‰jT‰jå‰j• ‰j- ‰j ‰uh}”(j% hÊj1hÝj˜j7jˆj‚j2jžjÌj8j&jÒjjjQj,jâjWj’ jèj* j˜ j j0 uŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”…”R”Œparse_messages”]”Œtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nh²hub.