Repository navigation
Commit 5b2f2cb
tracing/histogram: Do not copy the fixed-size char array field over the field size
[ Upstream commit 63f84ae ]
Do not copy the fixed-size char array field of the events over
the field size. The histogram treats char array as a string and
there are 2 types of char array in the event, fixed-size and
dynamic string. The dynamic string (__data_loc) field must be
null terminated, but the fixed-size char array field may not
be null terminated (not a string, but just a data).
In that case, histogram can copy the data after the field.
This uses the original field size for fixed-size char array
field to restrict the histogram not to access over the original
field size.
Link: https://lkml.kernel.org/r/163673292822.195747.3696966210526410250.stgit@devnote2
Fixes: 02205a6 (tracing: Add support for 'field variables')
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>1 parent 1d61255 commit 5b2f2cb
1 file changed
Lines changed: 5 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1684 | 1684 | | |
1685 | 1685 | | |
1686 | 1686 | | |
1687 | | - | |
| 1687 | + | |
1688 | 1688 | | |
1689 | | - | |
| 1689 | + | |
| 1690 | + | |
1690 | 1691 | | |
1691 | 1692 | | |
1692 | 1693 | | |
| |||
2624 | 2625 | | |
2625 | 2626 | | |
2626 | 2627 | | |
2627 | | - | |
| 2628 | + | |
2628 | 2629 | | |
2629 | 2630 | | |
2630 | 2631 | | |
| |||
4472 | 4473 | | |
4473 | 4474 | | |
4474 | 4475 | | |
4475 | | - | |
| 4476 | + | |
4476 | 4477 | | |
4477 | 4478 | | |
4478 | 4479 | | |
| |||
0 commit comments