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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 30 Oct 2017 04:37:02 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Matthew Wilcox <willy@...radead.org>
Cc:     kbuild-all@...org, Jonathan Corbet <corbet@....net>,
        linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
        Masahiro Yamada <yamada.masahiro@...ionext.com>,
        Michal Marek <mmarek@...e.com>, linux-kbuild@...r.kernel.org,
        Matthew Wilcox <mawilcox@...rosoft.com>
Subject: Re: [PATCH] Check all .c files for bad kernel-doc comments

Hi Matthew,

I love your patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v4.14-rc6 next-20171018]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Matthew-Wilcox/Check-all-c-files-for-bad-kernel-doc-comments/20171030-033926
config: i386-tinyconfig (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All warnings (new ones prefixed by >>):

>> kernel/fork.c:983: warning: No description found for parameter 'mm'
>> kernel/fork.c:983: warning: No description found for parameter 'new_exe_file'
   kernel/fork.c:1007: warning: No description found for parameter 'mm'
>> kernel/fork.c:1027: warning: No description found for parameter 'task'
   kernel/fork.c:1052: warning: No description found for parameter 'task'
--
>> kernel/cpu.c:53: warning: cannot understand function prototype: 'struct cpuhp_cpu_state '
>> kernel/cpu.c:108: warning: cannot understand function prototype: 'struct cpuhp_step '
>> kernel/cpu.c:1608: warning: No description found for parameter 'name'
--
>> kernel/notifier.c:77: warning: Excess function parameter 'returns' description in 'notifier_call_chain'
--
>> kernel/reboot.c:184: warning: No description found for parameter 'cmd'
--
>> mm/oom_kill.c:175: warning: No description found for parameter 'memcg'
>> mm/oom_kill.c:175: warning: No description found for parameter 'nodemask'
--
>> mm/maccess.c:87: warning: No description found for parameter 'unsafe_addr'
>> mm/maccess.c:87: warning: Excess function parameter 'src' description in 'strncpy_from_unsafe'
--
>> mm/swap.c:932: warning: No description found for parameter 'nr_pages'
>> mm/swap.c:932: warning: Excess function parameter 'nr_entries' description in 'pagevec_lookup_entries'
>> mm/swap.c:982: warning: Excess function parameter 'nr_pages' description in 'pagevec_lookup_range'
--
>> mm/compaction.c:568: warning: No description found for parameter 'cc'
>> mm/compaction.c:1724: warning: No description found for parameter 'prio'
>> mm/compaction.c:1724: warning: Excess function parameter 'mode' description in 'try_to_compact_pages'
--
>> mm/mlock.c:176: warning: No description found for parameter 'page'
--
>> mm/pagewalk.c:286: warning: No description found for parameter 'start'
>> mm/pagewalk.c:286: warning: No description found for parameter 'end'
>> mm/pagewalk.c:286: warning: No description found for parameter 'walk'
--
>> mm/rmap.c:1175: warning: No description found for parameter 'compound'
..

vim +/mm +983 kernel/fork.c

a1b2289c Sherry Yang           2017-10-03   970  
90f31d0e Konstantin Khlebnikov 2015-04-16   971  /**
90f31d0e Konstantin Khlebnikov 2015-04-16   972   * set_mm_exe_file - change a reference to the mm's executable file
90f31d0e Konstantin Khlebnikov 2015-04-16   973   *
90f31d0e Konstantin Khlebnikov 2015-04-16   974   * This changes mm's executable file (shown as symlink /proc/[pid]/exe).
90f31d0e Konstantin Khlebnikov 2015-04-16   975   *
6e399cd1 Davidlohr Bueso       2015-04-16   976   * Main users are mmput() and sys_execve(). Callers prevent concurrent
6e399cd1 Davidlohr Bueso       2015-04-16   977   * invocations: in mmput() nobody alive left, in execve task is single
6e399cd1 Davidlohr Bueso       2015-04-16   978   * threaded. sys_prctl(PR_SET_MM_MAP/EXE_FILE) also needs to set the
6e399cd1 Davidlohr Bueso       2015-04-16   979   * mm->exe_file, but does so without using set_mm_exe_file() in order
6e399cd1 Davidlohr Bueso       2015-04-16   980   * to do avoid the need for any locks.
90f31d0e Konstantin Khlebnikov 2015-04-16   981   */
38646013 Jiri Slaby            2011-05-26   982  void set_mm_exe_file(struct mm_struct *mm, struct file *new_exe_file)
38646013 Jiri Slaby            2011-05-26  @983  {
6e399cd1 Davidlohr Bueso       2015-04-16   984  	struct file *old_exe_file;
6e399cd1 Davidlohr Bueso       2015-04-16   985  
6e399cd1 Davidlohr Bueso       2015-04-16   986  	/*
6e399cd1 Davidlohr Bueso       2015-04-16   987  	 * It is safe to dereference the exe_file without RCU as
6e399cd1 Davidlohr Bueso       2015-04-16   988  	 * this function is only called if nobody else can access
6e399cd1 Davidlohr Bueso       2015-04-16   989  	 * this mm -- see comment above for justification.
6e399cd1 Davidlohr Bueso       2015-04-16   990  	 */
6e399cd1 Davidlohr Bueso       2015-04-16   991  	old_exe_file = rcu_dereference_raw(mm->exe_file);
90f31d0e Konstantin Khlebnikov 2015-04-16   992  
38646013 Jiri Slaby            2011-05-26   993  	if (new_exe_file)
38646013 Jiri Slaby            2011-05-26   994  		get_file(new_exe_file);
90f31d0e Konstantin Khlebnikov 2015-04-16   995  	rcu_assign_pointer(mm->exe_file, new_exe_file);
90f31d0e Konstantin Khlebnikov 2015-04-16   996  	if (old_exe_file)
90f31d0e Konstantin Khlebnikov 2015-04-16   997  		fput(old_exe_file);
38646013 Jiri Slaby            2011-05-26   998  }
38646013 Jiri Slaby            2011-05-26   999  
90f31d0e Konstantin Khlebnikov 2015-04-16  1000  /**
90f31d0e Konstantin Khlebnikov 2015-04-16  1001   * get_mm_exe_file - acquire a reference to the mm's executable file
90f31d0e Konstantin Khlebnikov 2015-04-16  1002   *
90f31d0e Konstantin Khlebnikov 2015-04-16  1003   * Returns %NULL if mm has no associated executable file.
90f31d0e Konstantin Khlebnikov 2015-04-16  1004   * User must release file via fput().
90f31d0e Konstantin Khlebnikov 2015-04-16  1005   */
38646013 Jiri Slaby            2011-05-26  1006  struct file *get_mm_exe_file(struct mm_struct *mm)
38646013 Jiri Slaby            2011-05-26  1007  {
38646013 Jiri Slaby            2011-05-26  1008  	struct file *exe_file;
38646013 Jiri Slaby            2011-05-26  1009  
90f31d0e Konstantin Khlebnikov 2015-04-16  1010  	rcu_read_lock();
90f31d0e Konstantin Khlebnikov 2015-04-16  1011  	exe_file = rcu_dereference(mm->exe_file);
90f31d0e Konstantin Khlebnikov 2015-04-16  1012  	if (exe_file && !get_file_rcu(exe_file))
90f31d0e Konstantin Khlebnikov 2015-04-16  1013  		exe_file = NULL;
90f31d0e Konstantin Khlebnikov 2015-04-16  1014  	rcu_read_unlock();
38646013 Jiri Slaby            2011-05-26  1015  	return exe_file;
38646013 Jiri Slaby            2011-05-26  1016  }
11163348 Davidlohr Bueso       2015-04-16  1017  EXPORT_SYMBOL(get_mm_exe_file);
38646013 Jiri Slaby            2011-05-26  1018  
^1da177e Linus Torvalds        2005-04-16  1019  /**
cd81a917 Mateusz Guzik         2016-08-23  1020   * get_task_exe_file - acquire a reference to the task's executable file
cd81a917 Mateusz Guzik         2016-08-23  1021   *
cd81a917 Mateusz Guzik         2016-08-23  1022   * Returns %NULL if task's mm (if any) has no associated executable file or
cd81a917 Mateusz Guzik         2016-08-23  1023   * this is a kernel thread with borrowed mm (see the comment above get_task_mm).
cd81a917 Mateusz Guzik         2016-08-23  1024   * User must release file via fput().
cd81a917 Mateusz Guzik         2016-08-23  1025   */
cd81a917 Mateusz Guzik         2016-08-23  1026  struct file *get_task_exe_file(struct task_struct *task)
cd81a917 Mateusz Guzik         2016-08-23 @1027  {
cd81a917 Mateusz Guzik         2016-08-23  1028  	struct file *exe_file = NULL;
cd81a917 Mateusz Guzik         2016-08-23  1029  	struct mm_struct *mm;
cd81a917 Mateusz Guzik         2016-08-23  1030  
cd81a917 Mateusz Guzik         2016-08-23  1031  	task_lock(task);
cd81a917 Mateusz Guzik         2016-08-23  1032  	mm = task->mm;
cd81a917 Mateusz Guzik         2016-08-23  1033  	if (mm) {
cd81a917 Mateusz Guzik         2016-08-23  1034  		if (!(task->flags & PF_KTHREAD))
cd81a917 Mateusz Guzik         2016-08-23  1035  			exe_file = get_mm_exe_file(mm);
cd81a917 Mateusz Guzik         2016-08-23  1036  	}
cd81a917 Mateusz Guzik         2016-08-23  1037  	task_unlock(task);
cd81a917 Mateusz Guzik         2016-08-23  1038  	return exe_file;
cd81a917 Mateusz Guzik         2016-08-23  1039  }
cd81a917 Mateusz Guzik         2016-08-23  1040  EXPORT_SYMBOL(get_task_exe_file);
38646013 Jiri Slaby            2011-05-26  1041  

:::::: The code at line 983 was first introduced by commit
:::::: 3864601387cf4196371e3c1897fdffa5228296f9 mm: extract exe_file handling from procfs

:::::: TO: Jiri Slaby <jslaby@...e.cz>
:::::: CC: Linus Torvalds <torvalds@...ux-foundation.org>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ