Skip to content

Commit

Permalink
fix(modern_bpf): solve an issue with 64-bit shift on s390x
Browse files Browse the repository at this point in the history
Signed-off-by: Andrea Terzolo <[email protected]>
Co-authored-by: Hendrik Brueckner <[email protected]>
  • Loading branch information
2 people authored and poiana committed Aug 30, 2022
1 parent 40399c8 commit 3f5c13b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ int BPF_PROG(quotactl_e,
/*=============================== COLLECT PARAMETERS ===========================*/

/* Parameter 1: cmd (type: PT_FLAGS16) */
unsigned long cmd = extract__syscall_argument(regs, 0);
uint32_t cmd = (uint32_t)extract__syscall_argument(regs, 0);
u16 scap_cmd = quotactl_cmd_to_scap(cmd);
ringbuf__store_u16(&ringbuf, scap_cmd);

Expand Down Expand Up @@ -93,7 +93,7 @@ int BPF_PROG(quotactl_x,
unsigned long special_pointer = extract__syscall_argument(regs, 1);
auxmap__store_charbuf_param(auxmap, special_pointer, USER);

unsigned long cmd = extract__syscall_argument(regs, 0);
uint32_t cmd = (uint32_t)extract__syscall_argument(regs, 0);
u16 scap_cmd = quotactl_cmd_to_scap(cmd);

/* The `addr` argument is the address of an optional, command-
Expand Down

0 comments on commit 3f5c13b

Please sign in to comment.