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.

2 votes
0 answers
31 views

Wrong attributes bitmask in READDIR requests on NFSv4.1

I'm struggling the following problem. I have an NFS v4.1 mount, where I have a directory with a couple of thousands files. I'm trying to list their names and types. Even with a minimal example program ...
dmk's user avatar
  • 21
0 votes
0 answers
21 views

How to trace recvfrom and sendto syscall each time apache2/httpd handle incoming http request?

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
1 answer
106 views

How to better understand and reverse-engineer system calls within processes given a specific example

I am very new to linux and as such would appreciate any pointers with respect to understanding system calls and having the ability, knowledge and tools to reverse-engineer their origin or their ...
N S's user avatar
  • 1
0 votes
0 answers
26 views

BPF program attached to `getname` won't get called when calling the `renameat2` syscall

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
0 answers
23 views

Retrieving the process descriptor during syscall

In Linux, there is a per-process kernel stack that stores at the bottom of it (or top if the stack grows upwards) a small struct named thread_info, which in turn points to the task_struct of the ...
Idan Rosenzweig's user avatar
1 vote
2 answers
283 views

Is systemd the first process that runs in user mode in linux?

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
0 votes
0 answers
493 views

Running find on NFS mount much slower on RHEL8 vs RHEl7

I'm in the process of replacing some RHEL7 NFS server/client systems with RHEL8 systems, performing the same functions. On the RHEL8 NFS client, I noticed running a find command on the NFS mount, is ...
keyboard_banger's user avatar
10 votes
1 answer
2k views

What is the rationale for the change of syscall calling convention in new Linuxes?

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.5k
6 votes
1 answer
1k views

Does mmap() update the page table after every page fault?

Based on my research on mmap(), I understand that mmap uses demand paging to copy in data to the kernel page cache only when the virtual memory address is touched, through page fault. If we are ...
prajasek's user avatar
6 votes
1 answer
361 views

getdents() syscall appears to be returning different results within a container

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
0 votes
0 answers
115 views

How to "wake-up" user space threads from kernel?

Suppose you have a kernel device driver receiving data and a user space threads waiting for the data. You want to avoid wasted cycles by having the user space thread block and wake-up once the kernel ...
FourierFlux's user avatar
2 votes
1 answer
1k views

Linux syscalls: advantage of copy_file_range over sendfile?

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
0 votes
1 answer
63 views

Synchronous syscalls and uninterruptible sleep

My application entered uninteruptible sleep. The process is stuck at linkat. ❯ sudo cat /proc/1308028/syscall 265 0xffffffffffffff9c 0x7fbd9f32a120 0xffffffffffffff9c 0x7fbd9f395930 0x400 ...
mq7's user avatar
  • 101
4 votes
1 answer
162 views

is stat(2) read-after-write consistent with write(2)?

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
1 vote
1 answer
767 views

Where does the signal that causes EINTR come from?

I Understand that EINTR is an error which so-called interruptible system calls may return. My question is where does the signal that causes EINTR come from? I faced this quite often when using fnctl ...
chewing gum's user avatar

15 30 50 per page
1
2 3 4 5
24