[luto:x86/no_sce 1/2] arch/x86/entry/common.c:157:6: error: use of undeclared identifier 'vdso_image_32'; did you mean 'vdso_image_64'?

From: kernel test robot
Date: Wed Sep 29 2021 - 17:16:14 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/luto/linux.git x86/no_sce
head: bfaecaf0dad8f61e80285125f4895c9737e3d6d8
commit: bf85057ed696c8996a5f5b924a3fd58698450511 [1/2] x86/syscall: Remove the IA32_EMULATION=n compat syscall code
config: x86_64-randconfig-a013-20210929 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project dc6e8dfdfe7efecfda318d43a06fae18b40eb498)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/luto/linux.git/commit/?id=bf85057ed696c8996a5f5b924a3fd58698450511
git remote add luto https://git.kernel.org/pub/scm/linux/kernel/git/luto/linux.git
git fetch --no-tags luto x86/no_sce
git checkout bf85057ed696c8996a5f5b924a3fd58698450511
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash arch/x86/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

>> arch/x86/entry/common.c:157:6: error: use of undeclared identifier 'vdso_image_32'; did you mean 'vdso_image_64'?
vdso_image_32.sym_int80_landing_pad;
^~~~~~~~~~~~~
vdso_image_64
arch/x86/include/asm/vdso.h:37:32: note: 'vdso_image_64' declared here
extern const struct vdso_image vdso_image_64;
^
arch/x86/entry/common.c:202:24: warning: no previous prototype for function 'do_SYSENTER_32' [-Wmissing-prototypes]
__visible noinstr long do_SYSENTER_32(struct pt_regs *regs)
^
arch/x86/entry/common.c:202:19: note: declare 'static' if the function is not intended to be used outside of this translation unit
__visible noinstr long do_SYSENTER_32(struct pt_regs *regs)
^
static
1 warning and 1 error generated.


vim +157 arch/x86/entry/common.c

8b13c2552ffc8e Andy Lutomirski 2015-10-05 148
5f310f739b4cc3 Andy Lutomirski 2015-10-05 149 /* Returns 0 to return using IRET or 1 to return using SYSEXIT/SYSRETL. */
8f159f1dfa1ea2 Thomas Gleixner 2020-03-10 150 __visible noinstr long do_fast_syscall_32(struct pt_regs *regs)
710246df580411 Andy Lutomirski 2015-10-05 151 {
710246df580411 Andy Lutomirski 2015-10-05 152 /*
710246df580411 Andy Lutomirski 2015-10-05 153 * Called using the internal vDSO SYSENTER/SYSCALL32 calling
710246df580411 Andy Lutomirski 2015-10-05 154 * convention. Adjust regs so it looks like we entered using int80.
710246df580411 Andy Lutomirski 2015-10-05 155 */
710246df580411 Andy Lutomirski 2015-10-05 156 unsigned long landing_pad = (unsigned long)current->mm->context.vdso +
710246df580411 Andy Lutomirski 2015-10-05 @157 vdso_image_32.sym_int80_landing_pad;
710246df580411 Andy Lutomirski 2015-10-05 158
710246df580411 Andy Lutomirski 2015-10-05 159 /*
710246df580411 Andy Lutomirski 2015-10-05 160 * SYSENTER loses EIP, and even SYSCALL32 needs us to skip forward
710246df580411 Andy Lutomirski 2015-10-05 161 * so that 'regs->ip -= 2' lands back on an int $0x80 instruction.
710246df580411 Andy Lutomirski 2015-10-05 162 * Fix it up.
710246df580411 Andy Lutomirski 2015-10-05 163 */
710246df580411 Andy Lutomirski 2015-10-05 164 regs->ip = landing_pad;
710246df580411 Andy Lutomirski 2015-10-05 165
0b085e68f40720 Thomas Gleixner 2020-07-23 166 /* Invoke the syscall. If it failed, keep it simple: use IRET. */
0b085e68f40720 Thomas Gleixner 2020-07-23 167 if (!__do_fast_syscall_32(regs))
8f159f1dfa1ea2 Thomas Gleixner 2020-03-10 168 return 0;
7841b408717d4c Andy Lutomirski 2015-10-05 169

:::::: The code at line 157 was first introduced by commit
:::::: 710246df58041106b7de645f4b45770f8a59a269 x86/entry: Add C code for fast system call entries

:::::: TO: Andy Lutomirski <luto@xxxxxxxxxx>
:::::: CC: Ingo Molnar <mingo@xxxxxxxxxx>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip