You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unfortunately this is not a trivial change because invoking a function rewrite from within the plugin creates the following 3 problems:
a recursive chicken and egg problem where we rewrite e.g. malloc and then sabre calls malloc, which is solved easily with our enter_plugin() and exit_plugin() plugin methods.
we need to swap TLS from the client to Sabre as we are executing Sabre code from the rewriter. This is also accommodated easily with load_sabre_tls() and load_client_tls().
The rewriter is not idempotent.
From all the issues above, number 3 is the real blocker and this require significant engineering effort to fix properly. We need to work on some accounting to keep track of the .so in memory and make sure we don't double patch stuff.
The text was updated successfully, but these errors were encountered:
Rewrite functions when the user plugin defines it is currently a no-op.
While we are passing the appropriate detour registration function to the plugin here: https://github.com/srg-imperial/SaBRe/blob/master/loader/premain.c#L96-L101 we still need to invoke the rewriter like we do here: https://github.com/srg-imperial/SaBRe/blob/master/loader/ld_sc_handler.c#L349
Unfortunately this is not a trivial change because invoking a function rewrite from within the plugin creates the following 3 problems:
enter_plugin()
andexit_plugin()
plugin methods.load_sabre_tls()
andload_client_tls()
.From all the issues above, number 3 is the real blocker and this require significant engineering effort to fix properly. We need to work on some accounting to keep track of the .so in memory and make sure we don't double patch stuff.
The text was updated successfully, but these errors were encountered: