From 22d5ea7f36a74adcf554f3937b55c8e0dc7755e1 Mon Sep 17 00:00:00 2001 From: Nadav Strahilevitz Date: Thu, 10 Oct 2024 10:23:34 +0000 Subject: [PATCH] wip: standardize strarr buffer submit --- pkg/ebpf/c/common/buffer.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/ebpf/c/common/buffer.h b/pkg/ebpf/c/common/buffer.h index 742a277082e5..ea9fee7955d9 100644 --- a/pkg/ebpf/c/common/buffer.h +++ b/pkg/ebpf/c/common/buffer.h @@ -260,8 +260,9 @@ statfunc int save_str_arr_to_buf(args_buffer_t *buf, const char __user *const __ statfunc int save_args_str_arr_to_buf( args_buffer_t *buf, const char *start, const char *end, int elem_num, u8 index) { - // Data saved to submit buf: [index][len][arg_len][arg #][null delimited string array] - // Note: This helper saves null (0x00) delimited string array into buf + // Data saved to submit buf: [index][len][arg_len][arg #][array of null delimited string] + // Note: This helper saves null (0x00) delimited string array into buf in the format: + // [[str1][\n][str2][\n][...][strn][\n])] if (start >= end) return 0;