diff options
Diffstat (limited to 'test/functional/interface_usdt_utxocache.py')
-rwxr-xr-x | test/functional/interface_usdt_utxocache.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/test/functional/interface_usdt_utxocache.py b/test/functional/interface_usdt_utxocache.py index 1617c580f3..12a11409e0 100755 --- a/test/functional/interface_usdt_utxocache.py +++ b/test/functional/interface_usdt_utxocache.py @@ -35,7 +35,9 @@ struct utxocache_change BPF_PERF_OUTPUT(utxocache_add); int trace_utxocache_add(struct pt_regs *ctx) { struct utxocache_change add = {}; - bpf_usdt_readarg_p(1, ctx, &add.txid, 32); + void *ptxid = NULL; + bpf_usdt_readarg(1, ctx, &ptxid); + bpf_probe_read_user(&add.txid, sizeof(add.txid), ptxid); bpf_usdt_readarg(2, ctx, &add.index); bpf_usdt_readarg(3, ctx, &add.height); bpf_usdt_readarg(4, ctx, &add.value); @@ -47,7 +49,9 @@ int trace_utxocache_add(struct pt_regs *ctx) { BPF_PERF_OUTPUT(utxocache_spent); int trace_utxocache_spent(struct pt_regs *ctx) { struct utxocache_change spent = {}; - bpf_usdt_readarg_p(1, ctx, &spent.txid, 32); + void *ptxid = NULL; + bpf_usdt_readarg(1, ctx, &ptxid); + bpf_probe_read_user(&spent.txid, sizeof(spent.txid), ptxid); bpf_usdt_readarg(2, ctx, &spent.index); bpf_usdt_readarg(3, ctx, &spent.height); bpf_usdt_readarg(4, ctx, &spent.value); @@ -59,7 +63,9 @@ int trace_utxocache_spent(struct pt_regs *ctx) { BPF_PERF_OUTPUT(utxocache_uncache); int trace_utxocache_uncache(struct pt_regs *ctx) { struct utxocache_change uncache = {}; - bpf_usdt_readarg_p(1, ctx, &uncache.txid, 32); + void *ptxid = NULL; + bpf_usdt_readarg(1, ctx, &ptxid); + bpf_probe_read_user(&uncache.txid, sizeof(uncache.txid), ptxid); bpf_usdt_readarg(2, ctx, &uncache.index); bpf_usdt_readarg(3, ctx, &uncache.height); bpf_usdt_readarg(4, ctx, &uncache.value); |