* [ia64:mce_copyin 8/8] arch/x86/kernel/cpu/mce/severity.c:204:14: error: use of undeclared identifier 'MAX_INSN_SIZE'
@ 2020-09-08 5:03 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2020-09-08 5:03 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 3740 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux.git mce_copyin
head: 722f462f54ac667ca8fbf3104ae5093d5b12aaf5
commit: 722f462f54ac667ca8fbf3104ae5093d5b12aaf5 [8/8] x86/mce: Decode a kernel instruction to determine if it is copying from user
config: x86_64-randconfig-a013-20200907 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 5f5a0bb0872a9673bad08b38bc0b14c42263902a)
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
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
git checkout 722f462f54ac667ca8fbf3104ae5093d5b12aaf5
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> arch/x86/kernel/cpu/mce/severity.c:204:14: error: use of undeclared identifier 'MAX_INSN_SIZE'
u8 insn_buf[MAX_INSN_SIZE];
^
>> arch/x86/kernel/cpu/mce/severity.c:205:14: error: variable has incomplete type 'struct insn'
struct insn insn;
^
arch/x86/kernel/cpu/mce/severity.c:205:9: note: forward declaration of 'struct insn'
struct insn insn;
^
arch/x86/kernel/cpu/mce/severity.c:207:59: error: use of undeclared identifier 'MAX_INSN_SIZE'
if (copy_from_kernel_nofault(insn_buf, (void *)regs->ip, MAX_INSN_SIZE))
^
>> arch/x86/kernel/cpu/mce/severity.c:209:2: error: implicit declaration of function 'kernel_insn_init' [-Werror,-Wimplicit-function-declaration]
kernel_insn_init(&insn, insn_buf, MAX_INSN_SIZE);
^
arch/x86/kernel/cpu/mce/severity.c:209:36: error: use of undeclared identifier 'MAX_INSN_SIZE'
kernel_insn_init(&insn, insn_buf, MAX_INSN_SIZE);
^
>> arch/x86/kernel/cpu/mce/severity.c:210:2: error: implicit declaration of function 'insn_get_length' [-Werror,-Wimplicit-function-declaration]
insn_get_length(&insn);
^
6 errors generated.
# https://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux.git/commit/?id=722f462f54ac667ca8fbf3104ae5093d5b12aaf5
git remote add ia64 https://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux.git
git fetch --no-tags ia64 mce_copyin
git checkout 722f462f54ac667ca8fbf3104ae5093d5b12aaf5
vim +/MAX_INSN_SIZE +204 arch/x86/kernel/cpu/mce/severity.c
198
199 #define mc_recoverable(mcg) (((mcg) & (MCG_STATUS_RIPV|MCG_STATUS_EIPV)) == \
200 (MCG_STATUS_RIPV|MCG_STATUS_EIPV))
201
202 static bool is_copy_from_user(struct pt_regs *regs)
203 {
> 204 u8 insn_buf[MAX_INSN_SIZE];
> 205 struct insn insn;
206
207 if (copy_from_kernel_nofault(insn_buf, (void *)regs->ip, MAX_INSN_SIZE))
208 return false;
> 209 kernel_insn_init(&insn, insn_buf, MAX_INSN_SIZE);
> 210 insn_get_length(&insn);
211
212 switch (insn.opcode.value) {
213 case 0x8A: case 0x8B: /* MOV */
214 case 0xB60F: case 0xB70F: /* MOVZ */
215 return true;
216 case 0xA4: case 0xA5: /* MOVS */
217 return !fault_in_kernel_space(regs->si);
218 }
219
220 return false;
221 }
222
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 28170 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-09-08 5:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-08 5:03 [ia64:mce_copyin 8/8] arch/x86/kernel/cpu/mce/severity.c:204:14: error: use of undeclared identifier 'MAX_INSN_SIZE' kernel test robot
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.