2020-01-27 18:04:07 +00:00
|
|
|
load("//tools:defs.bzl", "go_library", "go_test")
|
2020-01-28 21:10:41 +00:00
|
|
|
load("//tools/go_generics:defs.bzl", "go_template_instance")
|
2019-07-18 22:09:14 +00:00
|
|
|
|
2020-01-27 18:04:07 +00:00
|
|
|
licenses(["notice"])
|
2019-07-18 22:09:14 +00:00
|
|
|
|
2020-01-28 21:10:41 +00:00
|
|
|
go_template_instance(
|
|
|
|
name = "epoll_interest_list",
|
|
|
|
out = "epoll_interest_list.go",
|
|
|
|
package = "vfs",
|
|
|
|
prefix = "epollInterest",
|
|
|
|
template = "//pkg/ilist:generic_list",
|
|
|
|
types = {
|
|
|
|
"Element": "*epollInterest",
|
|
|
|
"Linker": "*epollInterest",
|
|
|
|
},
|
|
|
|
)
|
|
|
|
|
2019-07-18 22:09:14 +00:00
|
|
|
go_library(
|
|
|
|
name = "vfs",
|
|
|
|
srcs = [
|
2020-01-28 20:06:58 +00:00
|
|
|
"anonfs.go",
|
2019-07-18 22:09:14 +00:00
|
|
|
"context.go",
|
|
|
|
"debug.go",
|
|
|
|
"dentry.go",
|
2019-12-30 19:35:06 +00:00
|
|
|
"device.go",
|
2020-01-28 21:10:41 +00:00
|
|
|
"epoll.go",
|
|
|
|
"epoll_interest_list.go",
|
2019-07-18 22:09:14 +00:00
|
|
|
"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",
|
2019-12-11 21:40:57 +00:00
|
|
|
"pathname.go",
|
2019-07-18 22:09:14 +00:00
|
|
|
"permissions.go",
|
|
|
|
"resolving_path.go",
|
|
|
|
"vfs.go",
|
|
|
|
],
|
|
|
|
visibility = ["//pkg/sentry:internal"],
|
|
|
|
deps = [
|
|
|
|
"//pkg/abi/linux",
|
2020-01-27 23:17:58 +00:00
|
|
|
"//pkg/context",
|
2020-03-06 20:58:45 +00:00
|
|
|
"//pkg/fd",
|
2019-07-18 22:09:14 +00:00
|
|
|
"//pkg/fspath",
|
2020-02-25 21:25:36 +00:00
|
|
|
"//pkg/gohacks",
|
2020-02-14 19:11:55 +00:00
|
|
|
"//pkg/log",
|
2020-03-06 20:58:45 +00:00
|
|
|
"//pkg/safemem",
|
2019-07-18 22:09:14 +00:00
|
|
|
"//pkg/sentry/arch",
|
2020-03-06 20:58:45 +00:00
|
|
|
"//pkg/sentry/fs",
|
2020-01-29 19:15:59 +00:00
|
|
|
"//pkg/sentry/fs/lock",
|
2019-07-18 22:09:14 +00:00
|
|
|
"//pkg/sentry/kernel/auth",
|
2020-03-16 22:59:29 +00:00
|
|
|
"//pkg/sentry/limits",
|
2019-07-18 22:09:14 +00:00
|
|
|
"//pkg/sentry/memmap",
|
2020-01-10 06:00:42 +00:00
|
|
|
"//pkg/sync",
|
2019-07-18 22:09:14 +00:00
|
|
|
"//pkg/syserror",
|
2020-01-27 23:17:58 +00:00
|
|
|
"//pkg/usermem",
|
2019-07-18 22:09:14 +00:00
|
|
|
"//pkg/waiter",
|
2020-03-06 20:58:45 +00:00
|
|
|
"@org_golang_x_sys//unix:go_default_library",
|
2019-07-18 22:09:14 +00:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
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",
|
|
|
|
],
|
2020-01-27 18:04:07 +00:00
|
|
|
library = ":vfs",
|
2019-08-14 00:52:53 +00:00
|
|
|
deps = [
|
|
|
|
"//pkg/abi/linux",
|
2020-01-27 23:17:58 +00:00
|
|
|
"//pkg/context",
|
|
|
|
"//pkg/sentry/contexttest",
|
2020-01-10 06:00:42 +00:00
|
|
|
"//pkg/sync",
|
2019-08-14 00:52:53 +00:00
|
|
|
"//pkg/syserror",
|
2020-01-27 23:17:58 +00:00
|
|
|
"//pkg/usermem",
|
2019-08-14 00:52:53 +00:00
|
|
|
],
|
2019-07-18 22:09:14 +00:00
|
|
|
)
|