This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Custom malloc/mmap for x86_64


Hi Guys,

I am writting a custom software stack for linux and adding new 
system calls to allow programmers to exploit my 
logic without interfering with anything else in the system. 
I am adding a custom mmap, which works if I use the 
system call with its NR id:

#define my_map 312

syscall(my_map, 1024*1024, 4096, 0, 0, 0, 0, 0);

This executes dummy code for now, but I have gotten 
it to invoke calls at the kernel level.

I am trying to add a call to my_map in glibc, I creted a c file
 just like mmap.c, same parameters (one extra), and that 
method gets invoked now that I use my glibc library. The problem
 howerver, is that I am afraid that is not the way 
to do this. So my question is: how do I get my_map() wrapper to
 be build in a similar fashion as the wrapper for 
mmap()?

I am using glibc-2.15 and linux kernel 3.2.16

Thank you!


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]