All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: aubrey.li@linux.intel.com
Cc: oe-kbuild-all@lists.linux.dev
Subject: [anolis-intel-cloud:devel-5.10 33/33] arch/x86/kernel/cpu/bugs.c:1379:20: warning: this statement may fall through
Date: Thu, 15 Jan 2026 19:40:12 +0800	[thread overview]
Message-ID: <202601151910.FPutxmgQ-lkp@intel.com> (raw)

tree:   https://gitee.com/anolis/intel-cloud-kernel.git devel-5.10
head:   ff3fd7c43fb0c95eb699767b7b4052b0250c87ce
commit: ff3fd7c43fb0c95eb699767b7b4052b0250c87ce [33/33] anolis: cpu vulnerabilities: support hardware-based mitigation for Retbleed and SRSO via Hygon IBRS to avoid performance degradation caused by software-based mitigation.
config: x86_64-anolis-intel-cloud-devel-5.10 (https://download.01.org/0day-ci/archive/20260115/202601151910.FPutxmgQ-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260115/202601151910.FPutxmgQ-lkp@intel.com/reproduce)

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>
| Closes: https://lore.kernel.org/oe-kbuild-all/202601151910.FPutxmgQ-lkp@intel.com/

All warnings (new ones prefixed by >>):

   arch/x86/kernel/cpu/bugs.c: In function 'spectre_v2_determine_rsb_fill_type_at_vmexit':
>> arch/x86/kernel/cpu/bugs.c:1379:20: warning: this statement may fall through [-Wimplicit-fallthrough=]
    1379 |                 if (boot_cpu_data.x86_vendor == X86_VENDOR_HYGON)
         |                    ^
   arch/x86/kernel/cpu/bugs.c:1381:9: note: here
    1381 |         case SPECTRE_V2_RETPOLINE:
         |         ^~~~


vim +1379 arch/x86/kernel/cpu/bugs.c

  1342	
  1343	static void __init spectre_v2_determine_rsb_fill_type_at_vmexit(enum spectre_v2_mitigation mode)
  1344	{
  1345		/*
  1346		 * Similar to context switches, there are two types of RSB attacks
  1347		 * after VM exit:
  1348		 *
  1349		 * 1) RSB underflow
  1350		 *
  1351		 * 2) Poisoned RSB entry
  1352		 *
  1353		 * When retpoline is enabled, both are mitigated by filling/clearing
  1354		 * the RSB.
  1355		 *
  1356		 * When IBRS is enabled, while #1 would be mitigated by the IBRS branch
  1357		 * prediction isolation protections, RSB still needs to be cleared
  1358		 * because of #2.  Note that SMEP provides no protection here, unlike
  1359		 * user-space-poisoned RSB entries.
  1360		 *
  1361		 * eIBRS should protect against RSB poisoning, but if the EIBRS_PBRSB
  1362		 * bug is present then a LITE version of RSB protection is required,
  1363		 * just a single call needs to retire before a RET is executed.
  1364		 */
  1365		switch (mode) {
  1366		case SPECTRE_V2_NONE:
  1367			return;
  1368	
  1369		case SPECTRE_V2_EIBRS_LFENCE:
  1370		case SPECTRE_V2_EIBRS:
  1371			if (boot_cpu_has_bug(X86_BUG_EIBRS_PBRSB)) {
  1372				setup_force_cpu_cap(X86_FEATURE_RSB_VMEXIT_LITE);
  1373				pr_info("Spectre v2 / PBRSB-eIBRS: Retire a single CALL on VMEXIT\n");
  1374			}
  1375			return;
  1376	
  1377		case SPECTRE_V2_EIBRS_RETPOLINE:
  1378			/* Hygon Enhanced IBRS flushes RAS upon privilege level changes from low to high. */
> 1379			if (boot_cpu_data.x86_vendor == X86_VENDOR_HYGON)
  1380				return;
  1381		case SPECTRE_V2_RETPOLINE:
  1382		case SPECTRE_V2_LFENCE:
  1383		case SPECTRE_V2_IBRS:
  1384			setup_force_cpu_cap(X86_FEATURE_RSB_VMEXIT);
  1385			pr_info("Spectre v2 / SpectreRSB : Filling RSB on VMEXIT\n");
  1386			return;
  1387		}
  1388	
  1389		pr_warn_once("Unknown Spectre v2 mode, disabling RSB mitigation at VM exit");
  1390		dump_stack();
  1391	}
  1392	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2026-01-15 11:41 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202601151910.FPutxmgQ-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=aubrey.li@linux.intel.com \
    --cc=oe-kbuild-all@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.