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]

Re: system call interposition using LD_PRELOAD


On Thu, Mar 29, 2012 at 11:21 PM, Carlos O'Donell
<carlos@systemhalted.org> wrote:
> The macros in sysdep.h for the machine are used to:
>
> (a) Generate assembly syscall wrappers from syscalls.list for all
> function calls that are simple wrapper around kernel system calls
>
> and
>
> (b) Generate inline system calls for functions that want to make
> inline system calls to the kernel from C code.
>
> By interposing yourself with a custom sysdep.h you will have control
> over *all* the system calls made by the C library.

I remembered one more wrinkle. In addition you'll need to define the
cancellation equivalents from sysdep-cancel.h. Which means you'll have
to think about how cancellation works with an exception-less syscall
system e.g. how do you cancel an outstanding request for IO which
*would* have blocked had the caller actually called a kernel syscall.

This research looks *very* interesting, please keep the list updated
on your progress and post any links to published papers you present.

Cheers,
Carlos.


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