mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
	linux-kernel@vger.kernel.org, x86@kernel.org,
	Alexandre Chartre <alexandre.chartre@oracle.com>
Subject: [tip:x86/entry 23/80] arch/x86/entry/common.c:234:24: warning: no previous prototype for function 'prepare_exit_to_usermode'
Date: Wed, 20 May 2020 11:55:14 +0800	[thread overview]
Message-ID: <202005201111.4H5MrOvS%lkp@intel.com> (raw)

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/entry
head:   095b7a3e7745e6fb7cf0a1c09967c4f43e76f8f4
commit: aa9712e07f82a5458f2f16c100c491d736240d60 [23/80] x86/entry/common: Protect against instrumentation
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project e6658079aca6d971b4e9d7137a3a2ecbc9c34aec)
reproduce:
        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 aa9712e07f82a5458f2f16c100c491d736240d60
        # 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: kbuild test robot <lkp@intel.com>

All warnings (new ones prefixed by >>, old ones prefixed by <<):

>> arch/x86/entry/common.c:234:24: warning: no previous prototype for function 'prepare_exit_to_usermode' [-Wmissing-prototypes]
__visible noinstr void prepare_exit_to_usermode(struct pt_regs *regs)
^
arch/x86/entry/common.c:234:19: note: declare 'static' if the function is not intended to be used outside of this translation unit
__visible noinstr void prepare_exit_to_usermode(struct pt_regs *regs)
^
static
>> arch/x86/entry/common.c:296:24: warning: no previous prototype for function 'syscall_return_slowpath' [-Wmissing-prototypes]
__visible noinstr void syscall_return_slowpath(struct pt_regs *regs)
^
arch/x86/entry/common.c:296:19: note: declare 'static' if the function is not intended to be used outside of this translation unit
__visible noinstr void syscall_return_slowpath(struct pt_regs *regs)
^
static
2 warnings generated.

vim +/prepare_exit_to_usermode +234 arch/x86/entry/common.c

   233	
 > 234	__visible noinstr void prepare_exit_to_usermode(struct pt_regs *regs)
   235	{
   236		instrumentation_begin();
   237		__prepare_exit_to_usermode(regs);
   238		instrumentation_end();
   239		exit_to_user_mode();
   240	}
   241	
   242	#define SYSCALL_EXIT_WORK_FLAGS				\
   243		(_TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT |	\
   244		 _TIF_SINGLESTEP | _TIF_SYSCALL_TRACEPOINT)
   245	
   246	static void syscall_slow_exit_work(struct pt_regs *regs, u32 cached_flags)
   247	{
   248		bool step;
   249	
   250		audit_syscall_exit(regs);
   251	
   252		if (cached_flags & _TIF_SYSCALL_TRACEPOINT)
   253			trace_sys_exit(regs, regs->ax);
   254	
   255		/*
   256		 * If TIF_SYSCALL_EMU is set, we only get here because of
   257		 * TIF_SINGLESTEP (i.e. this is PTRACE_SYSEMU_SINGLESTEP).
   258		 * We already reported this syscall instruction in
   259		 * syscall_trace_enter().
   260		 */
   261		step = unlikely(
   262			(cached_flags & (_TIF_SINGLESTEP | _TIF_SYSCALL_EMU))
   263			== _TIF_SINGLESTEP);
   264		if (step || cached_flags & _TIF_SYSCALL_TRACE)
   265			tracehook_report_syscall_exit(regs, step);
   266	}
   267	
   268	static void __syscall_return_slowpath(struct pt_regs *regs)
   269	{
   270		struct thread_info *ti = current_thread_info();
   271		u32 cached_flags = READ_ONCE(ti->flags);
   272	
   273		CT_WARN_ON(ct_state() != CONTEXT_KERNEL);
   274	
   275		if (IS_ENABLED(CONFIG_PROVE_LOCKING) &&
   276		    WARN(irqs_disabled(), "syscall %ld left IRQs disabled", regs->orig_ax))
   277			local_irq_enable();
   278	
   279		rseq_syscall(regs);
   280	
   281		/*
   282		 * First do one-time work.  If these work items are enabled, we
   283		 * want to run them exactly once per syscall exit with IRQs on.
   284		 */
   285		if (unlikely(cached_flags & SYSCALL_EXIT_WORK_FLAGS))
   286			syscall_slow_exit_work(regs, cached_flags);
   287	
   288		local_irq_disable();
   289		__prepare_exit_to_usermode(regs);
   290	}
   291	
   292	/*
   293	 * Called with IRQs on and fully valid regs.  Returns with IRQs off in a
   294	 * state such that we can immediately switch to user mode.
   295	 */
 > 296	__visible noinstr void syscall_return_slowpath(struct pt_regs *regs)
   297	{
   298		instrumentation_begin();
   299		__syscall_return_slowpath(regs);
   300		instrumentation_end();
   301		exit_to_user_mode();
   302	}
   303	

---
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: 73557 bytes --]

                 reply	other threads:[~2020-05-20  3:58 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=202005201111.4H5MrOvS%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=alexandre.chartre@oracle.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.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

all inboxes | Powered by JetHome®