Selaa lähdekoodia

bpf: arm fix pt_regs handling

Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
Dave Tucker 2 vuotta sitten
vanhempi
commit
e3c8c659a1
1 muutettua tiedostoa jossa 6 lisäystä ja 6 poistoa
  1. 6 6
      bpf/aya-bpf/src/args.rs

+ 6 - 6
bpf/aya-bpf/src/args.rs

@@ -120,14 +120,14 @@ impl<T> FromPtRegs for *const T {
 impl<T> FromPtRegs for *const T {
     fn from_argument(ctx: &pt_regs, n: usize) -> Option<Self> {
         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<Self> {
-        Some(ctx.uregs.regs[0] as *const _)
+        Some(ctx.uregs[0] as *const _)
     }
 }
 
@@ -169,14 +169,14 @@ impl<T> FromPtRegs for *mut T {
 impl<T> FromPtRegs for *mut T {
     fn from_argument(ctx: &pt_regs, n: usize) -> Option<Self> {
         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<Self> {
-        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<Self> {
                 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<Self> {
-                Some(ctx.uregs.regs[0] as *const $type as _)
+                Some(ctx.uregs[0] as *const $type as _)
             }
         }