3,813 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
0
answers
41
views
Monitor sigprocmask calls with Syscall User Dispatch?
I'm using prctl(PR_SET_SYSCALL_USER_DISPATCH, ...) to enable Syscall User Dispatch with a SIGSYS handler that gets called when the application issues any syscall. The prctl() call also marks the code ...
0
votes
2
answers
89
views
How to reliably map glibc dynamic symbols (e.g., open@glibc) to kernel syscalls (e.g., openat)?
I am trying to build a mapping between the dynamic symbols in ELF files (from glibc) and the actual kernel syscalls they invoke.
My environment is x86_64 Ubuntu 22.04.
What I've Tried
Parsing man 2 ...
0
votes
1
answer
52
views
Where Can I See the Mapping Flow Between .dynsym and Kernel System Calls?
I'm struggling to reconcile the difference between the symbols listed in my ELF file's dynamic symbol table (.dynsym) and the system calls observed via strace.
When I perform static analysis using ...
3
votes
1
answer
121
views
write(2) syscall doesn't work in Minix 3.3.0 i386 assembly program
I'm writing hello-world program for Minix 3.3.0 i386 in assembly. The exit(2) call works (and the exit code is propagated), but the write(2) call doesn't work. What am I doing wrong, and how do I fix ...
-1
votes
1
answer
150
views
System call transition to system call table
When a system call is invoked by a user program, a software interrupt (trap) is raised, control first passes to the fixed location of the interrupt vector (IR) which contains the ISR associated with ...
1
vote
1
answer
106
views
Randomness instructions vs syscalls [closed]
I've been digging into "true" randomness idea, and I've noticed that modern CPUs support instructions for generating randomness. X64 has RDRAND instruction, while ARM has RNDR (I'm not ...
5
votes
1
answer
153
views
Why does syscall on x86-64 load CS and SS selectors if base/limit aren’t used?
On x86-64, the syscall instruction causes a privilege-level change from user mode to kernel mode.
According to the Intel manual (Vol. 2A, SYSCALL—Fast System Call), during execution:
CS is loaded ...
0
votes
0
answers
114
views
How do I store and use rax output into a register for later use?
I've been given an assignment to store and write out a user-inputted string stored in buffer. My professor said that the number of bytes read is stored in rax after the user inputs the string into ...
1
vote
1
answer
108
views
futex_wait inside a signal handler
So I am trying to understand if I am missing anything about calling futex_wait inside a signal handler for a SIGSEGV access violation. Ostensibly, it is not on the list of async-signal-safe calls, ...
1
vote
1
answer
71
views
Do child processes inherit pledge() promises made by the parent process?
In BSD, the pledge() syscall can be used to limit the process' access to potentially dangerous resources. Do these limitations apply to child processes that are forked from the parent, or are the ...
1
vote
0
answers
146
views
RISC-V a1 register assumptions after ecall execution
As explained here it's clear to me that user-space calling conventions don't apply when dealing with kernel-space system call execution, so basically no register is clobbered after an ecall ...
0
votes
2
answers
92
views
What difference between brk() and syscall(SYS_brk,)
man 2 brk says:
int brk(void *addr);
brk() sets the end of the data segment to the value specified by addr ...
On success, brk() returns zero. On error, -1 is returned, and errno is set to ENOMEM.
...
1
vote
0
answers
68
views
how can I use Quotactl system call of linux to set project quota in ext4 filesystem
I have checked the man7.org to find the answer, and I found that the Q_SETQUOTA subop of quotactl seems to support only user and group quota?
Q_SETQUOTA
Set quota information for user or ...
3
votes
0
answers
133
views
CreateFileW returns valid-looking handle, but DeviceIoControl fails with "The handle is invalid"
i am working in go. using syscall.SyscallN(), i returned a handle for a volume using the CreateFileW function from the windows api. when i print the error value returned by the syscall, i receive &...
0
votes
1
answer
120
views
How to move a cursor in assembly x86_64 on linux os
So I am trying to build text editor in assembly and I came to problem of moving cursor on the screen while program is in input or reading mode
I modified termios flags also little bit (turned off ECHO ...