vfs2

package
v0.0.0-...-ff2c174 Latest Latest
Warning

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

Go to latest
Published: May 9, 2021 License: Apache-2.0, MIT Imports: 46 Imported by: 0

Documentation

Overview

Package vfs2 provides syscall implementations that use VFS2.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Accept

Accept implements the linux syscall accept(2).

func Accept4

Accept4 implements the linux syscall accept4(2).

func Access

Access implements Linux syscall access(2).

func Bind

Bind implements the linux syscall bind(2).

func CaptureAddress

func CaptureAddress(t *kernel.Task, addr hostarch.Addr, addrlen uint32) ([]byte, error)

CaptureAddress allocates memory for and copies a socket address structure from the untrusted address space range.

func Chdir

Chdir implements Linux syscall chdir(2).

func Chmod

Chmod implements Linux syscall chmod(2).

func Chown

Chown implements Linux syscall chown(2).

func Chroot

Chroot implements Linux syscall chroot(2).

func Close

Close implements Linux syscall close(2).

func Connect

Connect implements the linux syscall connect(2).

func CopyInFDSet

func CopyInFDSet(t *kernel.Task, addr hostarch.Addr, nBytes, nBitsInLastPartialByte int) ([]byte, error)

CopyInFDSet copies an fd set from select(2)/pselect(2).

func Creat

Creat implements Linux syscall creat(2).

func Dup

Dup implements Linux syscall dup(2).

func Dup2

Dup2 implements Linux syscall dup2(2).

func Dup3

Dup3 implements Linux syscall dup3(2).

func EpollCreate

EpollCreate implements Linux syscall epoll_create(2).

func EpollCreate1

func EpollCreate1(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.SyscallControl, error)

EpollCreate1 implements Linux syscall epoll_create1(2).

func EpollCtl

EpollCtl implements Linux syscall epoll_ctl(2).

func EpollPwait

EpollPwait implements Linux syscall epoll_pwait(2).

func EpollPwait2

EpollPwait2 implements Linux syscall epoll_pwait(2).

func EpollWait

EpollWait implements Linux syscall epoll_wait(2).

func Eventfd

Eventfd implements linux syscall eventfd(2).

func Eventfd2

Eventfd2 implements linux syscall eventfd2(2).

func Execve

Execve implements linux syscall execve(2).

func Execveat

Execveat implements linux syscall execveat(2).

func Faccessat

Faccessat implements Linux syscall faccessat(2).

Note that the faccessat() system call does not take a flags argument: "The raw faccessat() system call takes only the first three arguments. The AT_EACCESS and AT_SYMLINK_NOFOLLOW flags are actually implemented within the glibc wrapper function for faccessat(). If either of these flags is specified, then the wrapper function employs fstatat(2) to determine access permissions." - faccessat(2)

func Fadvise64

Fadvise64 implements fadvise64(2). This implementation currently ignores the provided advice.

func Fallocate

Fallocate implements linux system call fallocate(2).

func Fchdir

Fchdir implements Linux syscall fchdir(2).

func Fchmod

Fchmod implements Linux syscall fchmod(2).

func Fchmodat

Fchmodat implements Linux syscall fchmodat(2).

func Fchown

Fchown implements Linux syscall fchown(2).

func Fchownat

Fchownat implements Linux syscall fchownat(2).

func Fcntl

Fcntl implements linux syscall fcntl(2).

func Fdatasync

Fdatasync implements Linux syscall fdatasync(2).

func Fgetxattr

Fgetxattr implements Linux syscall fgetxattr(2).

func Flistxattr

Flistxattr implements Linux syscall flistxattr(2).

func Flock

Flock implements linux syscall flock(2).

func Fremovexattr

func Fremovexattr(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.SyscallControl, error)

Fremovexattr implements Linux syscall fremovexattr(2).

func Fsetxattr

Fsetxattr implements Linux syscall fsetxattr(2).

func Fstat

Fstat implements Linux syscall fstat(2).

func Fstatfs

Fstatfs implements Linux syscall fstatfs(2).

func Fsync

Fsync implements Linux syscall fsync(2).

func Ftruncate

Ftruncate implements Linux syscall ftruncate(2).

func Futimesat

Futimesat implements Linux syscall futimesat(2).

func GetPeerName

GetPeerName implements the linux syscall getpeername(2).

func GetSockName

GetSockName implements the linux syscall getsockname(2).

func GetSockOpt

GetSockOpt implements the linux syscall getsockopt(2).

func GetXattr

GetXattr implements Linux syscall getxattr(2).

func Getcwd

Getcwd implements Linux syscall getcwd(2).

func Getdents

Getdents implements Linux syscall getdents(2).

func Getdents64

Getdents64 implements Linux syscall getdents64(2).

func InotifyAddWatch

func InotifyAddWatch(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.SyscallControl, error)

InotifyAddWatch implements the inotify_add_watch() syscall.

func InotifyInit

InotifyInit implements the inotify_init() syscalls.

func InotifyInit1

func InotifyInit1(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.SyscallControl, error)

InotifyInit1 implements the inotify_init1() syscalls.

func InotifyRmWatch

func InotifyRmWatch(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.SyscallControl, error)

InotifyRmWatch implements the inotify_rm_watch() syscall.

func IoSubmit

IoSubmit implements linux syscall io_submit(2).

func Ioctl

Ioctl implements Linux syscall ioctl(2).

func Lchown

Lchown implements Linux syscall lchown(2).

func Lgetxattr

Lgetxattr implements Linux syscall lgetxattr(2).

Link implements Linux syscall link(2).

func Linkat

Linkat implements Linux syscall linkat(2).

func ListXattr

ListXattr implements Linux syscall listxattr(2).

func Listen

Listen implements the linux syscall listen(2).

func Llistxattr

Llistxattr implements Linux syscall llistxattr(2).

func Lremovexattr

func Lremovexattr(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.SyscallControl, error)

Lremovexattr implements Linux syscall lremovexattr(2).

func Lseek

Lseek implements Linux syscall lseek(2).

func Lsetxattr

Lsetxattr implements Linux syscall lsetxattr(2).

func Lstat

Lstat implements Linux syscall lstat(2).

func MemfdCreate

MemfdCreate implements the linux syscall memfd_create(2).

func Mkdir

Mkdir implements Linux syscall mkdir(2).

func Mkdirat

Mkdirat implements Linux syscall mkdirat(2).

func Mknod

Mknod implements Linux syscall mknod(2).

func Mknodat

Mknodat implements Linux syscall mknodat(2).

func Mmap

Mmap implements Linux syscall mmap(2).

func Mount

Mount implements Linux syscall mount(2).

func Newfstatat

Newfstatat implements Linux syscall newfstatat, which backs fstatat(2).

func Open

Open implements Linux syscall open(2).

func Openat

Openat implements Linux syscall openat(2).

func Override

func Override()

Override syscall table to add syscalls implementations from this package.

func Pipe

Pipe implements Linux syscall pipe(2).

func Pipe2

Pipe2 implements Linux syscall pipe2(2).

func Poll

Poll implements linux syscall poll(2).

func Ppoll

Ppoll implements linux syscall ppoll(2).

func Pread64

Pread64 implements Linux syscall pread64(2).

func Preadv

Preadv implements Linux syscall preadv(2).

func Preadv2

Preadv2 implements Linux syscall preadv2(2).

func Pselect

Pselect implements linux syscall pselect(2).

func Pwrite64

Pwrite64 implements Linux syscall pwrite64(2).

func Pwritev

Pwritev implements Linux syscall pwritev(2).

func Pwritev2

Pwritev2 implements Linux syscall pwritev2(2).

func Read

Read implements Linux syscall read(2).

func Readahead

Readahead implements readahead(2).

Readlink implements Linux syscall readlink(2).

func Readlinkat

Readlinkat implements Linux syscall mknodat(2).

func Readv

Readv implements Linux syscall readv(2).

func RecvFrom

RecvFrom implements the linux syscall recvfrom(2).

func RecvMMsg

RecvMMsg implements the linux syscall recvmmsg(2).

func RecvMsg

RecvMsg implements the linux syscall recvmsg(2).

func RemoveXattr

RemoveXattr implements Linux syscall removexattr(2).

func Rename

Rename implements Linux syscall rename(2).

func Renameat

Renameat implements Linux syscall renameat(2).

func Renameat2

Renameat2 implements Linux syscall renameat2(2).

func Rmdir

Rmdir implements Linux syscall rmdir(2).

func Select

Select implements linux syscall select(2).

func SendMMsg

SendMMsg implements the linux syscall sendmmsg(2).

func SendMsg

SendMsg implements the linux syscall sendmsg(2).

func SendTo

SendTo implements the linux syscall sendto(2).

func Sendfile

Sendfile implements linux system call sendfile(2).

func SetSockOpt

SetSockOpt implements the linux syscall setsockopt(2).

Note that unlike Linux, enabling SO_PASSCRED does not autobind the socket.

func SetXattr

SetXattr implements Linux syscall setxattr(2).

func Shutdown

Shutdown implements the linux syscall shutdown(2).

func Signalfd

Signalfd implements the linux syscall signalfd(2).

func Signalfd4

Signalfd4 implements the linux syscall signalfd4(2).

func Socket

Socket implements the linux syscall socket(2).

func SocketPair

SocketPair implements the linux syscall socketpair(2).

func Splice

Splice implements Linux syscall splice(2).

func Stat

Stat implements Linux syscall stat(2).

func Statfs

Statfs implements Linux syscall statfs(2).

func Statx

Statx implements Linux syscall statx(2).

Symlink implements Linux syscall symlink(2).

func Symlinkat

Symlinkat implements Linux syscall symlinkat(2).

func Sync

Sync implements Linux syscall sync(2).

func SyncFileRange

func SyncFileRange(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.SyscallControl, error)

SyncFileRange implements Linux syscall sync_file_range(2).

func Syncfs

Syncfs implements Linux syscall syncfs(2).

func Tee

Tee implements Linux syscall tee(2).

func TimerfdCreate

func TimerfdCreate(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.SyscallControl, error)

TimerfdCreate implements Linux syscall timerfd_create(2).

func TimerfdGettime

func TimerfdGettime(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.SyscallControl, error)

TimerfdGettime implements Linux syscall timerfd_gettime(2).

func TimerfdSettime

func TimerfdSettime(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.SyscallControl, error)

TimerfdSettime implements Linux syscall timerfd_settime(2).

func Truncate

Truncate implements Linux syscall truncate(2).

func Umount2

Umount2 implements Linux syscall umount2(2).

Unlink implements Linux syscall unlink(2).

func Unlinkat

Unlinkat implements Linux syscall unlinkat(2).

func Utime

Utime implements Linux syscall utime(2).

func Utimensat

Utimensat implements Linux syscall utimensat(2).

func Utimes

Utimes implements Linux syscall utimes(2).

func Write

Write implements Linux syscall write(2).

func Writev

Writev implements Linux syscall writev(2).

Types

type MessageHeader64

type MessageHeader64 struct {
	// Name is the optional pointer to a network address buffer.
	Name uint64

	// NameLen is the length of the buffer pointed to by Name.
	NameLen uint32

	// Iov is a pointer to an array of io vectors that describe the memory
	// locations involved in the io operation.
	Iov uint64

	// IovLen is the length of the array pointed to by Iov.
	IovLen uint64

	// Control is the optional pointer to ancillary control data.
	Control uint64

	// ControlLen is the length of the data pointed to by Control.
	ControlLen uint64

	// Flags on the sent/received message.
	Flags int32
	// contains filtered or unexported fields
}

MessageHeader64 is the 64-bit representation of the msghdr struct used in the recvmsg and sendmsg syscalls.

+marshal

func (*MessageHeader64) CopyIn

func (m *MessageHeader64) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error)

CopyIn implements marshal.Marshallable.CopyIn.

func (*MessageHeader64) CopyOut

func (m *MessageHeader64) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error)

CopyOut implements marshal.Marshallable.CopyOut.

func (*MessageHeader64) CopyOutN

func (m *MessageHeader64) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error)

CopyOutN implements marshal.Marshallable.CopyOutN.

func (*MessageHeader64) MarshalBytes

func (m *MessageHeader64) MarshalBytes(dst []byte)

MarshalBytes implements marshal.Marshallable.MarshalBytes.

func (*MessageHeader64) MarshalUnsafe

func (m *MessageHeader64) MarshalUnsafe(dst []byte)

MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.

func (*MessageHeader64) Packed

func (m *MessageHeader64) Packed() bool

Packed implements marshal.Marshallable.Packed.

func (*MessageHeader64) SizeBytes

func (m *MessageHeader64) SizeBytes() int

SizeBytes implements marshal.Marshallable.SizeBytes.

func (*MessageHeader64) UnmarshalBytes

func (m *MessageHeader64) UnmarshalBytes(src []byte)

UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.

func (*MessageHeader64) UnmarshalUnsafe

func (m *MessageHeader64) UnmarshalUnsafe(src []byte)

UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.

func (*MessageHeader64) WriteTo

func (m *MessageHeader64) WriteTo(writer io.Writer) (int64, error)

WriteTo implements io.WriterTo.WriteTo.

Jump to

Keyboard shortcuts

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