diff --git a/bpf/protocol_common.h b/bpf/protocol_common.h index 5c5579d4b..df8536285 100644 --- a/bpf/protocol_common.h +++ b/bpf/protocol_common.h @@ -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; } diff --git a/pkg/internal/ebpf/httpfltr/bpf_arm64_bpfel.o b/pkg/internal/ebpf/httpfltr/bpf_arm64_bpfel.o index 160025351..65a446924 100644 Binary files a/pkg/internal/ebpf/httpfltr/bpf_arm64_bpfel.o and b/pkg/internal/ebpf/httpfltr/bpf_arm64_bpfel.o differ diff --git a/pkg/internal/ebpf/httpfltr/bpf_debug_arm64_bpfel.o b/pkg/internal/ebpf/httpfltr/bpf_debug_arm64_bpfel.o index 5372fa952..d21948418 100644 Binary files a/pkg/internal/ebpf/httpfltr/bpf_debug_arm64_bpfel.o and b/pkg/internal/ebpf/httpfltr/bpf_debug_arm64_bpfel.o differ diff --git a/pkg/internal/ebpf/httpfltr/bpf_debug_x86_bpfel.o b/pkg/internal/ebpf/httpfltr/bpf_debug_x86_bpfel.o index d1550530a..6236e8da3 100644 Binary files a/pkg/internal/ebpf/httpfltr/bpf_debug_x86_bpfel.o and b/pkg/internal/ebpf/httpfltr/bpf_debug_x86_bpfel.o differ diff --git a/pkg/internal/ebpf/httpfltr/bpf_tp_arm64_bpfel.o b/pkg/internal/ebpf/httpfltr/bpf_tp_arm64_bpfel.o index cde64bf97..a12a5163e 100644 Binary files a/pkg/internal/ebpf/httpfltr/bpf_tp_arm64_bpfel.o and b/pkg/internal/ebpf/httpfltr/bpf_tp_arm64_bpfel.o differ diff --git a/pkg/internal/ebpf/httpfltr/bpf_tp_debug_arm64_bpfel.o b/pkg/internal/ebpf/httpfltr/bpf_tp_debug_arm64_bpfel.o index e8dd37889..a60d965e5 100644 Binary files a/pkg/internal/ebpf/httpfltr/bpf_tp_debug_arm64_bpfel.o and b/pkg/internal/ebpf/httpfltr/bpf_tp_debug_arm64_bpfel.o differ diff --git a/pkg/internal/ebpf/httpfltr/bpf_tp_debug_x86_bpfel.o b/pkg/internal/ebpf/httpfltr/bpf_tp_debug_x86_bpfel.o index 5d226df29..6d88be517 100644 Binary files a/pkg/internal/ebpf/httpfltr/bpf_tp_debug_x86_bpfel.o and b/pkg/internal/ebpf/httpfltr/bpf_tp_debug_x86_bpfel.o differ diff --git a/pkg/internal/ebpf/httpfltr/bpf_tp_x86_bpfel.o b/pkg/internal/ebpf/httpfltr/bpf_tp_x86_bpfel.o index 7a38cdecd..3a7125477 100644 Binary files a/pkg/internal/ebpf/httpfltr/bpf_tp_x86_bpfel.o and b/pkg/internal/ebpf/httpfltr/bpf_tp_x86_bpfel.o differ diff --git a/pkg/internal/ebpf/httpfltr/bpf_x86_bpfel.o b/pkg/internal/ebpf/httpfltr/bpf_x86_bpfel.o index e0bbf7efd..5e14db788 100644 Binary files a/pkg/internal/ebpf/httpfltr/bpf_x86_bpfel.o and b/pkg/internal/ebpf/httpfltr/bpf_x86_bpfel.o differ diff --git a/pkg/internal/ebpf/httpssl/bpf_arm64_bpfel.o b/pkg/internal/ebpf/httpssl/bpf_arm64_bpfel.o index 6a549dce7..192790f7d 100644 Binary files a/pkg/internal/ebpf/httpssl/bpf_arm64_bpfel.o and b/pkg/internal/ebpf/httpssl/bpf_arm64_bpfel.o differ diff --git a/pkg/internal/ebpf/httpssl/bpf_debug_arm64_bpfel.o b/pkg/internal/ebpf/httpssl/bpf_debug_arm64_bpfel.o index ae89bbe4e..573b2abdf 100644 Binary files a/pkg/internal/ebpf/httpssl/bpf_debug_arm64_bpfel.o and b/pkg/internal/ebpf/httpssl/bpf_debug_arm64_bpfel.o differ diff --git a/pkg/internal/ebpf/httpssl/bpf_debug_x86_bpfel.o b/pkg/internal/ebpf/httpssl/bpf_debug_x86_bpfel.o index d7caaa0e6..7196f0bc6 100644 Binary files a/pkg/internal/ebpf/httpssl/bpf_debug_x86_bpfel.o and b/pkg/internal/ebpf/httpssl/bpf_debug_x86_bpfel.o differ diff --git a/pkg/internal/ebpf/httpssl/bpf_tp_arm64_bpfel.o b/pkg/internal/ebpf/httpssl/bpf_tp_arm64_bpfel.o index d9918072c..0c9b018be 100644 Binary files a/pkg/internal/ebpf/httpssl/bpf_tp_arm64_bpfel.o and b/pkg/internal/ebpf/httpssl/bpf_tp_arm64_bpfel.o differ diff --git a/pkg/internal/ebpf/httpssl/bpf_tp_debug_arm64_bpfel.o b/pkg/internal/ebpf/httpssl/bpf_tp_debug_arm64_bpfel.o index eab954412..c58186fb4 100644 Binary files a/pkg/internal/ebpf/httpssl/bpf_tp_debug_arm64_bpfel.o and b/pkg/internal/ebpf/httpssl/bpf_tp_debug_arm64_bpfel.o differ diff --git a/pkg/internal/ebpf/httpssl/bpf_tp_debug_x86_bpfel.o b/pkg/internal/ebpf/httpssl/bpf_tp_debug_x86_bpfel.o index 2c5ca1912..bb65efaa7 100644 Binary files a/pkg/internal/ebpf/httpssl/bpf_tp_debug_x86_bpfel.o and b/pkg/internal/ebpf/httpssl/bpf_tp_debug_x86_bpfel.o differ diff --git a/pkg/internal/ebpf/httpssl/bpf_tp_x86_bpfel.o b/pkg/internal/ebpf/httpssl/bpf_tp_x86_bpfel.o index 1181602cb..bb142f7c3 100644 Binary files a/pkg/internal/ebpf/httpssl/bpf_tp_x86_bpfel.o and b/pkg/internal/ebpf/httpssl/bpf_tp_x86_bpfel.o differ diff --git a/pkg/internal/ebpf/httpssl/bpf_x86_bpfel.o b/pkg/internal/ebpf/httpssl/bpf_x86_bpfel.o index 28a2ed47c..70edf8d44 100644 Binary files a/pkg/internal/ebpf/httpssl/bpf_x86_bpfel.o and b/pkg/internal/ebpf/httpssl/bpf_x86_bpfel.o differ