All of lore.kernel.org
 help / color / mirror / Atom feed
* [brauner-vfs:vfs-6.15.misc 2/3] mm/gup.c:2270: warning: Function parameter or struct member 'locked' not described in 'get_dump_page'
@ 2025-02-05 12:20 kernel test robot
  2025-02-05 12:35 ` Mateusz Guzik
  0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2025-02-05 12:20 UTC (permalink / raw)
  To: Mateusz Guzik; +Cc: oe-kbuild-all, Christian Brauner, Christian Brauner

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git vfs-6.15.misc
head:   625aec60ff1462a0620753deeec4a38ddd032e29
commit: 62801d0e24907a20b4724b58ce174bc9a2fc3b4c [2/3] fs: avoid mmap sem relocks when coredumping with many missing pages
config: i386-buildonly-randconfig-003-20250205 (https://download.01.org/0day-ci/archive/20250205/202502052058.brmQ0100-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250205/202502052058.brmQ0100-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202502052058.brmQ0100-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> mm/gup.c:2270: warning: Function parameter or struct member 'locked' not described in 'get_dump_page'


vim +2270 mm/gup.c

bb523b406c849e Andreas Gruenbacher 2021-08-02  2253  
8f942eea12ae8c Jann Horn           2020-10-15  2254  /**
8f942eea12ae8c Jann Horn           2020-10-15  2255   * get_dump_page() - pin user page in memory while writing it to core dump
8f942eea12ae8c Jann Horn           2020-10-15  2256   * @addr: user address
8f942eea12ae8c Jann Horn           2020-10-15  2257   *
8f942eea12ae8c Jann Horn           2020-10-15  2258   * Returns struct page pointer of user page pinned for dump,
8f942eea12ae8c Jann Horn           2020-10-15  2259   * to be freed afterwards by put_page().
8f942eea12ae8c Jann Horn           2020-10-15  2260   *
8f942eea12ae8c Jann Horn           2020-10-15  2261   * Returns NULL on any kind of failure - a hole must then be inserted into
8f942eea12ae8c Jann Horn           2020-10-15  2262   * the corefile, to preserve alignment with its headers; and also returns
8f942eea12ae8c Jann Horn           2020-10-15  2263   * NULL wherever the ZERO_PAGE, or an anonymous pte_none, has been found -
8f942eea12ae8c Jann Horn           2020-10-15  2264   * allowing a hole to be left in the corefile to save disk space.
8f942eea12ae8c Jann Horn           2020-10-15  2265   *
7f3bfab52cab96 Jann Horn           2020-10-15  2266   * Called without mmap_lock (takes and releases the mmap_lock by itself).
8f942eea12ae8c Jann Horn           2020-10-15  2267   */
8f942eea12ae8c Jann Horn           2020-10-15  2268  #ifdef CONFIG_ELF_CORE
62801d0e24907a Mateusz Guzik       2025-01-19  2269  struct page *get_dump_page(unsigned long addr, int *locked)
8f942eea12ae8c Jann Horn           2020-10-15 @2270  {
8f942eea12ae8c Jann Horn           2020-10-15  2271  	struct page *page;
7f3bfab52cab96 Jann Horn           2020-10-15  2272  	int ret;
8f942eea12ae8c Jann Horn           2020-10-15  2273  
62801d0e24907a Mateusz Guzik       2025-01-19  2274  	ret = __get_user_pages_locked(current->mm, addr, 1, &page, locked,
7f3bfab52cab96 Jann Horn           2020-10-15  2275  				      FOLL_FORCE | FOLL_DUMP | FOLL_GET);
7f3bfab52cab96 Jann Horn           2020-10-15  2276  	return (ret == 1) ? page : NULL;
8f942eea12ae8c Jann Horn           2020-10-15  2277  }
8f942eea12ae8c Jann Horn           2020-10-15  2278  #endif /* CONFIG_ELF_CORE */
8f942eea12ae8c Jann Horn           2020-10-15  2279  

:::::: The code at line 2270 was first introduced by commit
:::::: 8f942eea12ae8c5a7cde85c145234b25e38de959 binfmt_elf_fdpic: stop using dump_emit() on user pointers on !MMU

:::::: TO: Jann Horn <jannh@google.com>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [brauner-vfs:vfs-6.15.misc 2/3] mm/gup.c:2270: warning: Function parameter or struct member 'locked' not described in 'get_dump_page'
  2025-02-05 12:20 [brauner-vfs:vfs-6.15.misc 2/3] mm/gup.c:2270: warning: Function parameter or struct member 'locked' not described in 'get_dump_page' kernel test robot
@ 2025-02-05 12:35 ` Mateusz Guzik
  2025-02-05 13:50   ` Christian Brauner
  0 siblings, 1 reply; 3+ messages in thread
From: Mateusz Guzik @ 2025-02-05 12:35 UTC (permalink / raw)
  To: kernel test robot; +Cc: oe-kbuild-all, Christian Brauner, Christian Brauner

On Wed, Feb 5, 2025 at 1:20 PM kernel test robot <lkp@intel.com> wrote:
>
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git vfs-6.15.misc
> head:   625aec60ff1462a0620753deeec4a38ddd032e29
> commit: 62801d0e24907a20b4724b58ce174bc9a2fc3b4c [2/3] fs: avoid mmap sem relocks when coredumping with many missing pages
> config: i386-buildonly-randconfig-003-20250205 (https://download.01.org/0day-ci/archive/20250205/202502052058.brmQ0100-lkp@intel.com/config)
> compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250205/202502052058.brmQ0100-lkp@intel.com/reproduce)
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202502052058.brmQ0100-lkp@intel.com/
>
> All warnings (new ones prefixed by >>):
>
> >> mm/gup.c:2270: warning: Function parameter or struct member 'locked' not described in 'get_dump_page'
>

how about this:

diff --git a/mm/gup.c b/mm/gup.c
index 3883b307780e..66d2aec76d99 100644
--- a/mm/gup.c
+++ b/mm/gup.c
@@ -2254,6 +2254,7 @@ EXPORT_SYMBOL(fault_in_readable);
 /**
  * get_dump_page() - pin user page in memory while writing it to core dump
  * @addr: user address
+ * @locked: a pointer to an int denoting whether the mmap sem is held
  *
  * Returns struct page pointer of user page pinned for dump,
  * to be freed afterwards by put_page().

I presume I can avoid sending a full v2 :)

>
> vim +2270 mm/gup.c
>
> bb523b406c849e Andreas Gruenbacher 2021-08-02  2253
> 8f942eea12ae8c Jann Horn           2020-10-15  2254  /**
> 8f942eea12ae8c Jann Horn           2020-10-15  2255   * get_dump_page() - pin user page in memory while writing it to core dump
> 8f942eea12ae8c Jann Horn           2020-10-15  2256   * @addr: user address
> 8f942eea12ae8c Jann Horn           2020-10-15  2257   *
> 8f942eea12ae8c Jann Horn           2020-10-15  2258   * Returns struct page pointer of user page pinned for dump,
> 8f942eea12ae8c Jann Horn           2020-10-15  2259   * to be freed afterwards by put_page().
> 8f942eea12ae8c Jann Horn           2020-10-15  2260   *
> 8f942eea12ae8c Jann Horn           2020-10-15  2261   * Returns NULL on any kind of failure - a hole must then be inserted into
> 8f942eea12ae8c Jann Horn           2020-10-15  2262   * the corefile, to preserve alignment with its headers; and also returns
> 8f942eea12ae8c Jann Horn           2020-10-15  2263   * NULL wherever the ZERO_PAGE, or an anonymous pte_none, has been found -
> 8f942eea12ae8c Jann Horn           2020-10-15  2264   * allowing a hole to be left in the corefile to save disk space.
> 8f942eea12ae8c Jann Horn           2020-10-15  2265   *
> 7f3bfab52cab96 Jann Horn           2020-10-15  2266   * Called without mmap_lock (takes and releases the mmap_lock by itself).
> 8f942eea12ae8c Jann Horn           2020-10-15  2267   */
> 8f942eea12ae8c Jann Horn           2020-10-15  2268  #ifdef CONFIG_ELF_CORE
> 62801d0e24907a Mateusz Guzik       2025-01-19  2269  struct page *get_dump_page(unsigned long addr, int *locked)
> 8f942eea12ae8c Jann Horn           2020-10-15 @2270  {
> 8f942eea12ae8c Jann Horn           2020-10-15  2271     struct page *page;
> 7f3bfab52cab96 Jann Horn           2020-10-15  2272     int ret;
> 8f942eea12ae8c Jann Horn           2020-10-15  2273
> 62801d0e24907a Mateusz Guzik       2025-01-19  2274     ret = __get_user_pages_locked(current->mm, addr, 1, &page, locked,
> 7f3bfab52cab96 Jann Horn           2020-10-15  2275                                   FOLL_FORCE | FOLL_DUMP | FOLL_GET);
> 7f3bfab52cab96 Jann Horn           2020-10-15  2276     return (ret == 1) ? page : NULL;
> 8f942eea12ae8c Jann Horn           2020-10-15  2277  }
> 8f942eea12ae8c Jann Horn           2020-10-15  2278  #endif /* CONFIG_ELF_CORE */
> 8f942eea12ae8c Jann Horn           2020-10-15  2279
>
> :::::: The code at line 2270 was first introduced by commit
> :::::: 8f942eea12ae8c5a7cde85c145234b25e38de959 binfmt_elf_fdpic: stop using dump_emit() on user pointers on !MMU
>
> :::::: TO: Jann Horn <jannh@google.com>
> :::::: CC: Linus Torvalds <torvalds@linux-foundation.org>
>
> --
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests/wiki



-- 
Mateusz Guzik <mjguzik gmail.com>

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [brauner-vfs:vfs-6.15.misc 2/3] mm/gup.c:2270: warning: Function parameter or struct member 'locked' not described in 'get_dump_page'
  2025-02-05 12:35 ` Mateusz Guzik
@ 2025-02-05 13:50   ` Christian Brauner
  0 siblings, 0 replies; 3+ messages in thread
From: Christian Brauner @ 2025-02-05 13:50 UTC (permalink / raw)
  To: Mateusz Guzik; +Cc: kernel test robot, oe-kbuild-all, Christian Brauner

On Wed, Feb 05, 2025 at 01:35:26PM +0100, Mateusz Guzik wrote:
> On Wed, Feb 5, 2025 at 1:20 PM kernel test robot <lkp@intel.com> wrote:
> >
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git vfs-6.15.misc
> > head:   625aec60ff1462a0620753deeec4a38ddd032e29
> > commit: 62801d0e24907a20b4724b58ce174bc9a2fc3b4c [2/3] fs: avoid mmap sem relocks when coredumping with many missing pages
> > config: i386-buildonly-randconfig-003-20250205 (https://download.01.org/0day-ci/archive/20250205/202502052058.brmQ0100-lkp@intel.com/config)
> > compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
> > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250205/202502052058.brmQ0100-lkp@intel.com/reproduce)
> >
> > If you fix the issue in a separate patch/commit (i.e. not just a new version of
> > the same patch/commit), kindly add following tags
> > | Reported-by: kernel test robot <lkp@intel.com>
> > | Closes: https://lore.kernel.org/oe-kbuild-all/202502052058.brmQ0100-lkp@intel.com/
> >
> > All warnings (new ones prefixed by >>):
> >
> > >> mm/gup.c:2270: warning: Function parameter or struct member 'locked' not described in 'get_dump_page'
> >
> 
> how about this:
> 
> diff --git a/mm/gup.c b/mm/gup.c
> index 3883b307780e..66d2aec76d99 100644
> --- a/mm/gup.c
> +++ b/mm/gup.c
> @@ -2254,6 +2254,7 @@ EXPORT_SYMBOL(fault_in_readable);
>  /**
>   * get_dump_page() - pin user page in memory while writing it to core dump
>   * @addr: user address
> + * @locked: a pointer to an int denoting whether the mmap sem is held
>   *
>   * Returns struct page pointer of user page pinned for dump,
>   * to be freed afterwards by put_page().
> 
> I presume I can avoid sending a full v2 :)

Yes, I already folded your fix. :)

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-02-05 13:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-05 12:20 [brauner-vfs:vfs-6.15.misc 2/3] mm/gup.c:2270: warning: Function parameter or struct member 'locked' not described in 'get_dump_page' kernel test robot
2025-02-05 12:35 ` Mateusz Guzik
2025-02-05 13:50   ` Christian Brauner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.