2019-09-12 22:09:01 +00:00
|
|
|
load("//tools/go_stateify:defs.bzl", "go_library")
|
|
|
|
load("@io_bazel_rules_go//go:def.bzl", "go_test")
|
2019-07-18 22:09:14 +00:00
|
|
|
|
|
|
|
package(licenses = ["notice"])
|
|
|
|
|
|
|
|
go_library(
|
|
|
|
name = "vfs",
|
|
|
|
srcs = [
|
|
|
|
"context.go",
|
|
|
|
"debug.go",
|
|
|
|
"dentry.go",
|
|
|
|
"file_description.go",
|
|
|
|
"file_description_impl_util.go",
|
|
|
|
"filesystem.go",
|
2019-11-19 00:25:03 +00:00
|
|
|
"filesystem_impl_util.go",
|
2019-07-18 22:09:14 +00:00
|
|
|
"filesystem_type.go",
|
|
|
|
"mount.go",
|
|
|
|
"mount_unsafe.go",
|
|
|
|
"options.go",
|
|
|
|
"permissions.go",
|
|
|
|
"resolving_path.go",
|
|
|
|
"syscalls.go",
|
2019-08-14 00:52:53 +00:00
|
|
|
"testutil.go",
|
2019-07-18 22:09:14 +00:00
|
|
|
"vfs.go",
|
|
|
|
],
|
|
|
|
importpath = "gvisor.dev/gvisor/pkg/sentry/vfs",
|
|
|
|
visibility = ["//pkg/sentry:internal"],
|
|
|
|
deps = [
|
|
|
|
"//pkg/abi/linux",
|
|
|
|
"//pkg/fspath",
|
|
|
|
"//pkg/sentry/arch",
|
|
|
|
"//pkg/sentry/context",
|
|
|
|
"//pkg/sentry/kernel/auth",
|
|
|
|
"//pkg/sentry/memmap",
|
|
|
|
"//pkg/sentry/usermem",
|
2019-11-21 19:29:49 +00:00
|
|
|
"//pkg/syncutil",
|
2019-07-18 22:09:14 +00:00
|
|
|
"//pkg/syserror",
|
|
|
|
"//pkg/waiter",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
go_test(
|
|
|
|
name = "vfs_test",
|
|
|
|
size = "small",
|
|
|
|
srcs = [
|
2019-08-14 00:52:53 +00:00
|
|
|
"file_description_impl_util_test.go",
|
2019-07-18 22:09:14 +00:00
|
|
|
"mount_test.go",
|
|
|
|
],
|
|
|
|
embed = [":vfs"],
|
2019-08-14 00:52:53 +00:00
|
|
|
deps = [
|
|
|
|
"//pkg/abi/linux",
|
|
|
|
"//pkg/sentry/context",
|
|
|
|
"//pkg/sentry/context/contexttest",
|
|
|
|
"//pkg/sentry/kernel/auth",
|
|
|
|
"//pkg/sentry/usermem",
|
|
|
|
"//pkg/syserror",
|
|
|
|
],
|
2019-07-18 22:09:14 +00:00
|
|
|
)
|