Documentation ¶
Index ¶
- Constants
- Variables
- func ConstArg(t prog.Type, v uint64) prog.Arg
- func DataArg(t prog.Type, data []byte) prog.Arg
- func GenBuff(bufVal []byte, size uint64) []byte
- func GetSyzType(typ prog.Type) string
- func GroupArg(t prog.Type, inner []prog.Arg) prog.Arg
- func PointerArg(t prog.Type, address uint64, vmaSize uint64, res prog.Arg) prog.Arg
- func ResultArg(t prog.Type, r *prog.ResultArg, v uint64) prog.Arg
- func ReturnArg(t prog.Type) *prog.ResultArg
- func UnionArg(t prog.Type, opt prog.Arg) prog.Arg
- type ArrayType
- type Binop
- type BufferType
- type Call
- type DynamicType
- type Expression
- type Field
- type FlagType
- type Flags
- type IntType
- type Ints
- type IpType
- type Macro
- type Operation
- type Pair
- type Parenthetical
- type PointerType
- type Set
- type SocketDesc
- type StructType
- type Syscall
- type Trace
- type TraceTree
- type Type
- type Unop
Constants ¶
View Source
const ( OR = iota AND XOR NOT LSHIFT RSHIFT ONESCOMP TIMES LAND LOR LEQUAL )
Variables ¶
View Source
var ( Strace_ExpressionType = "Expression Type" Strace_CallType = "Call Type" Strace_IntType = "Int Type" Strace_FieldType = "Field Type" Strace_StructType = "Struct Type" Strace_ArrayType = "Array Type" Strace_PointerType = "Pointer Type" Strace_BufferType = "Buffer Type" Strace_FlagType = "Flag Type" Strace_Ipv4Type = "Ipv4 Type" )
View Source
var ( EnabledSyscalls = map[string]bool{} Unsupported = map[string]bool{ "brk": true, "": true, "execve": true, "access": true, "gettimeofday": true, "kill": true, "arch_prctl": true, "getcwd": true, "setdomainname": true, "reboot": true, "getppid": true, "umask": true, "adjtimex": true, "nanosleep": true, "wait4": true, "wait": true, "futex": true, "rt_sigprocmask": true, "rt_sigaction": true, "rt_sigtimedwait": true, "rt_sigreturn": true, "rt_sigqueueinfo": true, "rt_sigsuspend": true, "tgkill": true, "sysfs": true, "clone": true, "newfstatat": true, "getsid": true, "getcpu": true, "sched_get_priority_min": true, "sched_get_priority_max": true, } Accept_labels = map[string]string{ "fd": "", "sock": "", "sock_alg": "$alg", "sock_in": "$inet", "sock_in6": "$inet6", "sock_netrom": "$netrom", "sock_nfc_llcp": "$nfc_llcp", "sock_sctp": "$sctp", "sock_unix": "$unix", "sock_netlink": "$inet6", } Bind_labels = map[string]string{ "fd": "", "sock": "", "sock_alg": "$alg", "sock_bt_hci": "$bt_hci", "sock_bt_l2cap": "$bt_l2cap", "sock_bt_rfcomm": "$bt_rfcomm", "sock_bt_sco": "$bt_sco", "sock_in": "$inet", "sock_in6": "$inet6", "sock_netlink": "$netlink", "sock_netrom": "$netrom", "sock_nfc_llcp": "$nfc_llcp", "sock_sctp": "$sctp", "sock_unix": "$unix", "AF_INET": "$inet", "AF_INET6": "$inet6", "sock_packet": "$packet", } Connect_labels = map[string]string{ "fd": "", "sock": "", "sock_bt_l2cap": "$bt_l2cap", "sock_bt_rfcomm": "$bt_rfcomm", "sock_bt_sco": "$bt_sco", "sock_in": "$inet", "sock_in6": "$inet6", "sock_netlink": "$netlink", "sock_netrom": "$netrom", "sock_nfc_llcp": "$nfc_llcp", "sock_nfc_raw": "$nfc_raw", "sock_sctp": "$sctp", "sock_unix": "$unix", "AF_INET": "$inet", "AF_INET6": "$inet6", } Bpf_labels = map[string]string{ "BPF_PROG_LOAD": "$PROG_LOAD", "BPF_MAP_CREATE": "$MAP_CREATE", "BPF_MAP_UPDATE_ELEM": "$MAP_UPDATE_ELEM", "BPF_MAP_LOOKUP_ELEM": "$MAP_LOOKUP_ELEM", "BPF_MAP_DELETE_ELEM": "$MAP_DELETE_ELEM", "BPF_MAP_GET_NEXT_KEY": "$MAP_GET_NEXT_KEY", } Setsockopt_labels = map[Pair]string{}/* 157 elements not displayed */ Getsockopt_labels = map[Pair]string{}/* 155 elements not displayed */ Getsockname_labels = map[string]string{ "fd": "", "sock": "", "sock_in": "$inet", "sock_in6": "$inet6", "sock_netlink": "$netlink", "sock_netrom": "$netrom", "sock_sctp": "$sctp", "sock_unix": "$unix", } SocketLevel_map = map[string]string{ "SOL_SOCKET": "SOL_SOCKET", "SOL_IPV6": "IPPROTO_IPV6", "SOL_ICMPV6": "SOL_ICMPV6", "SOL_TCP": "IPPROTO_TCP", "SOL_RAW": "IPPROTO_ICMP", "SOL_PACKET": "SOL_PACKET", "SOL_IP": "IPPROTO_IP", "SOL_SCTP": "SOL_SCTP", } Sendto_labels = map[string]string{ "fd": "", "sock": "", "sock_in": "$inet", "sock_in6": "$inet6", "sock_sctp": "$sctp", "sock_unix": "$unix", "sock_netlink": "$inet6", } Sendmsg_labels = map[string]string{ "fd": "", "sock": "", "sock_in6": "", "sock_in": "", "sock_sctp": "$sctp", "sock_unix": "$unix", "sock_algconn": "$alg", "sock_kcm": "$kcm", "sock_netlink": "$netlink", "sock_netrom": "$netrom", "sock_nfc_llcp": "$nfc_llcp", } Recvfrom_labels = map[string]string{ "fd": "", "sock": "", "sock_in": "$inet", "sock_in6": "$inet6", "sock_sctp": "$sctp", "sock_unix": "$unix", "sock_netlink": "$inet6", "sock_packet": "$packet", } Ioctl_map = map[string]string{ "FIONBIO": "$int_in", "FIOASYNC": "$int_in", "FS_IOC_GETFLAGS": "$int_out", "FS_IOC_SETFLAGS": "$int_in", "SIOCGIFINDEX": "$sock_SIOCGIFINDEX", "SIOCGIFNAME": "$sock_ifreq", "SIOCGIFCONF": "$sock_SIOCGIFCONF", "SIOCSIFLINK": "$sock_ifreq", "SIOCGIFFLAGS": "$sock_ifreq", "SIOCSIFFLAGS": "$sock_ifreq", "SIOCGIFADDR": "$sock_ifreq", "SIOCSIFADDR": "$sock_ifreq", "SIOCGIFDSTADDR": "$sock_ifreq", "SIOCSIFDSTADDR": "$sock_ifreq", "SIOCGIFBRDADDR": "$sock_ifreq", "SIOCSIFBRDADDR": "$sock_ifreq", "SIOCGIFNETMASK": "$sock_ifreq", "SIOCSIFNETMASK": "$sock_ifreq", "SIOCGIFMETRIC": "$sock_ifreq", "SIOCSIFMETRIC": "$sock_ifreq", "SIOCGIFMEM": "$sock_ifreq", "SIOCSIFMEM": "$sock_ifreq", "SIOCGIFMTU": "$sock_ifreq", "SIOCSIFMTU": "$sock_ifreq", "SIOCSIFNAME": "$sock_ifreq", "SIOCSIFHWADDR": "$sock_ifreq", "SIOCGIFENCAP": "$sock_ifreq", "SIOCSIFENCAP": "$sock_ifreq", "SIOCGIFSLAVE": "$sock_ifreq", "SIOCSIFSLAVE": "$sock_ifreq", "SIOCADDMULTI": "$sock_ifreq", "SIOCDELMULTI": "$sock_ifreq", "SIOCSIFPFLAGS": "$sock_ifreq", "SIOCGIFPFLAGS": "$sock_ifreq", "SIOCDIFADDR": "$sock_ifreq", "SIOCSIFHWBROADCAST": "$sock_ifreq", "SIOCGIFCOUNT": "$sock_ifreq", "SIOCGIFTXQLEN": "$sock_ifreq", "SIOCSIFTXQLEN": "$sock_ifreq", "SIOCETHTOOL": "$sock_ifreq", "SIOCGMIIPHY": "$sock_ifreq", "SIOCGMIIREG": "$sock_ifreq", "SIOCSMIIREG": "$sock_ifreq", "SIOCWANDEV": "$sock_ifreq", } Socket_labels_pair = map[Pair]string{ Pair{"AF_INET", "SOCK_STREAM"}: "$inet", Pair{"AF_INET", "SOCK_DGRAM"}: "$inet", Pair{"AF_INET", "SOCK_STREAM"}: "$inet", Pair{"AF_INET", "SOCK_STREAM"}: "$inet", Pair{"AF_INET", "SOCK_STREAM"}: "$inet", Pair{"AF_INET", "SOCK_STREAM"}: "$inet", Pair{"AF_INET", "SOCK_STREAM"}: "$inet", Pair{"AF_INET", "SOCK_STREAM"}: "$inet", Pair{"AF_INET", "SOCK_STREAM"}: "$inet", Pair{"AF_INET", "SOCK_STREAM"}: "$inet", Pair{"AF_INET", "SOCK_RAW"}: "$inet_icmp_raw", Pair{"AF_PACKET", "SOCK_RAW"}: "$packet", Pair{"AF_PACKET", "SOCK_DGRAM"}: "$packet", Pair{"AF_INET", "SOL_SCTP"}: "$inet_sctp", } Socket_labels = map[string]string{ "AF_INET": "$inet", "AF_INET6": "$inet6", "AF_KCM": "$kcm", "AF_UNIX": "$unix", "AF_NETLINK": "$netlink", "AF_PACKET": "$packet", } Fcntl_labels = map[string]string{ "F_DUPFD": "$dupfd", "F_DUPFD_CLOEXEC": "$dupfd", "F_GETFD": "$getflags", "F_GETFL": "$getflags", "F_GETSIG": "$getflags", "F_GETLEASE": "$getflags", "F_GETPIPE_SZ": "$getflags", "F_GET_SEALS": "$getflags", "F_SETFD": "$setflags", "F_SETFL": "$setstatus", "F_SETLK": "$lock", "F_SETLKW": "$lock", "F_GETLK": "$lock", "F_GETOWN": "$getown", "F_SETOWN": "$setown", "F_GETOWN_EX": "$getownex", "F_SETOWN_EX": "$setownex", "F_SETSIG": "$setsig", "F_SETLEASE": "$setlease", "DN_MULTISHOT": "$notify", "DN_ACCESS": "$notify", "DN_MODIFY": "$notify", "DN_CREATE": "$notify", "DN_DELETE": "$notify", "DN_RENAME": "$notify", "DN_ATTRIB": "$notify", "F_SETPIPE_SZ": "$setpipe", "F_ADD_SEALS": "$addseals", } Keyctl_labels = map[string]string{ "KEYCTL_GET_KEYRING_ID": "$get_keyring_id", "KEYCTL_JOIN_SESSION_KEYRING": "$join", "KEYCTL_UPDATE": "$update", "KEYCTL_REVOKE": "$revoke", "KEYCTL_DESCRIBE": "$describe", "KEYCTL_CLEAR": "$clear", "KEYCTL_LINK": "$link", "KEYCTL_UNLINK": "$unlink", "KEYCTL_SEARCH": "$search", "KEYCTL_READ": "$read", "KEYCTL_CHOWN": "$chown", "KEYCTL_SETPERM": "$setperm", "KEYCTL_INSTANTIATE": "$instantiate", "KEYCTL_NEGATE": "$negate", "KEYCTL_SET_REQKEY_KEYRING": "$set_reqkey_keyring", "KEYCTL_SET_TIMEOUT": "$set_timeout", "KEYCTL_ASSUME_AUTHORITY": "$assume_authority", "KEYCTL_GET_SECURITY": "$get_security", "KEYCTL_SESSION_TO_PARENT": "$session_to_parent", "KEYCTL_REJECT": "$reject", "KEYCTL_INSTANTIATE_IOV": "$instantiate_iov", "KEYCTL_INVALIDATE": "$invalidate", "KEYCTL_GET_PERSISTENT": "$get_persistent", } Prctl_labels = map[string]string{ "PR_GET_DUMPABLE": "$void", "PR_GET_KEEPCAPS": "$void", "PR_GET_NO_NEW_PRIVS": "$void", "PR_GET_SECCOMP": "$void", "PR_GET_SECUREBITS": "$void", "PR_GET_TIMERSLACK": "$void", "PR_GET_TIMING": "$void", "PR_TASK_PERF_EVENTS_DISABLE": "$void", "PR_TASK_PERF_EVENTS_ENABLE": "$void", "PR_MCE_KILL_GE": "$void", "PR_CAPBSET_READ": "$intptr", "PR_CAPBSET_DROP": "$intptr", "PR_SET_CHILD_SUBREAPER": "$intptr", "PR_SET_DUMPABLE": "$intptr", "PR_SET_FPEMU": "$intptr", "PR_SET_KEEPCAPS": "$intptr", "PR_SET_NO_NEW_PRIVS": "$intptr", "PR_SET_PDEATHSIG": "$intptr", "PR_SET_SECUREBITS": "$intptr", "PR_SET_TIMERSLACK": "$intptr", "PR_SET_TIMING": "$intptr", "PR_SET_TSC": "$intptr", "PR_SET_UNALIGN": "$intptr", "PR_MCE_KILL": "$intptr", "PR_GET_CHILD_SUBREAPER": "$getreaper", "PR_GET_ENDIAN": "$getreaper", "PR_GET_FPEMU": "$getreaper", "PR_GET_FPEXC": "$getreaper", "PR_GET_PDEATHSIG": "$getreaper", "PR_GET_TID_ADDRESS": "$getreaper", "PR_GET_TSC": "$getreaper", "PR_GET_UNALIGN": "$getreaper", "PR_SET_ENDIAN": "$setendian", "PR_SET_FPEXC": "$setfpexc", "PR_SET_NAME": "$setname", "PR_GET_NAME": "$getname", "PR_SET_PTRACER": "$setptracer", } Special_Consts = map[string]uint64{}/* 189 elements not displayed */ )
Functions ¶
func GetSyzType ¶
func PointerArg ¶
Types ¶
type ArrayType ¶
func NewArrayType ¶
type Binop ¶
type Binop struct { Operand1 *Expression Op Operation Operand2 *Expression }
type BufferType ¶
type BufferType struct {
Val string
}
func NewBufferType ¶
func NewBufferType(val string) (typ *BufferType)
func (*BufferType) Name ¶
func (b *BufferType) Name() string
func (*BufferType) String ¶
func (b *BufferType) String() string
type Call ¶
func NewCallType ¶
type DynamicType ¶
type DynamicType struct { BeforeCall *Expression AfterCall *Expression }
func NewDynamicType ¶
func NewDynamicType(before, after Type) *DynamicType
func (*DynamicType) Name ¶
func (d *DynamicType) Name() string
func (*DynamicType) String ¶
func (d *DynamicType) String() string
type Expression ¶
type Expression struct { BinOp *Binop Unop *Unop FlagType *FlagType FlagsType Flags IntType *IntType MacroType *Macro SetType *Set IntsType Ints }
func NewExpression ¶
func NewExpression(typ Type) (exp *Expression)
func (*Expression) Name ¶
func (r *Expression) Name() string
func (*Expression) String ¶
func (r *Expression) String() string
type Macro ¶
func NewMacroType ¶
type Parenthetical ¶
type Parenthetical struct {
// contains filtered or unexported fields
}
func NewParenthetical ¶
func NewParenthetical() *Parenthetical
type PointerType ¶
func NewPointerType ¶
func NewPointerType(addr uint64, res Type) (typ *PointerType)
func NullPointer ¶
func NullPointer() (typ *PointerType)
func (*PointerType) IsNull ¶
func (typ *PointerType) IsNull() bool
func (*PointerType) Name ¶
func (p *PointerType) Name() string
func (*PointerType) String ¶
func (p *PointerType) String() string
type Set ¶
type Set struct {
Exprs []*Expression
}
func NewSet ¶
func NewSet(exprs []*Expression) *Set
type SocketDesc ¶
type StructType ¶
type StructType struct {
Fields []Type
}
func NewStructType ¶
func NewStructType(types []Type) (typ *StructType)
func (*StructType) Name ¶
func (s *StructType) Name() string
func (*StructType) String ¶
func (s *StructType) String() string
type Syscall ¶
type Syscall struct { CallName string Args []Type Pid int64 Ret int64 Cover []uint64 Paused bool Resumed bool }
func NewSyscall ¶
type TraceTree ¶
type TraceTree struct { TraceMap map[int64]*Trace Ptree map[int64][]int64 RootPid int64 Filename string }
func NewTraceTree ¶
func NewTraceTree() (tree *TraceTree)
type Unop ¶
type Unop struct { Operand *Expression Op Operation }
Click to show internal directories.
Click to hide internal directories.