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: 'MAX_INSN_SIZE' undeclared;
Date: Tue, 08 Sep 2020 01:18:46 +0000 [thread overview]
Message-ID: <202009080941.pKk7xAtY%lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 3398 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: i386-randconfig-a005-20200908 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
git checkout 722f462f54ac667ca8fbf3104ae5093d5b12aaf5
# save the attached .config to linux build tree
make W=1 ARCH=i386
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: In function 'is_copy_from_user':
>> arch/x86/kernel/cpu/mce/severity.c:204:14: error: 'MAX_INSN_SIZE' undeclared (first use in this function); did you mean 'MAX_UINSN_BYTES'?
204 | u8 insn_buf[MAX_INSN_SIZE];
| ^~~~~~~~~~~~~
| MAX_UINSN_BYTES
arch/x86/kernel/cpu/mce/severity.c:204:14: note: each undeclared identifier is reported only once for each function it appears in
>> arch/x86/kernel/cpu/mce/severity.c:205:14: error: storage size of 'insn' isn't known
205 | struct insn insn;
| ^~~~
>> arch/x86/kernel/cpu/mce/severity.c:209:2: error: implicit declaration of function 'kernel_insn_init'; did you mean 'kernfs_init'? [-Werror=implicit-function-declaration]
209 | kernel_insn_init(&insn, insn_buf, MAX_INSN_SIZE);
| ^~~~~~~~~~~~~~~~
| kernfs_init
>> arch/x86/kernel/cpu/mce/severity.c:210:2: error: implicit declaration of function 'insn_get_length' [-Werror=implicit-function-declaration]
210 | insn_get_length(&insn);
| ^~~~~~~~~~~~~~~
arch/x86/kernel/cpu/mce/severity.c:205:14: warning: unused variable 'insn' [-Wunused-variable]
205 | struct insn insn;
| ^~~~
arch/x86/kernel/cpu/mce/severity.c:204:5: warning: unused variable 'insn_buf' [-Wunused-variable]
204 | u8 insn_buf[MAX_INSN_SIZE];
| ^~~~~~~~
cc1: some warnings being treated as errors
# 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 +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@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 29946 bytes --]
reply other threads:[~2020-09-08 1:18 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=202009080941.pKk7xAtY%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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox