mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Aleksandrova Alyona <aga@itb.spb.ru>
Cc: Rajneesh Bhardwaj <irenic.rajneesh@gmail.com>,
	 "David E . Box" <david.e.box@linux.intel.com>,
	 Hans de Goede <hansg@kernel.org>,
	Darren Hart <dvhart@linux.intel.com>,
	 platform-driver-x86@vger.kernel.org,
	LKML <linux-kernel@vger.kernel.org>,
	 lvc-project@linuxtesting.org
Subject: Re: [PATCH v2] platform/x86: intel_telemetry: initialize default trace verbosity
Date: Tue, 15 Sep 2026 15:26:31 +0300 (EEST)	[thread overview]
Message-ID: <4ab722af-756d-0c68-3b25-4bd38e89cdb1@linux.intel.com> (raw)
In-Reply-To: <20260915122107.9784-1-aga@itb.spb.ru>

On Tue, 15 Sep 2026, Aleksandrova Alyona wrote:

> 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>
> ---

You're missing the information on what is changed in v2?!

>  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 f312864b8d07a..62299524a07b2 100644
> --- a/drivers/platform/x86/intel/telemetry/core.c
> +++ b/drivers/platform/x86/intel/telemetry/core.c
> @@ -24,6 +24,10 @@ static struct telemetry_core_config telm_core_conf;
>  static int telemetry_def_get_trace_verbosity(enum telemetry_unit telem_unit,
>  					     u32 *verbosity)
>  {
> +	if (!verbosity)
> +		return -EINVAL;
> +
> +	*verbosity = 0;
>  	return 0;
>  }
>  
> 

-- 
 i.


      reply	other threads:[~2026-09-15 12:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-15 12:21 Aleksandrova Alyona
2026-09-15 12:26 ` Ilpo Järvinen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4ab722af-756d-0c68-3b25-4bd38e89cdb1@linux.intel.com \
    --to=ilpo.jarvinen@linux.intel.com \
    --cc=aga@itb.spb.ru \
    --cc=david.e.box@linux.intel.com \
    --cc=dvhart@linux.intel.com \
    --cc=hansg@kernel.org \
    --cc=irenic.rajneesh@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lvc-project@linuxtesting.org \
    --cc=platform-driver-x86@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®