mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Theodore Dubois <tblodt@icloud.com>, linux-kernel@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev,
	Theodore Dubois <tblodt@icloud.com>,
	Ryan Houdek <sonicadvance1@gmail.com>,
	"Guilherme G. Piccoli" <gpiccoli@igalia.com>,
	David Hildenbrand <david@redhat.com>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	Kees Cook <keescook@chromium.org>
Subject: Re: [PATCH] prctl: allow prctl_set_mm_exe_file without unmapping old exe
Date: Fri, 30 Aug 2024 10:55:48 +0800	[thread overview]
Message-ID: <202408301005.IiGdSjk2-lkp@intel.com> (raw)
In-Reply-To: <20240827215930.24703-1-tblodt@icloud.com>

Hi Theodore,

kernel test robot noticed the following build errors:

[auto build test ERROR on kees/for-next/pstore]
[also build test ERROR on kees/for-next/kspp linus/master v6.11-rc5 next-20240829]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Theodore-Dubois/prctl-allow-prctl_set_mm_exe_file-without-unmapping-old-exe/20240828-060019
base:   https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git for-next/pstore
patch link:    https://lore.kernel.org/r/20240827215930.24703-1-tblodt%40icloud.com
patch subject: [PATCH] prctl: allow prctl_set_mm_exe_file without unmapping old exe
config: x86_64-defconfig (https://download.01.org/0day-ci/archive/20240830/202408301005.IiGdSjk2-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-12) 11.3.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240830/202408301005.IiGdSjk2-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/202408301005.IiGdSjk2-lkp@intel.com/

All error/warnings (new ones prefixed by >>):

   kernel/fork.c: In function 'replace_mm_exe_file':
>> kernel/fork.c:1439:9: error: 'old_exe_file' undeclared (first use in this function); did you mean 'new_exe_file'?
    1439 |         old_exe_file = rcu_dereference_raw(mm->exe_file);
         |         ^~~~~~~~~~~~
         |         new_exe_file
   kernel/fork.c:1439:9: note: each undeclared identifier is reported only once for each function it appears in
>> kernel/fork.c:1433:13: warning: unused variable 'ret' [-Wunused-variable]
    1433 |         int ret = 0;
         |             ^~~


vim +1439 kernel/fork.c

3864601387cf41 Jiri Slaby              2011-05-26  1421  
35d7bdc86031a2 David Hildenbrand       2021-04-23  1422  /**
35d7bdc86031a2 David Hildenbrand       2021-04-23  1423   * replace_mm_exe_file - replace a reference to the mm's executable file
ff0712ea71f173 Matthew Wilcox (Oracle  2023-08-24  1424)  * @mm: The mm to change.
ff0712ea71f173 Matthew Wilcox (Oracle  2023-08-24  1425)  * @new_exe_file: The new file to use.
35d7bdc86031a2 David Hildenbrand       2021-04-23  1426   *
a7031f14525751 Mateusz Guzik           2023-08-14  1427   * This changes mm's executable file (shown as symlink /proc/[pid]/exe).
35d7bdc86031a2 David Hildenbrand       2021-04-23  1428   *
35d7bdc86031a2 David Hildenbrand       2021-04-23  1429   * Main user is sys_prctl(PR_SET_MM_MAP/EXE_FILE).
35d7bdc86031a2 David Hildenbrand       2021-04-23  1430   */
35d7bdc86031a2 David Hildenbrand       2021-04-23  1431  int replace_mm_exe_file(struct mm_struct *mm, struct file *new_exe_file)
35d7bdc86031a2 David Hildenbrand       2021-04-23  1432  {
35d7bdc86031a2 David Hildenbrand       2021-04-23 @1433  	int ret = 0;
35d7bdc86031a2 David Hildenbrand       2021-04-23  1434  
35d7bdc86031a2 David Hildenbrand       2021-04-23  1435  	get_file(new_exe_file);
fe69d560b5bd9e David Hildenbrand       2021-04-23  1436  
a7031f14525751 Mateusz Guzik           2023-08-14  1437  	/* set the new file */
a7031f14525751 Mateusz Guzik           2023-08-14  1438  	mmap_write_lock(mm);
a7031f14525751 Mateusz Guzik           2023-08-14 @1439  	old_exe_file = rcu_dereference_raw(mm->exe_file);
a7031f14525751 Mateusz Guzik           2023-08-14  1440  	rcu_assign_pointer(mm->exe_file, new_exe_file);
a7031f14525751 Mateusz Guzik           2023-08-14  1441  	mmap_write_unlock(mm);
a7031f14525751 Mateusz Guzik           2023-08-14  1442  
2a010c41285345 Christian Brauner       2024-05-31  1443  	if (old_exe_file)
35d7bdc86031a2 David Hildenbrand       2021-04-23  1444  		fput(old_exe_file);
35d7bdc86031a2 David Hildenbrand       2021-04-23  1445  	return 0;
35d7bdc86031a2 David Hildenbrand       2021-04-23  1446  }
3864601387cf41 Jiri Slaby              2011-05-26  1447  

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

  parent reply	other threads:[~2024-08-30  2:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-27 21:59 Theodore Dubois
2024-08-27 22:04 ` tblodt
2024-08-28 10:05 ` David Hildenbrand
2024-08-28 15:48   ` tblodt
2024-08-28 13:32 ` Eric W. Biederman
2024-08-28 16:40   ` tblodt
2024-08-30  2:55 ` kernel test robot [this message]
2024-08-30  6:12   ` tblodt

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=202408301005.IiGdSjk2-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=david@redhat.com \
    --cc=ebiederm@xmission.com \
    --cc=gpiccoli@igalia.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=sonicadvance1@gmail.com \
    --cc=tblodt@icloud.com \
    /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®