lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Wed, 20 May 2020 11:55:14 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Thomas Gleixner <tglx@...utronix.de>
Cc:     kbuild-all@...ts.01.org, clang-built-linux@...glegroups.com,
        linux-kernel@...r.kernel.org, x86@...nel.org,
        Alexandre Chartre <alexandre.chartre@...cle.com>
Subject: [tip:x86/entry 23/80] arch/x86/entry/common.c:234:24: warning: no
 previous prototype for function 'prepare_exit_to_usermode'

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@...el.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

Download attachment ".config.gz" of type "application/gzip" (73557 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ