seccomp

package
v0.0.0-...-b967545 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2017 License: BSD-3-Clause Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	F_OK        = 0x0
	R_OK        = 0x4
	W_OK        = 0x2
	X_OK        = 0x1
	EFF_ONLY_OK = 0x08
)
View Source
const (
	SOL_NETLINK  = 270 // missing from syscall
	SO_REUSEPORT = 15  // missing from syscall
)
View Source
const (
	STRINGARG = iota + 1
	PTRARG
	INTARG
)
View Source
const (
	SYSCALL_MAP_ARG0_ISMASK = 1
	SYSCALL_MAP_ARG1_ISMASK = (1 << 1)
	SYSCALL_MAP_ARG2_ISMASK = (1 << 2)
	SYSCALL_MAP_ARG3_ISMASK = (1 << 3)
)

Variables

View Source
var (
	SyscallMappings = []SyscallMapper{
		{SyscallName: "fcntl", Arg1Class: "fcntl"},
		{SyscallName: "prctl", Arg0Class: "prctl_opts"},
		{SyscallName: "futex", Arg1Class: "futex",
			Flags: SYSCALL_MAP_ARG1_ISMASK},
		{SyscallName: "socket", Arg0Class: "socket_family", Arg1Class: "socket_type", Arg2Class: "ip_proto",
			Flags: SYSCALL_MAP_ARG1_ISMASK},
		{SyscallName: "socketpair", Arg0Class: "socket_family", Arg1Class: "socket_type"},
		{SyscallName: "setsockopt", Arg1Class: "sol_level", Arg2Class: "setsockopt_optname",
			ArgMappings: []SCIndOpt{{1, "SOL_SOCKET", 2, "setsockopt_optname"},
				{1, "SOL_TCP", 2, "sockopt_tcp"}}},
		{SyscallName: "getsockopt", Arg1Class: "sol_level", Arg2Class: "setsockopt_optname",
			ArgMappings: []SCIndOpt{{1, "SOL_SOCKET", 2, "setsockopt_optname"},
				{1, "SOL_TCP", 2, "sockopt_tcp"}}},
		{SyscallName: "prctl", Arg0Class: "PR_"},
		{SyscallName: "mmap", Arg2Class: "mmap_prot", Arg3Class: "mmap_flags",
			Flags: SYSCALL_MAP_ARG2_ISMASK | SYSCALL_MAP_ARG3_ISMASK},
		{SyscallName: "mprotect", Arg2Class: "mmap_prot",
			Flags: SYSCALL_MAP_ARG2_ISMASK},
		{SyscallName: "ioctl", Arg1Class: "ioctl_code"}}
)
View Source
var SyscallTrackingExclusions = []SyscallTrackingExclusion{
	{
		// contains filtered or unexported fields
	},
	{
		// contains filtered or unexported fields
	}}
View Source
var SyscallsTracked = make([]SyscallTracker, 0)

Functions

func Main

func Main()

func TMain

func TMain(ctx *cli.Context)

func Tracer

func Tracer()

Types

type RegisterArgs

type RegisterArgs []uint64

type RenderingFunctions

type RenderingFunctions map[int]func(int, RegisterArgs) (string, error)

type SCIndOpt

type SCIndOpt struct {
	ArgNo       uint
	ArgVal      string
	MapArgNo    uint
	MapArgClass string
}

type SyscallMapper

type SyscallMapper struct {
	SyscallName string
	Flags       uint
	Arg0Class   string
	Arg1Class   string
	Arg2Class   string
	Arg3Class   string
	ArgMappings []SCIndOpt
}

type SyscallTracker

type SyscallTracker struct {
	// contains filtered or unexported fields
}

type SyscallTrackingExclusion

type SyscallTrackingExclusion struct {
	// contains filtered or unexported fields
}

type SystemCall

type SystemCall struct {
	// contains filtered or unexported fields
}

type SystemCallArgs

type SystemCallArgs []int

Jump to

Keyboard shortcuts

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