summaryrefslogtreecommitdiffhomepage
path: root/runsc/boot/loader.go
diff options
context:
space:
mode:
authorAdin Scannell <ascannell@google.com>2020-05-06 14:12:08 -0700
committergVisor bot <gvisor-bot@google.com>2020-05-06 14:13:48 -0700
commit279f1eb7abb28966ef633fa61418bffad4a716b0 (patch)
tree161fdd7cddde9b9c7303571cde2b9d345f5b0a6a /runsc/boot/loader.go
parentb08222cf3a80a57e77ac4af7a410f188ba01e0f4 (diff)
Fix runsc syscall documentation generation.
We can register any number of tables with any number of architectures, and need not limit the definitions to the architecture in question. This allows runsc to generate documentation for all architectures simultaneously. Similarly, this simplifies the VFSv2 patching process. PiperOrigin-RevId: 310224827
Diffstat (limited to 'runsc/boot/loader.go')
-rw-r--r--runsc/boot/loader.go12
1 files changed, 4 insertions, 8 deletions
diff --git a/runsc/boot/loader.go b/runsc/boot/loader.go
index 79ef3a880..8c8bad11c 100644
--- a/runsc/boot/loader.go
+++ b/runsc/boot/loader.go
@@ -77,8 +77,6 @@ import (
_ "gvisor.dev/gvisor/pkg/sentry/socket/unix"
)
-var syscallTable *kernel.SyscallTable
-
// Loader keeps state needed to start the kernel and run the container..
type Loader struct {
// k is the kernel.
@@ -204,14 +202,12 @@ func New(args Args) (*Loader, error) {
return nil, fmt.Errorf("setting up memory usage: %v", err)
}
- // Patch the syscall table.
- kernel.VFS2Enabled = args.Conf.VFS2
- if kernel.VFS2Enabled {
- vfs2.Override(syscallTable.Table)
+ // Is this a VFSv2 kernel?
+ if args.Conf.VFS2 {
+ kernel.VFS2Enabled = true
+ vfs2.Override()
}
- kernel.RegisterSyscallTable(syscallTable)
-
// Create kernel and platform.
p, err := createPlatform(args.Conf, args.Device)
if err != nil {