This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: About hacking libc
- From: "Carlos O'Donell" <carlos at redhat dot com>
- To: Xinyang Ge <xxg113 at cse dot psu dot edu>
- Cc: "Carlos O'Donell" <carlos at systemhalted dot org>, Ángel González <keisial at gmail dot com>, libc-help at sourceware dot org
- Date: Mon, 17 Jun 2013 16:53:37 -0400
- Subject: Re: About hacking libc
- References: <CACY857JO7HoMRQyX1sb1gqR0DzK0PksBy0OPd7awCVbBSVKCPQ at mail dot gmail dot com> <CAE2sS1hv8CU45snKVOSzqYv-J9f4GcVp6v8GyAEg93cSQ=NWow at mail dot gmail dot com> <517EF6C4 dot 5040001 at gmail dot com> <CACY857+juSev+G6GQQdW6L5S4LF+9TWLSD27XDBLYsQz4xCuEg at mail dot gmail dot com> <CAE2sS1h7uE00fQwuUXQF1A2F0sp_K3o798fkR1fi_fZVLhHYgw at mail dot gmail dot com> <CACY857LQCdvfJR4ARuMmCTmqTWAv83JS34cpE5d2mFnUSpEi_Q at mail dot gmail dot com> <51BF6E61 dot 2020807 at redhat dot com> <CACY857+MJ-d-xB=CABctyX8exrUp8AeivvvQMU4SH4ObqQDXbQ at mail dot gmail dot com>
On 06/17/2013 04:48 PM, Xinyang Ge wrote:
> On Mon, Jun 17, 2013 at 4:15 PM, Carlos O'Donell <carlos@redhat.com> wrote:
>> Then you need to instrument the open system call entry point
>> from userspace. I would suggest adding a framework to instrument
>> the system calls from the glibc side, perhaps using systemtap
>> probe points (like we already do for the dynamic loader).
>>
>> That way you can use systemtap userspace probe points to
>> intercept all open syscalls made by a program, manipulate
>> the arguments and then continue. You can do this on a per-thread
>> basis without halting the entire process and the other threads.
>> You can also do this very efficiently.
>>
>> Cheers,
>> Carlos.
>>
>
> Thanks. I'll take a look.
FYI:
"System Call Wrappers"
http://sourceware.org/glibc/wiki/SyscallWrappers
Cheers,
Carlos.