On Tue, Mar 10, 2026 at 05:04:15PM +0100, Peter Krempa via Devel wrote:
> From: Peter Krempa <[email protected]>
> 
> Commit d249170bf609d2c modified the arguments of 'virNetTLSContextNew'
> which has a systemtap probe point defined. This in turn meant that the
> probe point needed to be modified too.
> 
> Unfortunately the systemtap generator doesn't handle double pointers
> correctly and in fact systemtap doesn't even seem to have a possibility
> to fetch a list of strings from userspace natively. This meant that an
> invalid probe definition was generated:
> 
>   probe libvirt.rpc.tls_context_new = 
> process("/usr/lib64/libvirt.so").mark("rpc_tls_context_new") {
>     ctxt = $arg1;
>     cacert = user_string($arg2);
>     cacrl = user_string($arg3);
>     *cert = $arg4;
>     *keys = $arg5;
>     sanityCheckCert = $arg6;
>     requireValidCert = $arg7;
>     isServer = $arg8;
>   }
> 
> Leading to the following failure:
> 
>   # stap -ve 'probe oneshot {exit()}'
>   parse error: expected literal string or number
>           saw: operator '*' at 
> /usr/share/systemtap/tapset/libvirt_probes-64.stp:204:3
>        source:   *cert = $arg4;
>                  ^
>   1 parse error.
> 
> To address the issue declare the 'cert' and 'keys' parameters as
> 'void *', we can't really do anything else as string lists aren't
> supported,  which will make our generator generate correct code once
> again.
> 
> Resolves: https://issues.redhat.com/browse/RHEL-153832
> Fixes: d249170bf609d2cb89c36477b0f9ca0908f25985
> Signed-off-by: Peter Krempa <[email protected]>
> ---
>  src/libvirt_probes.d | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Err, I already fixed it with:

  commit cb33103c4afbce68134be112ecc5d0251e542650
  Author: Daniel P. Berrangé <[email protected]>
  Date:   Mon Feb 16 10:00:48 2026 +0000

    scripts: avoid matching 'char **' as string for systemtap
    


> 
> diff --git a/src/libvirt_probes.d b/src/libvirt_probes.d
> index d9e75d9797..16d1decf46 100644
> --- a/src/libvirt_probes.d
> +++ b/src/libvirt_probes.d
> @@ -54,7 +54,7 @@ provider libvirt {
>       # file: src/rpc/virnettlscontext.c
>       # prefix: rpc
>       probe rpc_tls_context_new(void *ctxt, const char *cacert, const char 
> *cacrl,
> -                               const char **cert, const char **keys,
> +                               void *cert, void *keys,
>                                 int sanityCheckCert, int requireValidCert, 
> int isServer);
>       probe rpc_tls_context_dispose(void *ctxt);
>       probe rpc_tls_context_session_allow(void *ctxt, void *sess, const char 
> *dname);
> -- 
> 2.53.0
> 

With regards,
Daniel
-- 
|: https://berrange.com       ~~        https://hachyderm.io/@berrange :|
|: https://libvirt.org          ~~          https://entangle-photo.org :|
|: https://pixelfed.art/berrange   ~~    https://fstop138.berrange.com :|

Reply via email to