Skip to main content

Questions tagged [system-calls]

Questions concerning the details of how a program uses system calls to interact with the kernel API, what calls are available, how they work etc.

Filter by
Sorted by
Tagged with
3 votes
2 answers
69 views
+100

I tried tcp_connect, udp_sendmsg kprobes together on an eBPF program and it worked, but it missed a lot of connections. I couldn't really get any reliable results with other kprobes as well so I tried ...
Subtle Development Space's user avatar
3 votes
1 answer
68 views

I have a file access problem in a self developed daemon process after a setuid() system call. I already post this question to SO but the impression is that the problem is not C++ related but Linux ...
Holger's user avatar
  • 33
0 votes
2 answers
299 views

I am currently learning about Kernels in operating system and I often come across the terms "user-space applications" and "programs"—especially in the context of the kernel's ...
lost_decimal's user avatar
0 votes
0 answers
59 views

So, I decided to start learn about system call with strace and want to observe network-related system call on apache2 processes, here's how I attach it: pidof -s apache2 pstree -sTp <pid-from-pidof&...
ReYuki's user avatar
  • 33
0 votes
0 answers
38 views

I'm fiddling with a BPF program that needs to attach to the two "getname" functions that are being called from the renameat2 syscall, defined in linux/fs/namei.c as: SYSCALL_DEFINE5(...
Dennis Orlando's user avatar
1 vote
2 answers
556 views

I know that switching from user mode to kernel mode occurs continuously via system calls. My question is if systemd is the exact point during the starting of a linux system where the first ...
Kode1000's user avatar
10 votes
1 answer
2k views

Quoting from https://www.kernel.org/doc/Documentation/process/adding-syscalls.rst: At least on 64-bit x86, it will be a hard requirement from v4.17 onwards to not call system call functions in the ...
Petr Skocik's user avatar
  • 29.7k
6 votes
1 answer
403 views

I'm trying to read what type of file /dev/null is. If I use stat() it reports correctly that it's a character device. If I use getdents(), it also reports that it's a character device - unless I run ...
Colourful's user avatar
2 votes
1 answer
2k views

I understand that classically, the Linux Kernel was conservative about adding new syscalls. But, I've learned about the existence of copy_file_range, which seems to do the exact same thing as sendfile....
sina bala's user avatar
  • 506
5 votes
1 answer
201 views

man 2 write states: POSIX requires that a read(2) that can be proved to occur after a write() has returned will return the new data. Note that not all filesystems are POSIX conforming. In Linux, is ...
Shivaram Lingamneni's user avatar
0 votes
2 answers
765 views

I just can't find it. I've installed linux-docs with sudo pacman -S linux-docs but still man syscalls does not work.
Corel's user avatar
  • 103
3 votes
1 answer
1k views

Why is epoll_create not listed as a library function (man pages, section 3), but accept is? While both functions are provided by libc and both refers to kernel syscalls? I know that "why" ...
ABu's user avatar
  • 586
2 votes
0 answers
420 views

I'm a bit confused about how the Linux kernel handles parallelism during I/O operations (if it handles it at all). I assume it can concurrently operate on file descriptors, but does it achieve ...
asnail's user avatar
  • 21
12 votes
3 answers
3k views

Syscalls (system calls) cause some performance penalty due to the isolation between kernel and user space. Therefore, it sounds like a good idea to reduce syscalls. So what I thought is, that we could ...
drahnoel's user avatar
  • 343
9 votes
1 answer
5k views

As long as the architectures are the same, it is no wonder that Windows .exe file can run on the Linux system (if it is properly loaded on the RAM). But systemcalls of Linux and Windows are entirely ...
user356126's user avatar
2 votes
0 answers
52 views

I have a GUI program that takes too long to respond, so I used strace -T to report all its system calls. I find the reason causing the program slow is poll costs too much time. For example, the ...
Simon's user avatar
  • 170
4 votes
1 answer
908 views

The eBPF helper functions define bpf_get_current_cgroup_id for eBPF programs, which does the obvious thing u64 bpf_get_current_cgroup_id(void) Return A 64-bit integer containing the current ...
user547386's user avatar
1 vote
1 answer
852 views

I would like my program to efficiently detect if a file was added to a directory between two invocations. That analysis might block user input (this would be for the fish shell), so I want it to run ...
Narrateur du chaos's user avatar
9 votes
1 answer
610 views

lseek man page: When users complained about data loss caused by a miscompilation of e2fsck(8), glibc 2.1.3 added the link-time warning "the llseek function may be dangerous; use `lseek64 ...
user3528438's user avatar
2 votes
1 answer
870 views

Say I write a non-sensical program that features a single system call, open: #include <fcntl.h> void main() { int hi = open("does not exist", 0); } When I compile the program ...
Izzo's user avatar
  • 1,023
8 votes
5 answers
3k views

I am trying to learn operating system concepts. Here is two simple python code: while True: pass and this one: from time import sleep while True: sleep(0.00000001) Question: Why when running ...
Mojtaba Kamyabi's user avatar
1 vote
1 answer
481 views

So one thing I'm not clear on is why transitioning from user space to kernel space is architecture-dependent. For example, the linux kernel v5.4 code for system calls entering kernel space is ...
user49404's user avatar
  • 181
-1 votes
1 answer
639 views

I first call close(1) and then later open a file using open() syscall. Is it possible that open() returns 1 because it will use the lowest free file descriptor? I have read that open() uses the lowest ...
zomega's user avatar
  • 1,022
2 votes
2 answers
727 views

Recently, I am studying Xlib and come to have a question: What system calls (API's) does X.Org Server use to realize GUI environment. In terms of output, what system calls enable us to draw windows (...
user356126's user avatar
7 votes
4 answers
5k views

I have a big confusion regarding the system calls in OS. According to the book "operating systems concepts 9th ", it is mentioned (in page 63) that : Most programmers never see this level ...
AAA's user avatar
  • 217

1
2 3 4 5
8