From: Dan Carpenter <error27@gmail.com>
To: Tianyu.Lan@microsoft.com
Cc: linux-hyperv@vger.kernel.org,
Jinank Jain <jinankjain@linux.microsoft.com>
Subject: [bug report] x86/hyperv: Add Write/Read MSR registers via ghcb page
Date: Mon, 16 Jan 2023 11:37:59 +0300 [thread overview]
Message-ID: <Y8UM59rdoCD0D6V2@kili> (raw)
Hello Tianyu Lan,
The patch faff44069ff5: "x86/hyperv: Add Write/Read MSR registers via
ghcb page" from Oct 25, 2021, leads to the following Smatch static
checker warning:
arch/x86/kernel/cpu/mshyperv.c:73 hv_get_non_nested_register()
error: uninitialized symbol 'value'.
arch/x86/kernel/cpu/mshyperv.c
63
64 #if IS_ENABLED(CONFIG_HYPERV)
65 u64 hv_get_non_nested_register(unsigned int reg)
66 {
67 u64 value;
68
69 if (hv_is_synic_reg(reg) && hv_isolation_type_snp())
70 hv_ghcb_msr_read(reg, &value);
^^^^^^
There are three places in hv_ghcb_msr_read() which don't initialize
value.
71 else
72 rdmsrl(reg, value);
--> 73 return value;
74 }
regards,
dan carpenter
next reply other threads:[~2023-01-16 8:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-16 8:37 Dan Carpenter [this message]
2023-01-17 10:56 ` [bug report] x86/hyperv: Add Write/Read MSR registers via ghcb page Jinank Jain
2023-01-17 11:00 ` Dan Carpenter
2023-01-17 11:06 ` Dan Carpenter
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=Y8UM59rdoCD0D6V2@kili \
--to=error27@gmail.com \
--cc=Tianyu.Lan@microsoft.com \
--cc=jinankjain@linux.microsoft.com \
--cc=linux-hyperv@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;
as well as URLs for NNTP newsgroup(s).