From: kernel test robot <lkp@intel.com>
To: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [kkdwivedi:cancellations-backup/scratch/guards-tested 3/51] arch/x86/include/asm/nospec-branch.h:656:31: error: '__KERNEL_DS' undeclared
Date: Tue, 17 Nov 2026 07:37:26 +0800 [thread overview]
Message-ID: <202611170726.Sw6EPtoN-lkp@intel.com> (raw)
tree: https://github.com/kkdwivedi/linux cancellations-backup/scratch/guards-tested
head: 67019855e76166974da23fb9e8c833b967bcc76a
commit: d6c820ed0315c90ec643c56fbf84d76d28ca9776 [3/51] bpf: Let a callback unwind into the pad of its helper
config: um-allyesconfig (https://download.01.org/0day-ci/archive/20261117/202611170726.Sw6EPtoN-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/20261117/202611170726.Sw6EPtoN-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/202611170726.Sw6EPtoN-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from include/linux/bpf_unwind.h:55,
from kernel/bpf/verifier.c:13:
arch/x86/include/asm/nospec-branch.h: In function 'x86_clear_cpu_buffers':
>> arch/x86/include/asm/nospec-branch.h:656:31: error: '__KERNEL_DS' undeclared (first use in this function)
656 | static const u16 ds = __KERNEL_DS;
| ^~~~~~~~~~~
arch/x86/include/asm/nospec-branch.h:656:31: note: each undeclared identifier is reported only once for each function it appears in
vim +/__KERNEL_DS +656 arch/x86/include/asm/nospec-branch.h
6a9e5292725177 Thomas Gleixner 2019-02-18 646
6a9e5292725177 Thomas Gleixner 2019-02-18 647 /**
f9af88a3d384c8 Borislav Petkov (AMD 2024-09-11 648) * x86_clear_cpu_buffers - Buffer clearing support for different x86 CPU vulns
6a9e5292725177 Thomas Gleixner 2019-02-18 649 *
6a9e5292725177 Thomas Gleixner 2019-02-18 650 * This uses the otherwise unused and obsolete VERW instruction in
6a9e5292725177 Thomas Gleixner 2019-02-18 651 * combination with microcode which triggers a CPU buffer flush when the
6a9e5292725177 Thomas Gleixner 2019-02-18 652 * instruction is executed.
6a9e5292725177 Thomas Gleixner 2019-02-18 653 */
f9af88a3d384c8 Borislav Petkov (AMD 2024-09-11 654) static __always_inline void x86_clear_cpu_buffers(void)
6a9e5292725177 Thomas Gleixner 2019-02-18 655 {
6a9e5292725177 Thomas Gleixner 2019-02-18 @656 static const u16 ds = __KERNEL_DS;
6a9e5292725177 Thomas Gleixner 2019-02-18 657
6a9e5292725177 Thomas Gleixner 2019-02-18 658 /*
6a9e5292725177 Thomas Gleixner 2019-02-18 659 * Has to be the memory-operand variant because only that
6a9e5292725177 Thomas Gleixner 2019-02-18 660 * guarantees the CPU buffer flush functionality according to
6a9e5292725177 Thomas Gleixner 2019-02-18 661 * documentation. The register-operand variant does not.
6a9e5292725177 Thomas Gleixner 2019-02-18 662 * Works with any segment selector, but a valid writable
6a9e5292725177 Thomas Gleixner 2019-02-18 663 * data segment is the fastest variant.
6a9e5292725177 Thomas Gleixner 2019-02-18 664 *
6a9e5292725177 Thomas Gleixner 2019-02-18 665 * "cc" clobber is required because VERW modifies ZF.
6a9e5292725177 Thomas Gleixner 2019-02-18 666 */
6a9e5292725177 Thomas Gleixner 2019-02-18 667 asm volatile("verw %[ds]" : : [ds] "m" (ds) : "cc");
6a9e5292725177 Thomas Gleixner 2019-02-18 668 }
6a9e5292725177 Thomas Gleixner 2019-02-18 669
:::::: The code at line 656 was first introduced by commit
:::::: 6a9e529272517755904b7afa639f6db59ddb793e x86/speculation/mds: Add mds_clear_cpu_buffers()
:::::: TO: Thomas Gleixner <tglx@linutronix.de>
:::::: CC: Thomas Gleixner <tglx@linutronix.de>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2026-11-16 23:38 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=202611170726.Sw6EPtoN-lkp@intel.com \
--to=lkp@intel.com \
--cc=memxor@gmail.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.