mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
committed by
gVisor bot
parent
f375784d83
commit
5c95e1d39c
@@ -7,6 +7,7 @@ go_library(
|
||||
srcs = [
|
||||
"capability.go",
|
||||
"clone.go",
|
||||
"close_range.go",
|
||||
"epoll.go",
|
||||
"futex.go",
|
||||
"linux64_amd64.go",
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
// Copyright 2022 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.
|
||||
|
||||
package strace
|
||||
|
||||
import (
|
||||
"gvisor.dev/gvisor/pkg/abi"
|
||||
"gvisor.dev/gvisor/pkg/abi/linux"
|
||||
)
|
||||
|
||||
// CloseRangeFlagSet is the set of close_range(2) flags.
|
||||
var CloseRangeFlagSet = abi.FlagSet{
|
||||
{
|
||||
Flag: uint64(linux.CLOSE_RANGE_CLOEXEC),
|
||||
Name: "CLOSE_RANGE_CLOEXEC",
|
||||
},
|
||||
{
|
||||
Flag: uint64(linux.CLOSE_RANGE_UNSHARE),
|
||||
Name: "CLOSE_RANGE_UNSHARE",
|
||||
},
|
||||
}
|
||||
@@ -372,6 +372,7 @@ var linuxAMD64 = SyscallMap{
|
||||
433: makeSyscallInfo("fspick", FD, Path, Hex),
|
||||
434: makeSyscallInfo("pidfd_open", Hex, Hex),
|
||||
435: makeSyscallInfo("clone3", Hex, Hex),
|
||||
436: makeSyscallInfo("close_range", FD, FD, CloseRangeFlags),
|
||||
441: makeSyscallInfo("epoll_pwait2", FD, EpollEvents, Hex, Timespec, SigSet),
|
||||
}
|
||||
|
||||
|
||||
@@ -313,6 +313,7 @@ var linuxARM64 = SyscallMap{
|
||||
433: makeSyscallInfo("fspick", FD, Path, Hex),
|
||||
434: makeSyscallInfo("pidfd_open", Hex, Hex),
|
||||
435: makeSyscallInfo("clone3", Hex, Hex),
|
||||
436: makeSyscallInfo("close_range", FD, FD, CloseRangeFlags),
|
||||
441: makeSyscallInfo("epoll_pwait2", FD, EpollEvents, Hex, Timespec, SigSet),
|
||||
}
|
||||
|
||||
|
||||
@@ -496,6 +496,8 @@ func (i *SyscallInfo) pre(t *kernel.Task, args arch.SyscallArguments, maximumBlo
|
||||
output = append(output, ProtectionFlagSet.Parse(uint64(args[arg].Uint())))
|
||||
case MmapFlags:
|
||||
output = append(output, MmapFlagSet.Parse(uint64(args[arg].Uint())))
|
||||
case CloseRangeFlags:
|
||||
output = append(output, CloseRangeFlagSet.Parse(uint64(args[arg].Uint())))
|
||||
case Oct:
|
||||
output = append(output, "0o"+strconv.FormatUint(args[arg].Uint64(), 8))
|
||||
case Hex:
|
||||
|
||||
@@ -244,6 +244,9 @@ const (
|
||||
|
||||
// MmapFlags is the flags argument in mmap(2).
|
||||
MmapFlags
|
||||
|
||||
// CloseRangeFlags are close_range(2) flags.
|
||||
CloseRangeFlags
|
||||
)
|
||||
|
||||
// defaultFormat is the syscall argument format to use if the actual format is
|
||||
|
||||
Reference in New Issue
Block a user