Messages in this thread | | | Date | Thu, 17 Mar 2022 10:43:46 +0800 | From | kernel test robot <> | Subject | [mingo-tip:master 1818/2335] arch/x86/entry/vsyscall/vsyscall_64.c:323:24: warning: no previous prototype for function 'get_gate_vma' |
| |
tree: git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git master head: 85293bf3fca6d85608cff1447ce3097583f15fab commit: 096bc34f1420485efd9a03c318ab7c44487eb8b4 [1818/2335] headers/deps: mm: Optimize <linux/mm_api.h>, remove the <linux/mm_api_gate_area.h> header config: x86_64-randconfig-a011-20220314 (https://download.01.org/0day-ci/archive/20220317/202203171029.K0aYoh84-lkp@intel.com/config) compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project a6ec1e3d798f8eab43fb3a91028c6ab04e115fcb) 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/mingo/tip.git/commit/?id=096bc34f1420485efd9a03c318ab7c44487eb8b4 git remote add mingo-tip git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git git fetch --no-tags mingo-tip master git checkout 096bc34f1420485efd9a03c318ab7c44487eb8b4 # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash arch/x86/entry/vsyscall/ kernel/trace/
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/entry/vsyscall/vsyscall_64.c:323:24: warning: no previous prototype for function 'get_gate_vma' [-Wmissing-prototypes] struct vm_area_struct *get_gate_vma(struct mm_struct *mm) ^ arch/x86/entry/vsyscall/vsyscall_64.c:323:1: note: declare 'static' if the function is not intended to be used outside of this translation unit struct vm_area_struct *get_gate_vma(struct mm_struct *mm) ^ static >> arch/x86/entry/vsyscall/vsyscall_64.c:334:5: warning: no previous prototype for function 'in_gate_area' [-Wmissing-prototypes] int in_gate_area(struct mm_struct *mm, unsigned long addr) ^ arch/x86/entry/vsyscall/vsyscall_64.c:334:1: note: declare 'static' if the function is not intended to be used outside of this translation unit int in_gate_area(struct mm_struct *mm, unsigned long addr) ^ static >> arch/x86/entry/vsyscall/vsyscall_64.c:349:5: warning: no previous prototype for function 'in_gate_area_no_mm' [-Wmissing-prototypes] int in_gate_area_no_mm(unsigned long addr) ^ arch/x86/entry/vsyscall/vsyscall_64.c:349:1: note: declare 'static' if the function is not intended to be used outside of this translation unit int in_gate_area_no_mm(unsigned long addr) ^ static 3 warnings generated.
vim +/get_gate_vma +323 arch/x86/entry/vsyscall/vsyscall_64.c
b93590901a01a6d arch/x86/kernel/vsyscall_64.c Andy Lutomirski 2014-09-23 322 b93590901a01a6d arch/x86/kernel/vsyscall_64.c Andy Lutomirski 2014-09-23 @323 struct vm_area_struct *get_gate_vma(struct mm_struct *mm) b93590901a01a6d arch/x86/kernel/vsyscall_64.c Andy Lutomirski 2014-09-23 324 { c338867d0e42247 arch/x86/entry/vsyscall/vsyscall_64.c Brian Gerst 2015-06-22 325 #ifdef CONFIG_COMPAT ff170cd0595398a arch/x86/entry/vsyscall/vsyscall_64.c Gabriel Krisman Bertazi 2020-10-03 326 if (!mm || !(mm->context.flags & MM_CONTEXT_HAS_VSYSCALL)) b93590901a01a6d arch/x86/kernel/vsyscall_64.c Andy Lutomirski 2014-09-23 327 return NULL; b93590901a01a6d arch/x86/kernel/vsyscall_64.c Andy Lutomirski 2014-09-23 328 #endif 87983c66bc02c9c arch/x86/kernel/vsyscall_64.c Andy Lutomirski 2014-10-29 329 if (vsyscall_mode == NONE) 87983c66bc02c9c arch/x86/kernel/vsyscall_64.c Andy Lutomirski 2014-10-29 330 return NULL; b93590901a01a6d arch/x86/kernel/vsyscall_64.c Andy Lutomirski 2014-09-23 331 return &gate_vma; b93590901a01a6d arch/x86/kernel/vsyscall_64.c Andy Lutomirski 2014-09-23 332 } b93590901a01a6d arch/x86/kernel/vsyscall_64.c Andy Lutomirski 2014-09-23 333 b93590901a01a6d arch/x86/kernel/vsyscall_64.c Andy Lutomirski 2014-09-23 @334 int in_gate_area(struct mm_struct *mm, unsigned long addr) b93590901a01a6d arch/x86/kernel/vsyscall_64.c Andy Lutomirski 2014-09-23 335 { b93590901a01a6d arch/x86/kernel/vsyscall_64.c Andy Lutomirski 2014-09-23 336 struct vm_area_struct *vma = get_gate_vma(mm); b93590901a01a6d arch/x86/kernel/vsyscall_64.c Andy Lutomirski 2014-09-23 337 b93590901a01a6d arch/x86/kernel/vsyscall_64.c Andy Lutomirski 2014-09-23 338 if (!vma) b93590901a01a6d arch/x86/kernel/vsyscall_64.c Andy Lutomirski 2014-09-23 339 return 0; b93590901a01a6d arch/x86/kernel/vsyscall_64.c Andy Lutomirski 2014-09-23 340 b93590901a01a6d arch/x86/kernel/vsyscall_64.c Andy Lutomirski 2014-09-23 341 return (addr >= vma->vm_start) && (addr < vma->vm_end); b93590901a01a6d arch/x86/kernel/vsyscall_64.c Andy Lutomirski 2014-09-23 342 } b93590901a01a6d arch/x86/kernel/vsyscall_64.c Andy Lutomirski 2014-09-23 343 b93590901a01a6d arch/x86/kernel/vsyscall_64.c Andy Lutomirski 2014-09-23 344 /* b93590901a01a6d arch/x86/kernel/vsyscall_64.c Andy Lutomirski 2014-09-23 345 * Use this when you have no reliable mm, typically from interrupt b93590901a01a6d arch/x86/kernel/vsyscall_64.c Andy Lutomirski 2014-09-23 346 * context. It is less reliable than using a task's mm and may give b93590901a01a6d arch/x86/kernel/vsyscall_64.c Andy Lutomirski 2014-09-23 347 * false positives. b93590901a01a6d arch/x86/kernel/vsyscall_64.c Andy Lutomirski 2014-09-23 348 */ b93590901a01a6d arch/x86/kernel/vsyscall_64.c Andy Lutomirski 2014-09-23 @349 int in_gate_area_no_mm(unsigned long addr) b93590901a01a6d arch/x86/kernel/vsyscall_64.c Andy Lutomirski 2014-09-23 350 { 87983c66bc02c9c arch/x86/kernel/vsyscall_64.c Andy Lutomirski 2014-10-29 351 return vsyscall_mode != NONE && (addr & PAGE_MASK) == VSYSCALL_ADDR; b93590901a01a6d arch/x86/kernel/vsyscall_64.c Andy Lutomirski 2014-09-23 352 } b93590901a01a6d arch/x86/kernel/vsyscall_64.c Andy Lutomirski 2014-09-23 353
:::::: The code at line 323 was first introduced by commit :::::: b93590901a01a6d036b3b7c856bcc5724fdb9911 x86_64/vsyscall: Move all of the gate_area code to vsyscall_64.c
:::::: TO: Andy Lutomirski <luto@amacapital.net> :::::: CC: Ingo Molnar <mingo@kernel.org>
--- 0-DAY CI Kernel Test Service https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
| |