linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [peterz-queue:x86/core 1/3] arch/x86/kernel/traps.c:531:6: warning: no previous prototype for function 'fixup_iopl_exception'
@ 2021-09-17 18:35 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-09-17 18:35 UTC (permalink / raw)
  Cc: llvm, kbuild-all, linux-kernel, Thomas Gleixner

[-- Attachment #1: Type: text/plain, Size: 2877 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git x86/core
head:   e1250da5c3b4148363ccfd7cf40da08df3a0ef86
commit: 61e9638f4e4429e57b6ae2c886261695d5cdac51 [1/3] x86/iopl: Fake iopl(3) CLI/STI usage
config: i386-randconfig-r035-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=61e9638f4e4429e57b6ae2c886261695d5cdac51
        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 61e9638f4e4429e57b6ae2c886261695d5cdac51
        # 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 warnings (new ones prefixed by >>):

>> arch/x86/kernel/traps.c:531:6: warning: no previous prototype for function 'fixup_iopl_exception' [-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 warning 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 = &current->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: 34121 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-09-17 18:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-17 18:35 [peterz-queue:x86/core 1/3] arch/x86/kernel/traps.c:531:6: warning: no previous prototype for function 'fixup_iopl_exception' kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).