mailing list of musl libc
 help / color / mirror / code / Atom feed
From: ardi <ardillasdelmonte@gmail.com>
To: musl@lists.openwall.com
Subject: Easiest way of capturing syscalls, all-architectures-wide?
Date: Thu, 7 Dec 2017 14:19:24 +0100	[thread overview]
Message-ID: <CA+fZqCVUYRTOKxfcQ+NAOxqdQdPXOu3+dDffSEXFmrwmRL2djQ@mail.gmail.com> (raw)

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


                 reply	other threads:[~2017-12-07 13:19 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CA+fZqCVUYRTOKxfcQ+NAOxqdQdPXOu3+dDffSEXFmrwmRL2djQ@mail.gmail.com \
    --to=ardillasdelmonte@gmail.com \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).