[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 5/5] tracetool: Forbid newline character in event format
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 5/5] tracetool: Forbid newline character in event format |
Date: |
Thu, 6 Jun 2024 12:39:43 +0200 |
Events aren't designed to be multi-lines. Multiple events
can be used instead. Prevent that format using multi-lines
by forbidding the newline character.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
scripts/tracetool/__init__.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/scripts/tracetool/__init__.py b/scripts/tracetool/__init__.py
index 7237abe0e8..bc03238c0f 100644
--- a/scripts/tracetool/__init__.py
+++ b/scripts/tracetool/__init__.py
@@ -301,6 +301,8 @@ def build(line_str, lineno, filename):
if fmt.endswith(r'\n"'):
raise ValueError("Event format must not end with a newline "
"character")
+ if '\\n' in fmt:
+ raise ValueError("Event format must not use new line character")
if len(fmt_trans) > 0:
fmt = [fmt_trans, fmt]
--
2.41.0
- [PATCH 0/5] trace: Remove and forbid newline characters in event format, Philippe Mathieu-Daudé, 2024/06/06
- [PATCH 1/5] backends/tpm: Remove newline character in trace event, Philippe Mathieu-Daudé, 2024/06/06
- [PATCH 2/5] hw/sh4: Remove newline character in trace events, Philippe Mathieu-Daudé, 2024/06/06
- [PATCH 3/5] hw/usb: Remove newline character in trace events, Philippe Mathieu-Daudé, 2024/06/06
- [PATCH 4/5] hw/vfio: Remove newline character in trace events, Philippe Mathieu-Daudé, 2024/06/06
- [PATCH 5/5] tracetool: Forbid newline character in event format,
Philippe Mathieu-Daudé <=
- Re: [PATCH 0/5] trace: Remove and forbid newline characters in event format, Mads Ynddal, 2024/06/07
- Re: [PATCH 0/5] trace: Remove and forbid newline characters in event format, Stefan Hajnoczi, 2024/06/10