From: kernel test robot <lkp@intel.com>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
linux-kernel@vger.kernel.org,
Thomas Gleixner <tglx@linutronix.de>
Subject: [peterz-queue:x86/core 1/3] arch/x86/kernel/traps.c:531:6: error: no previous prototype for function 'fixup_iopl_exception'
Date: Sat, 18 Sep 2021 08:26:08 +0800 [thread overview]
Message-ID: <202109180802.lo7KOsai-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2889 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git x86/core
head: 582583c11ab550a10c4f7b7a5eca6888d2d34e9d
commit: 3fbfc8783c3dca8f115bbd53fdac24e51b17f2b5 [1/3] x86/iopl: Fake iopl(3) CLI/STI usage
config: i386-buildonly-randconfig-r001-20210916 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project c8b3d7d6d6de37af68b2f379d0e37304f78e115f)
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/peterz/queue.git/commit/?id=3fbfc8783c3dca8f115bbd53fdac24e51b17f2b5
git remote add peterz-queue https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git
git fetch --no-tags peterz-queue x86/core
git checkout 3fbfc8783c3dca8f115bbd53fdac24e51b17f2b5
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross 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/traps.c:531:6: error: no previous prototype for function 'fixup_iopl_exception' [-Werror,-Wmissing-prototypes]
bool fixup_iopl_exception(struct pt_regs *regs)
^
arch/x86/kernel/traps.c:531:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
bool fixup_iopl_exception(struct pt_regs *regs)
^
static
1 error generated.
vim +/fixup_iopl_exception +531 arch/x86/kernel/traps.c
530
> 531 bool fixup_iopl_exception(struct pt_regs *regs)
532 {
533 struct thread_struct *t = ¤t->thread;
534 unsigned char buf[MAX_INSN_SIZE];
535 struct insn insn;
536 int nr_copied;
537
538 if (!IS_ENABLED(CONFIG_X86_IOPL_IOPERM) || t->iopl_emul != 3 || !regs)
539 return false;
540
541 nr_copied = insn_fetch_from_user(regs, buf);
542 if (nr_copied <= 0)
543 return false;
544
545 if (!insn_decode_from_regs(&insn, regs, buf, nr_copied))
546 return false;
547
548 if (insn.length != 1)
549 return false;
550
551 if (insn.opcode.bytes[0] != 0xfa &&
552 insn.opcode.bytes[0] != 0xfb)
553 return false;
554
555 if (!t->iopl_warn && printk_ratelimit()) {
556 pr_err("%s[%d] attempts to use CLI/STI, pretending it's a NOP, ip:%lx",
557 current->comm, task_pid_nr(current), regs->ip);
558 print_vma_addr(KERN_CONT " in ", regs->ip);
559 pr_cont("\n");
560 t->iopl_warn = 1;
561 }
562
563 regs->ip += 1;
564 return true;
565 }
566
---
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: 39013 bytes --]
reply other threads:[~2021-09-18 0:26 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=202109180802.lo7KOsai-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=tglx@linutronix.de \
/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