[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202408301005.IiGdSjk2-lkp@intel.com>
Date: Fri, 30 Aug 2024 10:55:48 +0800
From: kernel test robot <lkp@...el.com>
To: Theodore Dubois <tblodt@...oud.com>, linux-kernel@...r.kernel.org
Cc: oe-kbuild-all@...ts.linux.dev, Theodore Dubois <tblodt@...oud.com>,
Ryan Houdek <sonicadvance1@...il.com>,
"Guilherme G. Piccoli" <gpiccoli@...lia.com>,
David Hildenbrand <david@...hat.com>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
Kees Cook <keescook@...omium.org>
Subject: Re: [PATCH] prctl: allow prctl_set_mm_exe_file without unmapping old
exe
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@...el.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
Powered by blists - more mailing lists