diff options
-rwxr-xr-x | pkg/sentry/kernel/seqatomic_taskgoroutineschedinfo_unsafe.go | 3 | ||||
-rwxr-xr-x | pkg/sentry/platform/ring0/defs_impl.go | 2 | ||||
-rwxr-xr-x | pkg/sentry/time/seqatomic_parameters_unsafe.go | 3 | ||||
-rw-r--r-- | runsc/boot/config.go | 4 | ||||
-rw-r--r-- | runsc/main.go | 1 |
5 files changed, 10 insertions, 3 deletions
diff --git a/pkg/sentry/kernel/seqatomic_taskgoroutineschedinfo_unsafe.go b/pkg/sentry/kernel/seqatomic_taskgoroutineschedinfo_unsafe.go index be6b07629..895abb129 100755 --- a/pkg/sentry/kernel/seqatomic_taskgoroutineschedinfo_unsafe.go +++ b/pkg/sentry/kernel/seqatomic_taskgoroutineschedinfo_unsafe.go @@ -1,11 +1,12 @@ package kernel import ( + "unsafe" + "fmt" "gvisor.dev/gvisor/third_party/gvsync" "reflect" "strings" - "unsafe" ) // SeqAtomicLoad returns a copy of *ptr, ensuring that the read does not race diff --git a/pkg/sentry/platform/ring0/defs_impl.go b/pkg/sentry/platform/ring0/defs_impl.go index ea3f514cd..a36a17e37 100755 --- a/pkg/sentry/platform/ring0/defs_impl.go +++ b/pkg/sentry/platform/ring0/defs_impl.go @@ -2,13 +2,13 @@ package ring0 import ( "gvisor.dev/gvisor/pkg/cpuid" + "reflect" "syscall" "fmt" "gvisor.dev/gvisor/pkg/sentry/platform/ring0/pagetables" "gvisor.dev/gvisor/pkg/sentry/usermem" "io" - "reflect" ) var ( diff --git a/pkg/sentry/time/seqatomic_parameters_unsafe.go b/pkg/sentry/time/seqatomic_parameters_unsafe.go index b4fb0a7f0..f6560d0bb 100755 --- a/pkg/sentry/time/seqatomic_parameters_unsafe.go +++ b/pkg/sentry/time/seqatomic_parameters_unsafe.go @@ -1,11 +1,12 @@ package time import ( + "unsafe" + "fmt" "gvisor.dev/gvisor/third_party/gvsync" "reflect" "strings" - "unsafe" ) // SeqAtomicLoad returns a copy of *ptr, ensuring that the read does not race diff --git a/runsc/boot/config.go b/runsc/boot/config.go index 6f1eb9a41..7ae0dd05d 100644 --- a/runsc/boot/config.go +++ b/runsc/boot/config.go @@ -198,6 +198,9 @@ type Config struct { // sandbox and Gofer process run as root inside a user namespace with root // mapped to the caller's user. Rootless bool + + // AlsoLogToStderr allows to send log messages to stderr. + AlsoLogToStderr bool } // ToFlags returns a slice of flags that correspond to the given Config. @@ -223,6 +226,7 @@ func (c *Config) ToFlags() []string { "--net-raw=" + strconv.FormatBool(c.EnableRaw), "--num-network-channels=" + strconv.Itoa(c.NumNetworkChannels), "--rootless=" + strconv.FormatBool(c.Rootless), + "--alsologtostderr=" + strconv.FormatBool(c.AlsoLogToStderr), } if c.TestOnlyAllowRunAsCurrentUserWithoutChroot { // Only include if set since it is never to be used by users. diff --git a/runsc/main.go b/runsc/main.go index bc83c57a2..5823819f4 100644 --- a/runsc/main.go +++ b/runsc/main.go @@ -190,6 +190,7 @@ func main() { EnableRaw: *netRaw, NumNetworkChannels: *numNetworkChannels, Rootless: *rootless, + AlsoLogToStderr: *alsoLogToStderr, TestOnlyAllowRunAsCurrentUserWithoutChroot: *testOnlyAllowRunAsCurrentUserWithoutChroot, } |