After adding the system call to kernel I tried to compile the kernel. It ran for 2 hours and at the end threw undefined reference to <system call added by me> Any idea what had happened. Kernel 3.9.3 Steps followed are – Get kernel codes from www.kernel.org. wget http://www.kernel.org/pub/linux/kernel/v3.0/linux-3.3.1.tar.bz2 Upzip it with command tar xvfj XXX to a folder example
Tag: system-calls
How to print a number in ARM assembly?
I am trying to print a number that I have stored. I’m not sure if I am close or way off. Any help would be appreciated though. Here is my code: It compiles and runs, but I don’t see anything printed. From what I understand, I need the address of where to start printing in r1, how many bytes in
kprobe vs uprobe system call interposition
I want to write a system call interposition by using Utrace. I understood that Utrace project has been abandoned, but part of its code is used on kprobe and uprobe. I haven’t understood really well how these work. Especially uprobe Can you explain what difference exists between them? And can I use uprobe without writing a module to check which
What does the GCC error message, “Error: unsupported for `mov'”, mean?
I am just trying to compile some simple example code I typed in from a book, and GCC gives me the above error. Here’s my code: The code is supposed to invoke the syslog() system call to read the last 128 bytes from the kernel printk() ring buffer. Here is some information about my OS and system configuration: uname -a:
x86_64 Assembly Linux System Call Confusion
I am currently learning Assembly language on Linux. I have been using the book ‘Programming From the Ground Up’ and all the examples are 32-bit. My OS is 64-bit and I have been trying to do all the examples in 64-bit. I am having trouble however: This merely just calls the Linux exit System call or it should. Instead it
Is malloc/free a syscall or a library routine provided by libc?
If malloc/free is implemented as a library routine in libc, then is it implemented on top of the sbrk syscall or the mmap syscall, or something else? And to be general, does the function declared in sys/syscall.h contains ALL the system calls in the target machine? Answer malloc and free are standard C library functions which are to be implemented
What do these strace system calls mean?
I need to profile the performance of an application for which I am using strace. However, I do not really know how to interpret the various system calls the strace emits. Examples of a few of them are below: I would be grateful if someone could briefly explain in plain English what these lines from (A) to (F) really means
How to find which type of system call is used by a program
I am working on x86_64 machine. My linux kernel is also 64 bit kernel. As there are different ways to implement a system call (int 80, syscall, sysenter), i wanted to know what type of system call my machine is using. I am newbie to linux. I have written a demo program. getpid() does one system call. Can anybody give
Limiting syscall access for a Linux application
Assume a Linux binary foobar which has two different modes of operation: Mode A: A well-behaved mode in which syscalls a, b and c are used. Mode B: A things-gone-wrong mode in which syscalls a, b, c and d are used. Syscalls a, b and c are harmless, whereas syscall d is potentially dangerous and could cause instability to the