parser

package
v0.0.0-...-4e6bda9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 20, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MapFixed   = "MAP_FIXED"
	RemapFixed = "MREMAP_FIXED"
)

Variables

View Source
var PreprocessMap = map[string]PreprocessHook{
	"accept":      Preprocess_Accept,
	"accept4":     Preprocess_Accept,
	"bind":        Preprocess_Bind,
	"connect":     Preprocess_Connect,
	"fcntl":       Preprocess_Fcntl,
	"getsockname": Preprocess_Getsockname,
	"getsockopt":  Preprocess_Getsockopt,
	"ioctl":       Preprocess_Ioctl,
	"open":        Preprocess_Open,
	"prctl":       Preprocess_Prctl,
	"recvfrom":    Preprocess_Recvfrom,
	"mknod":       Preprocess_Mknod,
	"modify_ldt":  Preprocess_ModifyLdt,
	"openat":      Preprocess_Openat,
	"sendto":      Preprocess_Sendto,
	"setsockopt":  Preprocess_Setsockopt,
	"shmctl":      Preprocess_Shmctl,
	"socket":      Preprocess_Socket,
}

Functions

func AddDependency

func AddDependency(start, length uint64, addr prog.Arg, ctx *Context)

func GenDefaultArg

func GenDefaultArg(syzType prog.Type, ctx *Context) prog.Arg

func GetFixedFlag

func GetFixedFlag(ctx *Context) uint64

func IdentifyBindConnectUnionType

func IdentifyBindConnectUnionType(ctx *Context) int

func IdentifyUnionType

func IdentifyUnionType(ctx *Context) int

func NewRCache

func NewRCache() returnCache

func ParseAddr

func ParseAddr(length uint64, syzType prog.Type, straceType strace_types.Type, ctx *Context) (prog.Arg, uint64)

func ParseFd

func ParseFd(syzType prog.Type, straceType strace_types.Type, ctx *Context) prog.Arg

func ParseFlags

func ParseFlags(syzType prog.Type, straceType strace_types.Type, ctx *Context, mapFlag bool) prog.Arg

func ParseInnerCall

func ParseInnerCall(syzType prog.Type, straceType *strace_types.Call, ctx *Context) prog.Arg

func ParseLength

func ParseLength(straceType strace_types.Type, ctx *Context) uint64

func ParseMadvise

func ParseMadvise(madvise *prog.Syscall, syscall *strace_types.Syscall, ctx *Context) *prog.Call

func ParseMemoryCall

func ParseMemoryCall(ctx *Context) *prog.Call

func ParseMlock

func ParseMlock(mlock *prog.Syscall, syscall *strace_types.Syscall, ctx *Context) *prog.Call

func ParseMmap

func ParseMmap(mmap *prog.Syscall, syscall *strace_types.Syscall, ctx *Context) *prog.Call

func ParseMprotect

func ParseMprotect(mprotect *prog.Syscall, syscall *strace_types.Syscall, ctx *Context) *prog.Call

func ParseMremap

func ParseMremap(mremap *prog.Syscall, syscall *strace_types.Syscall, ctx *Context) *prog.Call

func ParseMsync

func ParseMsync(msync *prog.Syscall, syscall *strace_types.Syscall, ctx *Context) *prog.Call

func ParseMunlock

func ParseMunlock(munlock *prog.Syscall, syscall *strace_types.Syscall, ctx *Context) *prog.Call

func ParseMunmap

func ParseMunmap(munmap *prog.Syscall, syscall *strace_types.Syscall, ctx *Context) *prog.Call

func ParseShmat

func ParseShmat(shmat *prog.Syscall, syscall *strace_types.Syscall, ctx *Context) *prog.Call

func Parse_ArrayType

func Parse_ArrayType(syzType *prog.ArrayType, straceType strace_types.Type, ctx *Context) (prog.Arg, error)

func Parse_BufferType

func Parse_BufferType(syzType *prog.BufferType, straceType strace_types.Type, ctx *Context) (prog.Arg, error)

func Parse_ConstType

func Parse_ConstType(syzType prog.Type, straceType strace_types.Type, ctx *Context) (prog.Arg, error)

func Parse_ProcType

func Parse_ProcType(syzType *prog.ProcType, straceType strace_types.Type, ctx *Context) (prog.Arg, error)

func Parse_PtrType

func Parse_PtrType(syzType *prog.PtrType, straceType strace_types.Type, ctx *Context) (prog.Arg, error)

func Parse_ResourceType

func Parse_ResourceType(syzType *prog.ResourceType, straceType strace_types.Type, ctx *Context) (prog.Arg, error)

func Parse_StructType

func Parse_StructType(syzType *prog.StructType, straceType strace_types.Type, ctx *Context) (prog.Arg, error)

func Parse_UnionType

func Parse_UnionType(syzType *prog.UnionType, straceType strace_types.Type, ctx *Context) (prog.Arg, error)

func Parse_VmaType

func Parse_VmaType(syzType *prog.VmaType, straceType strace_types.Type, ctx *Context) (prog.Arg, error)

func Preprocess

func Preprocess(ctx *Context)

func Preprocess_Accept

func Preprocess_Accept(ctx *Context)

func Preprocess_Bind

func Preprocess_Bind(ctx *Context)

func Preprocess_Connect

func Preprocess_Connect(ctx *Context)

func Preprocess_Fcntl

func Preprocess_Fcntl(ctx *Context)

func Preprocess_Getsockname

func Preprocess_Getsockname(ctx *Context)

func Preprocess_Getsockopt

func Preprocess_Getsockopt(ctx *Context)

func Preprocess_Ioctl

func Preprocess_Ioctl(ctx *Context)

func Preprocess_Mknod

func Preprocess_Mknod(ctx *Context)

func Preprocess_ModifyLdt

func Preprocess_ModifyLdt(ctx *Context)

func Preprocess_Open

func Preprocess_Open(ctx *Context)

func Preprocess_Openat

func Preprocess_Openat(ctx *Context)

func Preprocess_Prctl

func Preprocess_Prctl(ctx *Context)

func Preprocess_Recvfrom

func Preprocess_Recvfrom(ctx *Context)

func Preprocess_Sendto

func Preprocess_Sendto(ctx *Context)

func Preprocess_Setsockopt

func Preprocess_Setsockopt(ctx *Context)

func Preprocess_Shmctl

func Preprocess_Shmctl(ctx *Context)

func Preprocess_Socket

func Preprocess_Socket(ctx *Context)

Types

type Context

type Context struct {
	Cache             returnCache
	Prog              *prog.Prog
	CurrentStraceCall *strace_types.Syscall
	CurrentSyzCall    *prog.Call
	State             *tracker.State
	Target            *prog.Target
}

func NewContext

func NewContext(target *prog.Target) (ctx *Context)

func ParseProg

func ParseProg(trace *strace_types.Trace, target *prog.Target) (*prog.Prog, *Context, error)

type PreprocessHook

type PreprocessHook func(ctx *Context)

type ResourceDescription

type ResourceDescription struct {
	Type string
	Val  string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL