Commit graph

4 commits

Author SHA1 Message Date
Victor Hsieh
4799680841 fuse: provide a mount API
The mount API is useful especially in an environment without typical
fusermount setuid program (e.g. Android).

BUG=b:173507504
TEST=create a FUSE fs, run with cap_sys_admin, can read from the mount
     point
TEST=build_test.py

Change-Id: Ibfc220e8cf59b54d55f5d030d2e4c4375d3654cb
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2556079
Commit-Queue: Victor Hsieh <victorhsieh@chromium.org>
Tested-by: Victor Hsieh <victorhsieh@chromium.org>
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>
2020-12-01 23:41:02 +00:00
Victor Hsieh
c7ae4b7890 fuse: implement a worker to work with /dev/fuse
BUG=b:168305155
TEST=./build_test

Change-Id: Ibeef30a69a1ebd8813f4bf35027a1f8be4e573cd
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2500945
Tested-by: Victor Hsieh <victorhsieh@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>
Commit-Queue: Victor Hsieh <victorhsieh@chromium.org>
2020-11-05 18:50:17 +00:00
Victor Hsieh
fe8a4ba74b fuse: Replace split_at in the Writer trait with write_at
This simplies the complexity to deal with ownership and mutability,
while considering both the virtio-fs and regular FUSE use cases.

BUG=b:168305155
TEST=./build_test

Change-Id: Ic77d8e0b922e74a5733b99eeff41946177666c8d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2500944
Tested-by: Victor Hsieh <victorhsieh@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>
Commit-Queue: Victor Hsieh <victorhsieh@chromium.org>
2020-11-03 00:14:08 +00:00
Victor Hsieh
bae88f4f65 fuse: extract FUSE as a crate from virtio/fs
The current crate still require some work to be really reusable as a
regular FUSE, i.e. with a new reader/writer against /dev/fuse. This
change intends to focus on creating the crate, without trying to find
the optimal interface, and still keep virtio/fs working.

BUG=b:168305155
TEST=./build_test
TEST=USE='asan fuzzer' emerge-hatch crosvm

Change-Id: I8b623c9262221113b720c10125a6770763f14dc8
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2466484
Tested-by: Victor Hsieh <victorhsieh@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>
Commit-Queue: Victor Hsieh <victorhsieh@chromium.org>
2020-10-27 16:18:51 +00:00