aboutsummaryrefslogtreecommitdiff
path: root/test/functional/interface_usdt_coinselection.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/interface_usdt_coinselection.py')
-rwxr-xr-xtest/functional/interface_usdt_coinselection.py19
1 files changed, 14 insertions, 5 deletions
diff --git a/test/functional/interface_usdt_coinselection.py b/test/functional/interface_usdt_coinselection.py
index f684848aed..1f4d6d6fbf 100755
--- a/test/functional/interface_usdt_coinselection.py
+++ b/test/functional/interface_usdt_coinselection.py
@@ -49,10 +49,13 @@ BPF_QUEUE(coin_selection_events, struct event_data, 1024);
int trace_selected_coins(struct pt_regs *ctx) {
struct event_data data;
+ void *pwallet_name = NULL, *palgo = NULL;
__builtin_memset(&data, 0, sizeof(data));
data.type = 1;
- bpf_usdt_readarg_p(1, ctx, &data.wallet_name, WALLET_NAME_LENGTH);
- bpf_usdt_readarg_p(2, ctx, &data.algo, ALGO_NAME_LENGTH);
+ bpf_usdt_readarg(1, ctx, &pwallet_name);
+ bpf_probe_read_user_str(&data.wallet_name, WALLET_NAME_LENGTH, pwallet_name);
+ bpf_usdt_readarg(2, ctx, &palgo);
+ bpf_probe_read_user_str(&data.algo, ALGO_NAME_LENGTH, palgo);
bpf_usdt_readarg(3, ctx, &data.target);
bpf_usdt_readarg(4, ctx, &data.waste);
bpf_usdt_readarg(5, ctx, &data.selected_value);
@@ -62,9 +65,11 @@ int trace_selected_coins(struct pt_regs *ctx) {
int trace_normal_create_tx(struct pt_regs *ctx) {
struct event_data data;
+ void *pwallet_name = NULL;
__builtin_memset(&data, 0, sizeof(data));
data.type = 2;
- bpf_usdt_readarg_p(1, ctx, &data.wallet_name, WALLET_NAME_LENGTH);
+ bpf_usdt_readarg(1, ctx, &pwallet_name);
+ bpf_probe_read_user_str(&data.wallet_name, WALLET_NAME_LENGTH, pwallet_name);
bpf_usdt_readarg(2, ctx, &data.success);
bpf_usdt_readarg(3, ctx, &data.fee);
bpf_usdt_readarg(4, ctx, &data.change_pos);
@@ -74,18 +79,22 @@ int trace_normal_create_tx(struct pt_regs *ctx) {
int trace_attempt_aps(struct pt_regs *ctx) {
struct event_data data;
+ void *pwallet_name = NULL;
__builtin_memset(&data, 0, sizeof(data));
data.type = 3;
- bpf_usdt_readarg_p(1, ctx, &data.wallet_name, WALLET_NAME_LENGTH);
+ bpf_usdt_readarg(1, ctx, &pwallet_name);
+ bpf_probe_read_user_str(&data.wallet_name, WALLET_NAME_LENGTH, pwallet_name);
coin_selection_events.push(&data, 0);
return 0;
}
int trace_aps_create_tx(struct pt_regs *ctx) {
struct event_data data;
+ void *pwallet_name = NULL;
__builtin_memset(&data, 0, sizeof(data));
data.type = 4;
- bpf_usdt_readarg_p(1, ctx, &data.wallet_name, WALLET_NAME_LENGTH);
+ bpf_usdt_readarg(1, ctx, &pwallet_name);
+ bpf_probe_read_user_str(&data.wallet_name, WALLET_NAME_LENGTH, pwallet_name);
bpf_usdt_readarg(2, ctx, &data.use_aps);
bpf_usdt_readarg(3, ctx, &data.success);
bpf_usdt_readarg(4, ctx, &data.fee);