From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [ia64:mce_copyin 8/8] arch/x86/kernel/cpu/mce/severity.c:204:14: error: use of undeclared identifier 'MAX_INSN_SIZE'
Date: Tue, 08 Sep 2020 13:03:16 +0800 [thread overview]
Message-ID: <202009081312.8o7y7GYc%lkp@intel.com> (raw)
[-- 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 --]
reply other threads:[~2020-09-08 5:03 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=202009081312.8o7y7GYc%lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
/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.