system-calls
Additional memset() causes system call open() to fail
I\'ve created a node in /dev by following the tutorial here (chardev.c), I tried to access the device in /dev/chardev I created by using the following code :[详细]
2023-04-02 19:31 分类:问答How does the gettimeofday syscall work?
gettimeofday is a syscall of x86-86 according to this page(just search gettimeofday in the box): int gettimeofday(struct timeval *tv, struct timezone *tz);[详细]
2023-04-02 04:53 分类:问答ptrace and threads
I\'m working on an linux application incorporating ptrace to observe the threads of another process. When the application I observe forks a child process this already works quite well. By calling wait[详细]
2023-04-01 22:26 分类:问答How Frenzapp gets the version of other apps?
Does anyone know how Frenzapp gets the Version of other installed apps? They probably use sysctl to enumerate running processes which returns kinfo_proc struct for each process. Looking at kinfo_proc[详细]
2023-04-01 19:52 分类:问答What happens if a write system call is called on same file by 2 different processes simultaneously
开发者_StackOverflow社区Does the OS handle it correctly? Or will I have to call flock()?Although the OS won\'t crash, and the filesystem won\'t be corrupted, calls to write() are NOT guarenteed to be[详细]
2023-03-31 19:47 分类:问答How do I write the value in RAX to STDOUT in assembly?
I can use syscall for write to print some data in memory to STDOUT: ssize_t write(int fd, const void *buf, size_t count);[详细]
2023-03-30 03:49 分类:问答how to get protection flags of a memory area, flags are PROT_READ /PROT_EXEC in mprotect
I use 开发者_运维知识库mprotect() to set protection flags to a memory area. Later on, I want to restore this memory area\'s protection flags.[详细]
2023-03-26 09:44 分类:问答when is the system call set_tid_address used?
i have been trying to undertand the system calls, and want to understand how set_tid_address works. bascially from what i have read is that it returns the pid of the program or process which is execut[详细]
2023-03-26 06:45 分类:问答Interrupting syscalls in threads on linux
I have a pthread that runs in a loop, calling accept() in a blocking manner. Is there any way to interrupt that call from another thread? Everything points to sending the thread a signal, but apparent[详细]
2023-03-25 19:18 分类:问答How can I use sys_sendto() under kernel mode?
I\'m writing a DDoS firewall by netfilter, I want to send a socket packet to another computer under kernel mode. But the compiler warned m开发者_StackOverflowe that the symbol \"sys_sendto\" was undef[详细]
2023-03-25 11:27 分类:问答