Skip to main content

Module process

Module process 

Source
Expand description

Process and thread management syscalls.

Implements PID/TID retrieval per the Strat9-OS ABI.

Structsยง

ThreadUserContext ๐Ÿ”’

Constantsยง

ARCH_GET_FS ๐Ÿ”’
ARCH_GET_GS ๐Ÿ”’
ARCH_SET_FS ๐Ÿ”’
ARCH_SET_GS ๐Ÿ”’
x86_64 arch_prctl operation codes (Linux-compatible).
MSR_FS_BASE ๐Ÿ”’
MSR addresses for FS/GS base.
MSR_GS_BASE ๐Ÿ”’
THREAD_OFF_ARG0 ๐Ÿ”’
THREAD_OFF_ENTRY ๐Ÿ”’
THREAD_OFF_STACK_TOP ๐Ÿ”’
THREAD_OFF_USER_CS ๐Ÿ”’
THREAD_OFF_USER_RFLAGS ๐Ÿ”’
THREAD_OFF_USER_SS ๐Ÿ”’

Functionsยง

build_user_thread_task ๐Ÿ”’
Performs the build user thread task operation.
rdmsr ๐Ÿ”’ โš 
Read a 64-bit value from an MSR.
sys_arch_prctl
SYS_ARCH_PRCTL (350): Architecture-specific process settings.
sys_exit_group
SYS_EXIT_GROUP (334): Exit all threads in the thread group.
sys_getegid
SYS_GETEGID (338): Return effective group id.
sys_geteuid
SYS_GETEUID (336): Return effective user id.
sys_getgid
SYS_GETGID (337): Return real group id.
sys_getpgid
SYS_GETPGID (318): Return process group id for pid (0 = caller).
sys_getpgrp
POSIX getpgrp wrapper (equivalent to getpgid(0)).
sys_getpid
SYS_GETPID (311): Return current process ID.
sys_getppid
SYS_PROC_GETPPID/SYS_GETPPID (309): Return parent process ID.
sys_getsid
SYS_GETSID (332): Return session id for pid (0 = caller).
sys_gettid
SYS_GETTID (312): Return current thread ID.
sys_getuid
SYS_GETUID (335): Return real user id.
sys_set_tid_address
SYS_SET_TID_ADDRESS (333): Store tidptr in the task; return current TID.
sys_setgid
SYS_SETGID (340): Set real and effective group id (simplified).
sys_setpgid
SYS_SETPGID (317): set process group id.
sys_setsid
SYS_SETSID (319): create a new session.
sys_setuid
SYS_SETUID (339): Set real and effective user id (simplified: no capabilities check).
sys_tgkill
SYS_TGKILL (352): Send a signal to a specific thread in a thread group.
sys_thread_create
SYS_THREAD_CREATE (341): create a userspace thread sharing current process resources.
sys_thread_exit
SYS_THREAD_EXIT (343): exit only the current thread.
sys_thread_join
SYS_THREAD_JOIN (342): wait for a thread created by the current task.
thread_child_start ๐Ÿ”’
Performs the thread child start operation.
thread_iret_from_ctx ๐Ÿ”’ โš 
Performs the thread iret from ctx operation.
wrmsr ๐Ÿ”’ โš 
Write a 64-bit value to an MSR.