Re: [PATCH v5 6/6] selftests: prctl: Add test for long thread names

From: kernel test robot

Date: Sun Aug 30 2026 - 18:56:28 EST


Hi André,

kernel test robot noticed the following build warnings:

[auto build test WARNING on 73e3f0710014fe6d4ed98cfc02292f6121db7558]

url: https://github.com/intel-lab-lkp/linux/commits/Andr-Almeida/treewide-Get-rid-of-get_task_comm/20260827-152300
base: 73e3f0710014fe6d4ed98cfc02292f6121db7558
patch link: https://lore.kernel.org/r/20260827-tonyk-long_name-v5-6-5fa843782a00%40igalia.com
patch subject: [PATCH v5 6/6] selftests: prctl: Add test for long thread names
config: loongarch-allyesconfig (https://download.01.org/0day-ci/archive/20260831/202608310045.6IJtlqhj-lkp@xxxxxxxxx/config)
compiler: clang version 22.1.8 (https://github.com/llvm/llvm-project ca7933e47d3a3451d81e72ac174dcb5aa28b59d1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260831/202608310045.6IJtlqhj-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202608310045.6IJtlqhj-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

security/smack/smack_lsm.c:150:8: error: call to undeclared function 'get_task_comm'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
150 | acc, get_task_comm(comm, tsk), note);
| ^
security/smack/smack_lsm.c:150:8: note: did you mean 'get_task_mm'?
include/linux/sched/mm.h:151:26: note: 'get_task_mm' declared here
151 | extern struct mm_struct *get_task_mm(struct task_struct *task);
| ^
>> security/smack/smack_lsm.c:150:8: warning: format specifies type 'char *' but the argument has type 'int' [-Wformat]
148 | pr_info("Smack %s: (%s %s %s) %s %s\n", smk_bu_mess[rc],
| ~~
| %d
149 | smk_of_task(tsp)->smk_known, oskp->smk_known,
150 | acc, get_task_comm(comm, tsk), note);
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/printk.h:584:34: note: expanded from macro 'pr_info'
584 | printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
| ~~~ ^~~~~~~~~~~
include/linux/printk.h:511:60: note: expanded from macro 'printk'
511 | #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
| ~~~ ^~~~~~~~~~~
include/linux/printk.h:483:19: note: expanded from macro 'printk_index_wrap'
483 | _p_func(_fmt, ##__VA_ARGS__); \
| ~~~~ ^~~~~~~~~~~
1 warning and 1 error generated.


vim +150 security/smack/smack_lsm.c

d166c8024d620d Casey Schaufler 2014-08-27 132
fba3d32825f4bb Konstantin Andreev 2026-05-11 133 static int
fba3d32825f4bb Konstantin Andreev 2026-05-11 134 smk_bu_tsk_to_obj(struct task_struct *tsk, const struct task_smack *tsp,
fba3d32825f4bb Konstantin Andreev 2026-05-11 135 char *note, struct smack_known *oskp, int mode, int rc)
d166c8024d620d Casey Schaufler 2014-08-27 136 {
fba3d32825f4bb Konstantin Andreev 2026-05-11 137 #ifdef CONFIG_SECURITY_SMACK_BRINGUP
d166c8024d620d Casey Schaufler 2014-08-27 138 char acc[SMK_NUM_ACCESS_TYPE + 1];
fba3d32825f4bb Konstantin Andreev 2026-05-11 139 char comm[TASK_COMM_LEN];
d166c8024d620d Casey Schaufler 2014-08-27 140
d166c8024d620d Casey Schaufler 2014-08-27 141 if (rc <= 0)
d166c8024d620d Casey Schaufler 2014-08-27 142 return rc;
bf4b2fee997997 Casey Schaufler 2015-03-21 143 if (rc > SMACK_UNCONFINED_OBJECT)
bf4b2fee997997 Casey Schaufler 2015-03-21 144 rc = 0;
d166c8024d620d Casey Schaufler 2014-08-27 145
d166c8024d620d Casey Schaufler 2014-08-27 146 smk_bu_mode(mode, acc);
fba3d32825f4bb Konstantin Andreev 2026-05-11 147
bf4b2fee997997 Casey Schaufler 2015-03-21 148 pr_info("Smack %s: (%s %s %s) %s %s\n", smk_bu_mess[rc],
fba3d32825f4bb Konstantin Andreev 2026-05-11 149 smk_of_task(tsp)->smk_known, oskp->smk_known,
fba3d32825f4bb Konstantin Andreev 2026-05-11 @150 acc, get_task_comm(comm, tsk), note);
d166c8024d620d Casey Schaufler 2014-08-27 151 return 0;
d166c8024d620d Casey Schaufler 2014-08-27 152 #else
fba3d32825f4bb Konstantin Andreev 2026-05-11 153 return rc;
d166c8024d620d Casey Schaufler 2014-08-27 154 #endif
fba3d32825f4bb Konstantin Andreev 2026-05-11 155 }
fba3d32825f4bb Konstantin Andreev 2026-05-11 156

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