Skip to content

Commit

Permalink
fix(driver): address some minor comments relative to falcosecurity#811
Browse files Browse the repository at this point in the history
Signed-off-by: Andrea Terzolo <andrea.terzolo@polito.it>
  • Loading branch information
Andreagit97 committed Mar 8, 2023
1 parent 1720439 commit 55cb2d8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions driver/bpf/plumbing_helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,7 @@ static __always_inline void call_filler(void *ctx,
release_local_state(state);
}

#if defined(CAPTURE_SOCKETCALL) && defined(BPF_SUPPORTS_RAW_TRACEPOINTS)
#if defined(CAPTURE_SOCKETCALL) && defined(BPF_SUPPORTS_RAW_TRACEPOINTS)
static __always_inline long convert_network_syscalls(void *ctx)
{
int socketcall_id = (int)bpf_syscall_get_argument_from_ctx(ctx, 0);
Expand All @@ -667,7 +667,7 @@ static __always_inline long convert_network_syscalls(void *ctx)
case SYS_ACCEPT:
#if defined(CONFIG_S390) && defined(__NR_accept4)
return __NR_accept4;
#elif defined(__NR_ACCEPT)
#elif defined(__NR_accept)
return __NR_accept;
#endif
break;
Expand Down
2 changes: 1 addition & 1 deletion driver/modern_bpf/helpers/interfaces/syscalls_dispatcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ static __always_inline long convert_network_syscalls(struct pt_regs *regs)
case SYS_ACCEPT:
#if defined(__TARGET_ARCH_s390) && defined(__NR_accept4)
return __NR_accept4;
#elif defined(__NR_ACCEPT)
#elif defined(__NR_accept)
return __NR_accept;
#endif
break;
Expand Down
4 changes: 2 additions & 2 deletions driver/ppm_fillers.c
Original file line number Diff line number Diff line change
Expand Up @@ -2088,7 +2088,7 @@ int f_sys_setsockopt_x(struct event_filler_arguments *args)
syscall_get_arguments_deprecated(current, args->regs, 0, 5, val);
#ifndef UDIG
else
memcpy(val, args->socketcall_args, 5*sizeof(syscall_arg_t));
memcpy(val, args->socketcall_args, 5*sizeof(unsigned long));
#endif

/* Parameter 2: fd (type: PT_FD) */
Expand Down Expand Up @@ -2128,7 +2128,7 @@ int f_sys_getsockopt_x(struct event_filler_arguments *args)
syscall_get_arguments_deprecated(current, args->regs, 0, 5, val);
#ifndef UDIG
else
memcpy(val, args->socketcall_args, 5*sizeof(syscall_arg_t));
memcpy(val, args->socketcall_args, 5*sizeof(unsigned long));
#endif

/* Parameter 1: res (type: PT_ERRNO) */
Expand Down

0 comments on commit 55cb2d8

Please sign in to comment.