3,802 questions
-1
votes
0
answers
86
views
Trouble with a 'EXECUTE_COMMAND_LINE' call in windows (probably due to 'cmd.exe' behavior)
I have commands that I want to run in succession to generate reports using Fortran. I'm having a problem getting Windows to properly execute the command via EXECUTE_COMMAND_LINE. A sample of the ...
0
votes
0
answers
31
views
What is the most "empty" Linux system call to benchmark against? [duplicate]
I want to benchmark some performance aspects of a Linux device driver (a loadable module). Specifically, how fast certain code paths are when they are invoked from userspace via system calls.
In ...
0
votes
1
answer
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(...
0
votes
2
answers
89
views
NtTerminateThread is returning STATUS_INVALID_HANDLE when terminating self
Hello I am trying to terminate the current thread using NtTerminateThread. I know that the function for the syscall takes 2 arguments which are the thread handle and the exit status but whenever I try ...
-2
votes
0
answers
26
views
Having problems to compile a new kernel
I have a task for the school where i must do a system call with a new kernel. The only problem that im having is that when i run the code "sudo make install" it shows the following errors:...
0
votes
1
answer
103
views
Creating a new thread with clone3 causes segfault
I'm experimenting with the Linux clone3() syscall (introduced in Linux 5.3) to create threads without using the standard library. While there are many examples of using the older clone() syscall, I ...
1
vote
0
answers
26
views
Implemented syscall but getting "Function not implemented" error
Trying to implemented syscall in kernel space and wrapper in glibc so I can call from userspace.
When I call the function call in user program it says "Function not implemented".
I have ...
1
vote
0
answers
86
views
Application is leaking event handle after calling syscalls on Windows
I have a go application that calling the Windows Management Infrastructure (MI).
After some amount of time, I notice that the amount of handle is quite high. I inspect the process with the handles ...
-1
votes
0
answers
54
views
MacOS (X-Code vs Visual Studio Code) Assembly Syntax/Setting for intel x86
Device = Intel Macbook 16 inch (2019)
OS Version = MacOS Sequoia 15.0.1
hw.perflevel0.l3cachesize: 16777216
in Xcode (it works) with below.. Getting back the correct cache info
void ...
1
vote
0
answers
27
views
Infinite Loop Issue in Assembly [duplicate]
I am working on a simple assembly program that uses a loop to print a message a specific number of times. However, the loop is not terminating as expected and runs indefinitely.
I am new to assembly ...
2
votes
1
answer
61
views
Invoke function pointer from go. (Windows Management Infrastructure client)
I develop go pure go client for Windows Management Infrastructure (MI). It's the successor of WMI.
While initialization works as indented
package main
import (
"unsafe"
"...
1
vote
1
answer
147
views
Modifying (stealing) Linux syscalls using kprobe
I am trying to steal the statx syscall on Linux 6.8 and to modify the returning arguments.
However, when attemp to load the module, I got a BUG about NULL pointer deference at line
r = ...
4
votes
2
answers
107
views
What is a "slow" device in the context of I/O call?
In man 7 signal, it describes certain constraints regarding when the SA_RESTART flag takes effect.
read(2), readv(2), write(2), writev(2), and ioctl(2) calls on "slow" devices. A "...
0
votes
0
answers
31
views
How has the anatomy of a system call changed over iterations of the Linux kernel?
I've been reading Anatomy of a system call, part 1 and trying to get the full picture of what actions occur when a syscall instruction is issued. From what I do understand:
The user program readies ...
1
vote
0
answers
56
views
How to use direct system calls with NtOpenProcess?
I want to develop a trivial toolkit using direct syscalls for some of the native windows API procedures, for example I want to use NtOpenProcess to open a process and display some info related to the ...