From: kernel test robot <lkp@intel.com>
To: Joel Granados <j.granados@samsung.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
"Thomas Weißschuh" <linux@weissschuh.net>,
"Kees Cook" <kees@kernel.org>
Subject: [sysctl:sysctl-testing 1/1] fs/pipe.c:1475:27: error: passing 'const struct ctl_table *' to parameter of type 'struct ctl_table *' discards qualifiers
Date: Fri, 21 Jun 2024 02:26:03 +0800 [thread overview]
Message-ID: <202406210206.iZZnnnGp-lkp@intel.com> (raw)
Hi Joel,
FYI, the error/warning was bisected to this commit, please ignore it if it's irrelevant.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/sysctl/sysctl.git sysctl-testing
head: 0942e6ae35b60b8f67ac961637e734b9cc34f225
commit: 0942e6ae35b60b8f67ac961637e734b9cc34f225 [1/1] sysctl: treewide: constify the ctl_table argument of proc_handlers
config: i386-buildonly-randconfig-001-20240621 (https://download.01.org/0day-ci/archive/20240621/202406210206.iZZnnnGp-lkp@intel.com/config)
compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240621/202406210206.iZZnnnGp-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/202406210206.iZZnnnGp-lkp@intel.com/
All errors (new ones prefixed by >>):
>> fs/pipe.c:1475:27: error: passing 'const struct ctl_table *' to parameter of type 'struct ctl_table *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
1475 | return do_proc_douintvec(table, write, buffer, lenp, ppos,
| ^~~~~
include/linux/sysctl.h:240:41: note: passing argument to parameter 'table' here
240 | int do_proc_douintvec(struct ctl_table *table, int write,
| ^
1 error generated.
--
>> kernel/sysctl.c:263:40: error: passing 'const struct ctl_table *' to parameter of type 'struct ctl_table *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
263 | proc_first_pos_non_zero_ignore(ppos, table);
| ^~~~~
kernel/sysctl.c:226:27: note: passing argument to parameter 'table' here
226 | struct ctl_table *table)
| ^
kernel/sysctl.c:745:26: error: passing 'const struct ctl_table *' to parameter of type 'struct ctl_table *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
745 | return do_proc_dointvec(table, write, buffer, lenp, ppos, NULL, NULL);
| ^~~~~
kernel/sysctl.c:544:47: note: passing argument to parameter 'table' here
544 | static int do_proc_dointvec(struct ctl_table *table, int write,
| ^
kernel/sysctl.c:764:27: error: passing 'const struct ctl_table *' to parameter of type 'struct ctl_table *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
764 | return do_proc_douintvec(table, write, buffer, lenp, ppos,
| ^~~~~
kernel/sysctl.c:678:41: note: passing argument to parameter 'table' here
678 | int do_proc_douintvec(struct ctl_table *table, int write,
| ^
kernel/sysctl.c:874:26: error: passing 'const struct ctl_table *' to parameter of type 'struct ctl_table *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
874 | return do_proc_dointvec(table, write, buffer, lenp, ppos,
| ^~~~~
kernel/sysctl.c:544:47: note: passing argument to parameter 'table' here
544 | static int do_proc_dointvec(struct ctl_table *table, int write,
| ^
kernel/sysctl.c:943:27: error: passing 'const struct ctl_table *' to parameter of type 'struct ctl_table *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
943 | return do_proc_douintvec(table, write, buffer, lenp, ppos,
| ^~~~~
kernel/sysctl.c:678:41: note: passing argument to parameter 'table' here
678 | int do_proc_douintvec(struct ctl_table *table, int write,
| ^
kernel/sysctl.c:1014:33: error: passing 'const struct ctl_table *' to parameter of type 'struct ctl_table *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
1014 | ret = __do_proc_dointvec(&tmp, table, write, buffer,
| ^~~~~
kernel/sysctl.c:471:65: note: passing argument to parameter 'table' here
471 | static int __do_proc_dointvec(void *tbl_data, struct ctl_table *table,
| ^
kernel/sysctl.c:1126:38: error: passing 'const struct ctl_table *' to parameter of type 'struct ctl_table *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
1126 | return do_proc_doulongvec_minmax(table, write, buffer, lenp, ppos, 1l, 1l);
| ^~~~~
kernel/sysctl.c:1099:56: note: passing argument to parameter 'table' here
1099 | static int do_proc_doulongvec_minmax(struct ctl_table *table, int write,
| ^
kernel/sysctl.c:1149:38: error: passing 'const struct ctl_table *' to parameter of type 'struct ctl_table *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
1149 | return do_proc_doulongvec_minmax(table, write, buffer,
| ^~~~~
kernel/sysctl.c:1099:56: note: passing argument to parameter 'table' here
1099 | static int do_proc_doulongvec_minmax(struct ctl_table *table, int write,
| ^
kernel/sysctl.c:1270:29: error: passing 'const struct ctl_table *' to parameter of type 'struct ctl_table *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
1270 | return do_proc_dointvec(table,write,buffer,lenp,ppos,
| ^~~~~
kernel/sysctl.c:544:47: note: passing argument to parameter 'table' here
544 | static int do_proc_dointvec(struct ctl_table *table, int write,
| ^
kernel/sysctl.c:1281:26: error: passing 'const struct ctl_table *' to parameter of type 'struct ctl_table *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
1281 | return do_proc_dointvec(table, write, buffer, lenp, ppos,
| ^~~~~
kernel/sysctl.c:544:47: note: passing argument to parameter 'table' here
544 | static int do_proc_dointvec(struct ctl_table *table, int write,
| ^
kernel/sysctl.c:1303:26: error: passing 'const struct ctl_table *' to parameter of type 'struct ctl_table *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
1303 | return do_proc_dointvec(table, write, buffer, lenp, ppos,
| ^~~~~
kernel/sysctl.c:544:47: note: passing argument to parameter 'table' here
544 | static int do_proc_dointvec(struct ctl_table *table, int write,
| ^
kernel/sysctl.c:1326:26: error: passing 'const struct ctl_table *' to parameter of type 'struct ctl_table *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
1326 | return do_proc_dointvec(table, write, buffer, lenp, ppos,
| ^~~~~
kernel/sysctl.c:544:47: note: passing argument to parameter 'table' here
544 | static int do_proc_dointvec(struct ctl_table *table, int write,
| ^
kernel/sysctl.c:1339:31: error: passing 'const struct ctl_table *' to parameter of type 'struct ctl_table *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
1339 | r = __do_proc_dointvec(&tmp, table, write, buffer,
| ^~~~~
kernel/sysctl.c:471:65: note: passing argument to parameter 'table' here
471 | static int __do_proc_dointvec(void *tbl_data, struct ctl_table *table,
| ^
13 errors generated.
--
>> kernel/utsname_sysctl.c:50:27: error: passing 'const struct ctl_table *' to parameter of type 'struct ctl_table *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
50 | memcpy(tmp_data, get_uts(table), sizeof(tmp_data));
| ^~~~~
arch/x86/include/asm/string_32.h:150:45: note: expanded from macro 'memcpy'
150 | #define memcpy(t, f, n) __builtin_memcpy(t, f, n)
| ^
kernel/utsname_sysctl.c:18:40: note: passing argument to parameter 'table' here
18 | static void *get_uts(struct ctl_table *table)
| ^
kernel/utsname_sysctl.c:63:18: error: passing 'const struct ctl_table *' to parameter of type 'struct ctl_table *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
63 | memcpy(get_uts(table), tmp_data, sizeof(tmp_data));
| ^~~~~
arch/x86/include/asm/string_32.h:150:42: note: expanded from macro 'memcpy'
150 | #define memcpy(t, f, n) __builtin_memcpy(t, f, n)
| ^
kernel/utsname_sysctl.c:18:40: note: passing argument to parameter 'table' here
18 | static void *get_uts(struct ctl_table *table)
| ^
2 errors generated.
vim +1475 fs/pipe.c
1998f19324d24d Luis Chamberlain 2022-01-21 1471
0942e6ae35b60b Joel Granados 2024-06-20 1472 static int proc_dopipe_max_size(const struct ctl_table *table, int write,
1998f19324d24d Luis Chamberlain 2022-01-21 1473 void *buffer, size_t *lenp, loff_t *ppos)
1998f19324d24d Luis Chamberlain 2022-01-21 1474 {
1998f19324d24d Luis Chamberlain 2022-01-21 @1475 return do_proc_douintvec(table, write, buffer, lenp, ppos,
1998f19324d24d Luis Chamberlain 2022-01-21 1476 do_proc_dopipe_max_size_conv, NULL);
1998f19324d24d Luis Chamberlain 2022-01-21 1477 }
1998f19324d24d Luis Chamberlain 2022-01-21 1478
:::::: The code at line 1475 was first introduced by commit
:::::: 1998f19324d24df7de4e74d81503b4299eb99e7d fs: move pipe sysctls to is own file
:::::: TO: Luis Chamberlain <mcgrof@kernel.org>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2024-06-20 18:26 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=202406210206.iZZnnnGp-lkp@intel.com \
--to=lkp@intel.com \
--cc=j.granados@samsung.com \
--cc=kees@kernel.org \
--cc=linux@weissschuh.net \
--cc=llvm@lists.linux.dev \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox