From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: [tip:x86/boot 10/10] arch/x86/boot/compressed/sev-handle-vc.c:104 do_boot_stage2_vc() error: we previously assumed 'boot_ghcb' could be null (see line 101)
Date: Sat, 10 May 2025 07:50:54 +0800 [thread overview]
Message-ID: <202505100719.9pE7wDfB-lkp@intel.com> (raw)
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
CC: x86@kernel.org
TO: Ard Biesheuvel <ardb@kernel.org>
CC: Ingo Molnar <mingo@kernel.org>
Hi Ard,
FYI, the error/warning was bisected to this commit, please ignore it if it's irrelevant.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/boot
head: ed4d95d033e359f9445e85bf5a768a5859a5830b
commit: ed4d95d033e359f9445e85bf5a768a5859a5830b [10/10] x86/sev: Disentangle #VC handling code from startup code
:::::: branch date: 5 days ago
:::::: commit date: 5 days ago
config: x86_64-randconfig-161-20250510 (https://download.01.org/0day-ci/archive/20250510/202505100719.9pE7wDfB-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202505100719.9pE7wDfB-lkp@intel.com/
smatch warnings:
arch/x86/boot/compressed/sev-handle-vc.c:104 do_boot_stage2_vc() error: we previously assumed 'boot_ghcb' could be null (see line 101)
vim +/boot_ghcb +104 arch/x86/boot/compressed/sev-handle-vc.c
ed4d95d033e359 Ard Biesheuvel 2025-05-04 95
ed4d95d033e359 Ard Biesheuvel 2025-05-04 96 void do_boot_stage2_vc(struct pt_regs *regs, unsigned long exit_code)
ed4d95d033e359 Ard Biesheuvel 2025-05-04 97 {
ed4d95d033e359 Ard Biesheuvel 2025-05-04 98 struct es_em_ctxt ctxt;
ed4d95d033e359 Ard Biesheuvel 2025-05-04 99 enum es_result result;
ed4d95d033e359 Ard Biesheuvel 2025-05-04 100
ed4d95d033e359 Ard Biesheuvel 2025-05-04 @101 if (!boot_ghcb && !early_setup_ghcb())
ed4d95d033e359 Ard Biesheuvel 2025-05-04 102 sev_es_terminate(SEV_TERM_SET_GEN, GHCB_SEV_ES_GEN_REQ);
ed4d95d033e359 Ard Biesheuvel 2025-05-04 103
ed4d95d033e359 Ard Biesheuvel 2025-05-04 @104 vc_ghcb_invalidate(boot_ghcb);
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@linaro.org>
To: oe-kbuild@lists.linux.dev, Ard Biesheuvel <ardb@kernel.org>
Cc: lkp@intel.com, oe-kbuild-all@lists.linux.dev,
linux-kernel@vger.kernel.org, x86@kernel.org,
Ingo Molnar <mingo@kernel.org>
Subject: [tip:x86/boot 10/10] arch/x86/boot/compressed/sev-handle-vc.c:104 do_boot_stage2_vc() error: we previously assumed 'boot_ghcb' could be null (see line 101)
Date: Sat, 10 May 2025 10:43:44 +0300 [thread overview]
Message-ID: <202505100719.9pE7wDfB-lkp@intel.com> (raw)
Message-ID: <20250510074344.PZIj0J37rewxB3i32wzs3z9jgWOKaXBIZER1zgAnKzI@z> (raw)
Hi Ard,
FYI, the error/warning was bisected to this commit, please ignore it if it's irrelevant.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/boot
head: ed4d95d033e359f9445e85bf5a768a5859a5830b
commit: ed4d95d033e359f9445e85bf5a768a5859a5830b [10/10] x86/sev: Disentangle #VC handling code from startup code
config: x86_64-randconfig-161-20250510 (https://download.01.org/0day-ci/archive/20250510/202505100719.9pE7wDfB-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
| Closes: https://lore.kernel.org/r/202505100719.9pE7wDfB-lkp@intel.com/
smatch warnings:
arch/x86/boot/compressed/sev-handle-vc.c:104 do_boot_stage2_vc() error: we previously assumed 'boot_ghcb' could be null (see line 101)
vim +/boot_ghcb +104 arch/x86/boot/compressed/sev-handle-vc.c
ed4d95d033e359 Ard Biesheuvel 2025-05-04 96 void do_boot_stage2_vc(struct pt_regs *regs, unsigned long exit_code)
ed4d95d033e359 Ard Biesheuvel 2025-05-04 97 {
ed4d95d033e359 Ard Biesheuvel 2025-05-04 98 struct es_em_ctxt ctxt;
ed4d95d033e359 Ard Biesheuvel 2025-05-04 99 enum es_result result;
ed4d95d033e359 Ard Biesheuvel 2025-05-04 100
ed4d95d033e359 Ard Biesheuvel 2025-05-04 @101 if (!boot_ghcb && !early_setup_ghcb())
^^^^^^^^^^
Check for NULL. Should the && be ||?
ed4d95d033e359 Ard Biesheuvel 2025-05-04 102 sev_es_terminate(SEV_TERM_SET_GEN, GHCB_SEV_ES_GEN_REQ);
ed4d95d033e359 Ard Biesheuvel 2025-05-04 103
ed4d95d033e359 Ard Biesheuvel 2025-05-04 @104 vc_ghcb_invalidate(boot_ghcb);
^^^^^^^^^
Unchecked dereference.
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2025-05-09 23:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-09 23:50 kernel test robot [this message]
2025-05-10 7:43 ` [tip:x86/boot 10/10] arch/x86/boot/compressed/sev-handle-vc.c:104 do_boot_stage2_vc() error: we previously assumed 'boot_ghcb' could be null (see line 101) Dan Carpenter
2025-05-10 7:57 ` Ard Biesheuvel
2025-05-10 10:11 ` Dan Carpenter
2025-09-12 18:26 ` Borislav Petkov
2025-09-12 18:34 ` Tom Lendacky
2025-09-12 18:44 ` Borislav Petkov
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=202505100719.9pE7wDfB-lkp@intel.com \
--to=lkp@intel.com \
--cc=error27@gmail.com \
--cc=oe-kbuild@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.