diff options
| author | Pengpeng Hou <pengpeng@iscas.ac.cn> | 2026-04-30 12:33:50 +0800 |
|---|---|---|
| committer | Steven Rostedt <rostedt@goodmis.org> | 2026-05-21 18:03:06 -0400 |
| commit | f07883450eb14d1cf020b55d9f3a7ec5683bcd26 (patch) | |
| tree | 31711c7c7b055cdb8d3841f8cb4fdd139e5003d6 /drivers/phy/eswin/git@git.tavy.me:linux.git | |
| parent | ae3197ee07cc8ec66261d891b2b5bf3879e7b852 (diff) | |
tracing: Bound synthetic-field strings with seq_buf
The synthetic field helpers build a prefixed synthetic variable name and
a generated hist command in fixed MAX_FILTER_STR_VAL buffers. The
current code appends those strings with raw strcat(), so long key lists,
field names, or saved filters can run past the end of the staging
buffers.
Build both strings with seq_buf and propagate -E2BIG if either the
synthetic variable name or the generated command exceeds
MAX_FILTER_STR_VAL. This keeps the existing tracing-side limit while
using the helper intended for bounded command construction.
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Tom Zanussi <tom.zanussi@linux.intel.com>
Link: https://patch.msgid.link/20260430043350.57928-1-pengpeng@iscas.ac.cn
Fixes: 02205a6752f2 ("tracing: Add support for 'field variables'")
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Reviewed-by: Tom Zanussi <zanussi@kernel.org>
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
[ sdr: Moved struct seq_buf *s for upside-down x-mas tree formatting ]
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'drivers/phy/eswin/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
