summaryrefslogtreecommitdiffhomepage
path: root/runsc/boot
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-05-06 21:16:40 +0000
committergVisor bot <gvisor-bot@google.com>2020-05-06 21:16:40 +0000
commit1d4eb42012215a5f52b41cd10c008292afb13fd1 (patch)
tree517994168c45eaf2a5189d59a012ed741374ed69 /runsc/boot
parentdafa5cb5fa6f0844545a159c6bf6d1beb388dbe7 (diff)
parent279f1eb7abb28966ef633fa61418bffad4a716b0 (diff)
Merge release-20200422.0-37-g279f1eb (automated)
Diffstat (limited to 'runsc/boot')
-rwxr-xr-xrunsc/boot/boot_amd64_state_autogen.go2
-rwxr-xr-xrunsc/boot/boot_arm64_state_autogen.go2
-rw-r--r--runsc/boot/loader.go12
-rwxr-xr-xrunsc/boot/loader_amd64.go26
-rwxr-xr-xrunsc/boot/loader_arm64.go26
5 files changed, 4 insertions, 64 deletions
diff --git a/runsc/boot/boot_amd64_state_autogen.go b/runsc/boot/boot_amd64_state_autogen.go
index 4b7a38bb8..23dd4b7b3 100755
--- a/runsc/boot/boot_amd64_state_autogen.go
+++ b/runsc/boot/boot_amd64_state_autogen.go
@@ -1,5 +1,3 @@
// automatically generated by stateify.
-// +build amd64
-
package boot
diff --git a/runsc/boot/boot_arm64_state_autogen.go b/runsc/boot/boot_arm64_state_autogen.go
index b94cf6df2..23dd4b7b3 100755
--- a/runsc/boot/boot_arm64_state_autogen.go
+++ b/runsc/boot/boot_arm64_state_autogen.go
@@ -1,5 +1,3 @@
// automatically generated by stateify.
-// +build arm64
-
package boot
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 {
diff --git a/runsc/boot/loader_amd64.go b/runsc/boot/loader_amd64.go
deleted file mode 100755
index 78df86611..000000000
--- a/runsc/boot/loader_amd64.go
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright 2019 The gVisor Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-// +build amd64
-
-package boot
-
-import (
- "gvisor.dev/gvisor/pkg/sentry/syscalls/linux"
-)
-
-func init() {
- // Set the global syscall table.
- syscallTable = linux.AMD64
-}
diff --git a/runsc/boot/loader_arm64.go b/runsc/boot/loader_arm64.go
deleted file mode 100755
index 250785010..000000000
--- a/runsc/boot/loader_arm64.go
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright 2019 The gVisor Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-// +build arm64
-
-package boot
-
-import (
- "gvisor.dev/gvisor/pkg/sentry/syscalls/linux"
-)
-
-func init() {
- // Set the global syscall table.
- syscallTable = linux.ARM64
-}