[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202508302325.b9umktOw-lkp@intel.com>
Date: Sun, 31 Aug 2025 00:03:46 +0800
From: kernel test robot <lkp@...el.com>
To: Max Kellermann <max.kellermann@...os.com>, akpm@...ux-foundation.org,
david@...hat.com, axelrasmussen@...gle.com, yuanchu@...gle.com,
willy@...radead.org, hughd@...gle.com, mhocko@...e.com,
linux-kernel@...r.kernel.org, linux-mm@...ck.org,
lorenzo.stoakes@...cle.com, Liam.Howlett@...cle.com, vbabka@...e.cz,
rppt@...nel.org, surenb@...gle.com
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
Max Kellermann <max.kellermann@...os.com>
Subject: Re: [PATCH 08/12] arch, mm/util: add const to
arch_pick_mmap_layout() parameter
Hi Max,
kernel test robot noticed the following build errors:
[auto build test ERROR on akpm-mm/mm-everything]
url: https://github.com/intel-lab-lkp/linux/commits/Max-Kellermann/mm-shmem-add-const-to-lots-of-pointer-parameters/20250830-023442
base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link: https://lore.kernel.org/r/20250829183159.2223948-9-max.kellermann%40ionos.com
patch subject: [PATCH 08/12] arch, mm/util: add const to arch_pick_mmap_layout() parameter
config: s390-allnoconfig (https://download.01.org/0day-ci/archive/20250830/202508302325.b9umktOw-lkp@intel.com/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project ac23f7465eedd0dd565ffb201f573e7a69695fa3)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250830/202508302325.b9umktOw-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/202508302325.b9umktOw-lkp@intel.com/
All errors (new ones prefixed by >>):
>> arch/s390/mm/mmap.c:187:44: error: passing 'const struct rlimit *' to parameter of type 'struct rlimit *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
187 | mm->mmap_base = mmap_base(random_factor, rlim_stack);
| ^~~~~~~~~~
arch/s390/mm/mmap.c:50:26: note: passing argument to parameter 'rlim_stack' here
50 | struct rlimit *rlim_stack)
| ^
1 error generated.
vim +187 arch/s390/mm/mmap.c
9b11c7912d00d0 Martin Schwidefsky 2017-04-24 167
6252d702c5311c Martin Schwidefsky 2008-02-09 168 /*
6252d702c5311c Martin Schwidefsky 2008-02-09 169 * This function, called very early during the creation of a new
6252d702c5311c Martin Schwidefsky 2008-02-09 170 * process VM image, sets up which VM layout function to use:
6252d702c5311c Martin Schwidefsky 2008-02-09 171 */
f547a726bf8dd8 Max Kellermann 2025-08-29 172 void arch_pick_mmap_layout(struct mm_struct *mm, const struct rlimit *rlim_stack)
6252d702c5311c Martin Schwidefsky 2008-02-09 173 {
8e89a356feb6f1 Kees Cook 2015-04-14 174 unsigned long random_factor = 0UL;
8e89a356feb6f1 Kees Cook 2015-04-14 175
8e89a356feb6f1 Kees Cook 2015-04-14 176 if (current->flags & PF_RANDOMIZE)
2b68f6caeac271 Kees Cook 2015-04-14 177 random_factor = arch_mmap_rnd();
8e89a356feb6f1 Kees Cook 2015-04-14 178
6252d702c5311c Martin Schwidefsky 2008-02-09 179 /*
6252d702c5311c Martin Schwidefsky 2008-02-09 180 * Fall back to the standard layout if the personality
6252d702c5311c Martin Schwidefsky 2008-02-09 181 * bit is set, or if the expected stack growth is unlimited:
6252d702c5311c Martin Schwidefsky 2008-02-09 182 */
8f2af155b51358 Kees Cook 2018-04-10 183 if (mmap_is_legacy(rlim_stack)) {
8e89a356feb6f1 Kees Cook 2015-04-14 184 mm->mmap_base = mmap_base_legacy(random_factor);
40ae96eabea408 Lorenzo Stoakes 2025-08-12 185 mm_flags_clear(MMF_TOPDOWN, mm);
6252d702c5311c Martin Schwidefsky 2008-02-09 186 } else {
8f2af155b51358 Kees Cook 2018-04-10 @187 mm->mmap_base = mmap_base(random_factor, rlim_stack);
c52d638d6b5da2 Lorenzo Stoakes 2025-08-13 188 mm_flags_set(MMF_TOPDOWN, mm);
6252d702c5311c Martin Schwidefsky 2008-02-09 189 }
6252d702c5311c Martin Schwidefsky 2008-02-09 190 }
fd5d210fa66bee Anshuman Khandual 2022-07-11 191
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists