mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Merge pull request #5764 from zhlhahaha:2126-2
PiperOrigin-RevId: 372993341
This commit is contained in:
@@ -18,6 +18,7 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"runtime"
|
||||
|
||||
"github.com/google/subcommands"
|
||||
"gvisor.dev/gvisor/pkg/log"
|
||||
@@ -72,6 +73,11 @@ func (m *Mitigate) SetFlags(f *flag.FlagSet) {
|
||||
|
||||
// Execute implements subcommands.Command.Execute.
|
||||
func (m *Mitigate) Execute(_ context.Context, f *flag.FlagSet, args ...interface{}) subcommands.ExitStatus {
|
||||
if runtime.GOARCH == "arm64" || runtime.GOARCH == "arm" {
|
||||
log.Warningf("As ARM is not affected by MDS, mitigate does not support")
|
||||
return subcommands.ExitFailure
|
||||
}
|
||||
|
||||
if f.NArg() != 0 {
|
||||
f.Usage()
|
||||
return subcommands.ExitUsageError
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// +build amd64
|
||||
|
||||
package cmd
|
||||
|
||||
import (
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// +build amd64
|
||||
|
||||
package mitigate
|
||||
|
||||
import (
|
||||
|
||||
Reference in New Issue
Block a user