From: kernel test robot <lkp@intel.com>
To: Kees Cook <kees@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [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
Date: Sat, 26 Jul 2025 19:43:58 +0800 [thread overview]
Message-ID: <202507261908.eBMSznZw-lkp@intel.com> (raw)
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
reply other threads:[~2025-07-26 11:44 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202507261908.eBMSznZw-lkp@intel.com \
--to=lkp@intel.com \
--cc=kees@kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
/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 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.