All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-next:master 12137/12319] include/linux/kstack_erase.h:29:37: error: passing 'const struct task_struct *' to parameter of type 'struct task_struct *' discards qualifiers
@ 2025-07-26 11:43 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-07-26 11:43 UTC (permalink / raw)
  To: Kees Cook; +Cc: oe-kbuild-all

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   d7af19298454ed155f5cf67201a70f5cf836c842
commit: 897627bc44d228f00cc8595c9b2fa747d3e8c64f [12137/12319] kstack_erase: Support Clang stack depth tracking
config: loongarch-allyesconfig (https://download.01.org/0day-ci/archive/20250726/202507261908.eBMSznZw-lkp@intel.com/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 853c343b45b3e83cc5eeef5a52fc8cc9d8a09252)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250726/202507261908.eBMSznZw-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/202507261908.eBMSznZw-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from kernel/fork.c:96:
>> include/linux/kstack_erase.h:29:37: error: passing 'const struct task_struct *' to parameter of type 'struct task_struct *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
      29 |         return (unsigned long)end_of_stack(tsk) + sizeof(unsigned long);
         |                                            ^~~
   include/linux/sched/task_stack.h:56:63: note: passing argument to parameter 'p' here
      56 | static inline unsigned long *end_of_stack(struct task_struct *p)
         |                                                               ^
   1 error generated.


vim +29 include/linux/kstack_erase.h

afaef01c001537 include/linux/stackleak.h Alexander Popov 2018-08-17  18  
9ec79840d6afaf include/linux/stackleak.h Mark Rutland    2022-04-27  19  /*
9ec79840d6afaf include/linux/stackleak.h Mark Rutland    2022-04-27  20   * The lowest address on tsk's stack which we can plausibly erase.
9ec79840d6afaf include/linux/stackleak.h Mark Rutland    2022-04-27  21   */
9ec79840d6afaf include/linux/stackleak.h Mark Rutland    2022-04-27  22  static __always_inline unsigned long
9ec79840d6afaf include/linux/stackleak.h Mark Rutland    2022-04-27  23  stackleak_task_low_bound(const struct task_struct *tsk)
9ec79840d6afaf include/linux/stackleak.h Mark Rutland    2022-04-27  24  {
9ec79840d6afaf include/linux/stackleak.h Mark Rutland    2022-04-27  25  	/*
9ec79840d6afaf include/linux/stackleak.h Mark Rutland    2022-04-27  26  	 * The lowest unsigned long on the task stack contains STACK_END_MAGIC,
9ec79840d6afaf include/linux/stackleak.h Mark Rutland    2022-04-27  27  	 * which we must not corrupt.
9ec79840d6afaf include/linux/stackleak.h Mark Rutland    2022-04-27  28  	 */
9ec79840d6afaf include/linux/stackleak.h Mark Rutland    2022-04-27 @29  	return (unsigned long)end_of_stack(tsk) + sizeof(unsigned long);
9ec79840d6afaf include/linux/stackleak.h Mark Rutland    2022-04-27  30  }
9ec79840d6afaf include/linux/stackleak.h Mark Rutland    2022-04-27  31  

:::::: The code at line 29 was first introduced by commit
:::::: 9ec79840d6afaf472294588a6bbe145bcdffa28b stackleak: rework stack low bound handling

:::::: TO: Mark Rutland <mark.rutland@arm.com>
:::::: CC: Kees Cook <keescook@chromium.org>

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-07-26 11:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-26 11:43 [linux-next:master 12137/12319] include/linux/kstack_erase.h:29:37: error: passing 'const struct task_struct *' to parameter of type 'struct task_struct *' discards qualifiers kernel test robot

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.