mailing list of musl libc
 help / color / mirror / code / Atom feed
* Easiest way of capturing syscalls, all-architectures-wide?
@ 2017-12-07 13:19 ardi
  0 siblings, 0 replies; only message in thread
From: ardi @ 2017-12-07 13:19 UTC (permalink / raw)
  To: musl

Is there some place (some header, I suppose) where I could redefine
the syscall interface in a global way, for all CPU architectures, and
redirect all syscalls to a custom implementation of the Linux call
table?

For this scenario I'm thinking in totally bypassing the arch-dependent
assembly syscall code, and redirect it to a C-written interface.

Can this be done in an smart way that would involve perhaps just
editing one file? Maybe you have this feature already implemented for
your testing purposes, but it's disabled in release builds? (I'm
asking this for not reinventing the wheel in case you already have
this feature)

I'm looking at src/internal/syscall.h in this very same moment, and it
looks like the redirection can be done there, but... would this
capture all syscalls, or maybe some parts of musl might still be
issuing syscalls that don't go through src/internal/syscall.h ?

Also, is there an easy way of disabling the build of the assembly
syscall code, just to be 100% confident that I build without the risk
of doing direct syscalls?

Thanks!!

ardi


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-12-07 13:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-07 13:19 Easiest way of capturing syscalls, all-architectures-wide? ardi

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).