On 7/11/2026 2:45 AM, Ziyang Zhang wrote:
> Add a minimal dlcall plugin that lets the guest invoke host functions
> through magic system calls. The plugin registers a vCPU syscall filter
> callback that intercepts a reserved syscall number and dispatches a set
> of pass-through operations: querying host attributes, loading and freeing
> shared libraries, resolving symbols, retrieving the last library error,
> and invoking a host function through a common interface.
> 
> The magic syscall number defaults to 4096 and can be overridden at load
> time with the "syscall_num=N" argument; values low enough to clash with a
> real syscall are rejected.
> 
> Co-authored-by: Kailiang Xu <[email protected]>
> Co-authored-by: Mingyuan Xia <[email protected]>
> Signed-off-by: Ziyang Zhang <[email protected]>
> ---
>  contrib/plugins/dlcall.c    | 248 ++++++++++++++++++++++++++++++++++++
>  contrib/plugins/meson.build |   5 +
>  2 files changed, 253 insertions(+)
>  create mode 100644 contrib/plugins/dlcall.c
> 

Reviewed-by: Pierrick Bouvier <[email protected]>

Reply via email to