Thread (1 message) 1 message, 1 author, 2020-08-02

Re: [PATCH v1 0/4] [RFC] Implement Trampoline File Descriptor

From: Florian Weimer <hidden>
Date: 2020-08-02 13:57:49
Also in: linux-arm-kernel, linux-fsdevel, linux-integrity, linux-security-module, lkml

* Madhavan T. Venkataraman:
Standardization
---------------------

Trampfd is a framework that can be used to implement multiple
things. May be, a few of those things can also be implemented in
user land itself. But I think having just one mechanism to execute
dynamic code objects is preferable to having multiple mechanisms not
standardized across all applications.

As an example, let us say that I am able to implement support for
JIT code. Let us say that an interpreter uses libffi to execute a
generated function. The interpreter would use trampfd for the JIT
code object and get an address. Then, it would pass that to libffi
which would then use trampfd for the trampoline. So, trampfd based
code objects can be chained.
There is certainly value in coordination.  For example, it would be
nice if unwinders could recognize the trampolines during all phases
and unwind correctly through them (including when interrupted by an
asynchronous symbol).  That requires some level of coordination with
the unwinder and dynamic linker.

A kernel solution could hide the intermediate state in a kernel-side
trap handler, but I think it wouldn't reduce the overall complexity.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help