From e3c8c659a1d1bce9a1ade60c8761b47893dc5e31 Mon Sep 17 00:00:00 2001 From: Dave Tucker Date: Tue, 7 Jun 2022 16:43:23 +0100 Subject: [PATCH] bpf: arm fix pt_regs handling Signed-off-by: Dave Tucker --- bpf/aya-bpf/src/args.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bpf/aya-bpf/src/args.rs b/bpf/aya-bpf/src/args.rs index a4599b44..8929c7a3 100644 --- a/bpf/aya-bpf/src/args.rs +++ b/bpf/aya-bpf/src/args.rs @@ -120,14 +120,14 @@ impl FromPtRegs for *const T { impl FromPtRegs for *const T { fn from_argument(ctx: &pt_regs, n: usize) -> Option { if n <= 6 { - Some(ctx.uregs.regs[n] as *const _) + Some(ctx.uregs[n] as *const _) } else { None } } fn from_retval(ctx: &pt_regs) -> Option { - Some(ctx.uregs.regs[0] as *const _) + Some(ctx.uregs[0] as *const _) } } @@ -169,14 +169,14 @@ impl FromPtRegs for *mut T { impl FromPtRegs for *mut T { fn from_argument(ctx: &pt_regs, n: usize) -> Option { if n <= 6 { - Some(ctx.uregs.regs[n] as *mut _) + Some(ctx.uregs[n] as *mut _) } else { None } } fn from_retval(ctx: &pt_regs) -> Option { - Some(ctx.uregs.regs[0] as *mut _) + Some(ctx.uregs[0] as *mut _) } } @@ -221,14 +221,14 @@ macro_rules! impl_from_pt_regs { impl FromPtRegs for $type { fn from_argument(ctx: &pt_regs, n: usize) -> Option { if n <= 6 { - Some(ctx.uregs.regs[n] as *const $type as _) + Some(ctx.uregs[n] as *const $type as _) } else { None } } fn from_retval(ctx: &pt_regs) -> Option { - Some(ctx.uregs.regs[0] as *const $type as _) + Some(ctx.uregs[0] as *const $type as _) } }