Skip to content

Commit

Permalink
Fix IOV_BUF comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelroquetto committed Aug 13, 2024
1 parent 1b62799 commit 70c40ef
Show file tree
Hide file tree
Showing 17 changed files with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bpf/protocol_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,9 @@ static __always_inline int read_msghdr_buf(struct msghdr *msg, u8* buf, size_t m
if (bpf_core_enum_value_exists(enum iter_type___dummy, ITER_UBUF)) {
const int iter_ubuf = bpf_core_enum_value(enum iter_type___dummy, ITER_UBUF);

if (ctx.ubuf != NULL && (ctx.iter_type & iter_ubuf) == iter_ubuf) {
// ITER_UBUF is never a bitmask, and can be 0, so we perform a proper
// equality check rather than a bitwise and like we do for ITER_IOVEC
if (ctx.ubuf != NULL && ctx.iter_type == iter_ubuf) {
bpf_clamp_umax(ctx.count, IO_VEC_MAX_LEN);
return bpf_probe_read(buf, ctx.count, ctx.ubuf) == 0 ? ctx.count : 0;
}
Expand Down
Binary file modified pkg/internal/ebpf/httpfltr/bpf_arm64_bpfel.o
Binary file not shown.
Binary file modified pkg/internal/ebpf/httpfltr/bpf_debug_arm64_bpfel.o
Binary file not shown.
Binary file modified pkg/internal/ebpf/httpfltr/bpf_debug_x86_bpfel.o
Binary file not shown.
Binary file modified pkg/internal/ebpf/httpfltr/bpf_tp_arm64_bpfel.o
Binary file not shown.
Binary file modified pkg/internal/ebpf/httpfltr/bpf_tp_debug_arm64_bpfel.o
Binary file not shown.
Binary file modified pkg/internal/ebpf/httpfltr/bpf_tp_debug_x86_bpfel.o
Binary file not shown.
Binary file modified pkg/internal/ebpf/httpfltr/bpf_tp_x86_bpfel.o
Binary file not shown.
Binary file modified pkg/internal/ebpf/httpfltr/bpf_x86_bpfel.o
Binary file not shown.
Binary file modified pkg/internal/ebpf/httpssl/bpf_arm64_bpfel.o
Binary file not shown.
Binary file modified pkg/internal/ebpf/httpssl/bpf_debug_arm64_bpfel.o
Binary file not shown.
Binary file modified pkg/internal/ebpf/httpssl/bpf_debug_x86_bpfel.o
Binary file not shown.
Binary file modified pkg/internal/ebpf/httpssl/bpf_tp_arm64_bpfel.o
Binary file not shown.
Binary file modified pkg/internal/ebpf/httpssl/bpf_tp_debug_arm64_bpfel.o
Binary file not shown.
Binary file modified pkg/internal/ebpf/httpssl/bpf_tp_debug_x86_bpfel.o
Binary file not shown.
Binary file modified pkg/internal/ebpf/httpssl/bpf_tp_x86_bpfel.o
Binary file not shown.
Binary file modified pkg/internal/ebpf/httpssl/bpf_x86_bpfel.o
Binary file not shown.

0 comments on commit 70c40ef

Please sign in to comment.