* [PATCH] platform/x86: intel_telemetry: initialize default trace verbosity
@ 2026-09-14 9:43 Aleksandrova Alyona
0 siblings, 0 replies; only message in thread
From: Aleksandrova Alyona @ 2026-09-14 9:43 UTC (permalink / raw)
To: Rajneesh Bhardwaj, David E . Box
Cc: Aleksandrova Alyona, Hans de Goede, Mark Gross,
Souvik Kumar Chakravarty, Darren Hart, platform-driver-x86,
linux-kernel, lvc-project
telemetry_def_get_trace_verbosity() returns success without initializing
the output verbosity value.
The default telemetry operations are installed when the core driver is
initialized and again by telemetry_clear_pltdata() when the platform
driver is removed. The telemetry debugfs files can remain available after
the platform driver removal.
A subsequent read of pss_trace_verbosity or ioss_trace_verbosity calls
telemetry_get_trace_verbosity(), which may use the default callback and
return success without setting verbosity. The uninitialized value is then
passed to seq_printf().
Validate the output pointer and initialize the default verbosity to zero
so callers never use an uninitialized value after a successful call.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Fixes: 378f956e3f93 ("platform/x86: Add Intel Telemetry Core Driver")
Signed-off-by: Aleksandrova Alyona <aga@itb.spb.ru>
---
drivers/platform/x86/intel_telemetry_core.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/platform/x86/intel_telemetry_core.c b/drivers/platform/x86/intel_telemetry_core.c
index e4be40f73eebf..6a1e9df26ba1b 100644
--- a/drivers/platform/x86/intel_telemetry_core.c
+++ b/drivers/platform/x86/intel_telemetry_core.c
@@ -51,6 +51,10 @@ static int telemetry_def_get_eventconfig(
static int telemetry_def_get_trace_verbosity(enum telemetry_unit telem_unit,
u32 *verbosity)
{
+ if (!verbosity)
+ return -EINVAL;
+
+ *verbosity = 0;
return 0;
}
--
2.26.2
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-14 9:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-14 9:43 [PATCH] platform/x86: intel_telemetry: initialize default trace verbosity Aleksandrova Alyona
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®