Skip to content

Commit 4a4a56b

Browse files
Tom Zanussirostedt
authored andcommitted
tracing: Change STR_VAR_MAX_LEN
32 is too small for this value, and anyway it makes more sense to use MAX_FILTER_STR_VAL, as this is also the value used for variable-length __strings. Link: https://lkml.kernel.org/r/6adfd1668ac1fd8670bd58206944a762061a5559.1601848695.git.zanussi@kernel.org Tested-by: Axel Rasmussen <[email protected]> Signed-off-by: Tom Zanussi <[email protected]> Signed-off-by: Steven Rostedt (VMware) <[email protected]>
1 parent fdda88d commit 4a4a56b

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

kernel/trace/trace_events_hist.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1398,6 +1398,8 @@ static int hist_trigger_elt_data_alloc(struct tracing_map_elt *elt)
13981398

13991399
n_str = hist_data->n_field_var_str + hist_data->n_save_var_str;
14001400

1401+
BUILD_BUG_ON(STR_VAR_LEN_MAX & (sizeof(u64) - 1));
1402+
14011403
size = STR_VAR_LEN_MAX;
14021404

14031405
for (i = 0; i < n_str; i++) {

kernel/trace/trace_synth.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#define SYNTH_SYSTEM "synthetic"
88
#define SYNTH_FIELDS_MAX 32
99

10-
#define STR_VAR_LEN_MAX 32 /* must be multiple of sizeof(u64) */
10+
#define STR_VAR_LEN_MAX MAX_FILTER_STR_VAL /* must be multiple of sizeof(u64) */
1111

1212
struct synth_field {
1313
char *type;

0 commit comments

Comments
 (0)