summaryrefslogtreecommitdiffhomepage
path: root/runsc/cmd
diff options
context:
space:
mode:
authorZach Koopmans <zkoopmans@google.com>2021-03-02 14:08:33 -0800
committergVisor bot <gvisor-bot@google.com>2021-03-02 14:10:51 -0800
commitb8a5420f49a2afd622ec08b5019e1bf537f7da82 (patch)
treeef1e6167acf886322ea42c7056515cec0c24adcd /runsc/cmd
parenta317174673562996a98f5a735771955d6651e233 (diff)
Add reverse flag to mitigate.
Add reverse operation to mitigate that just enables all CPUs. PiperOrigin-RevId: 360511215
Diffstat (limited to 'runsc/cmd')
-rw-r--r--runsc/cmd/mitigate.go10
1 files changed, 1 insertions, 9 deletions
diff --git a/runsc/cmd/mitigate.go b/runsc/cmd/mitigate.go
index 9052f091d..822af1917 100644
--- a/runsc/cmd/mitigate.go
+++ b/runsc/cmd/mitigate.go
@@ -16,7 +16,6 @@ package cmd
import (
"context"
- "io/ioutil"
"github.com/google/subcommands"
"gvisor.dev/gvisor/pkg/log"
@@ -56,14 +55,7 @@ func (m *Mitigate) Execute(_ context.Context, f *flag.FlagSet, args ...interface
return subcommands.ExitUsageError
}
- const path = "/proc/cpuinfo"
- data, err := ioutil.ReadFile(path)
- if err != nil {
- log.Warningf("Failed to read %s: %v", path, err)
- return subcommands.ExitFailure
- }
-
- if err := m.mitigate.Execute(data); err != nil {
+ if err := m.mitigate.Execute(); err != nil {
log.Warningf("Execute failed: %v", err)
return subcommands.ExitFailure
}