arch/arm64/include/asm/syscall_wrapper.h:76:32: warning: no previous prototype for '__arm64_sys_landlock_create_ruleset'

From: kernel test robot
Date: Tue Sep 28 2021 - 16:56:44 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 6fd3ec5c7af58d5d6b598fba22ac387645af33f4
commit: 265885daf3e5082eb9f6e2a23bdbf9ba4456a21b landlock: Add syscall implementations
date: 5 months ago
config: arm64-randconfig-r032-20210927 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=265885daf3e5082eb9f6e2a23bdbf9ba4456a21b
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 265885daf3e5082eb9f6e2a23bdbf9ba4456a21b
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=arm64

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

| ^~~~~~~~~~~~
kernel/sys_ni.c:239:1: note: in expansion of macro 'COND_SYSCALL'
239 | COND_SYSCALL(bind);
| ^~~~~~~~~~~~
arch/arm64/include/asm/syscall_wrapper.h:76:32: warning: no previous prototype for '__arm64_sys_listen' [-Wmissing-prototypes]
76 | asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \
| ^~~~~~~~~~~~
kernel/sys_ni.c:240:1: note: in expansion of macro 'COND_SYSCALL'
240 | COND_SYSCALL(listen);
| ^~~~~~~~~~~~
arch/arm64/include/asm/syscall_wrapper.h:76:32: warning: no previous prototype for '__arm64_sys_accept' [-Wmissing-prototypes]
76 | asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \
| ^~~~~~~~~~~~
kernel/sys_ni.c:241:1: note: in expansion of macro 'COND_SYSCALL'
241 | COND_SYSCALL(accept);
| ^~~~~~~~~~~~
arch/arm64/include/asm/syscall_wrapper.h:76:32: warning: no previous prototype for '__arm64_sys_connect' [-Wmissing-prototypes]
76 | asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \
| ^~~~~~~~~~~~
kernel/sys_ni.c:242:1: note: in expansion of macro 'COND_SYSCALL'
242 | COND_SYSCALL(connect);
| ^~~~~~~~~~~~
arch/arm64/include/asm/syscall_wrapper.h:76:32: warning: no previous prototype for '__arm64_sys_getsockname' [-Wmissing-prototypes]
76 | asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \
| ^~~~~~~~~~~~
kernel/sys_ni.c:243:1: note: in expansion of macro 'COND_SYSCALL'
243 | COND_SYSCALL(getsockname);
| ^~~~~~~~~~~~
arch/arm64/include/asm/syscall_wrapper.h:76:32: warning: no previous prototype for '__arm64_sys_getpeername' [-Wmissing-prototypes]
76 | asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \
| ^~~~~~~~~~~~
kernel/sys_ni.c:244:1: note: in expansion of macro 'COND_SYSCALL'
244 | COND_SYSCALL(getpeername);
| ^~~~~~~~~~~~
arch/arm64/include/asm/syscall_wrapper.h:76:32: warning: no previous prototype for '__arm64_sys_setsockopt' [-Wmissing-prototypes]
76 | asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \
| ^~~~~~~~~~~~
kernel/sys_ni.c:245:1: note: in expansion of macro 'COND_SYSCALL'
245 | COND_SYSCALL(setsockopt);
| ^~~~~~~~~~~~
arch/arm64/include/asm/syscall_wrapper.h:76:32: warning: no previous prototype for '__arm64_sys_getsockopt' [-Wmissing-prototypes]
76 | asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \
| ^~~~~~~~~~~~
kernel/sys_ni.c:247:1: note: in expansion of macro 'COND_SYSCALL'
247 | COND_SYSCALL(getsockopt);
| ^~~~~~~~~~~~
arch/arm64/include/asm/syscall_wrapper.h:76:32: warning: no previous prototype for '__arm64_sys_sendto' [-Wmissing-prototypes]
76 | asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \
| ^~~~~~~~~~~~
kernel/sys_ni.c:249:1: note: in expansion of macro 'COND_SYSCALL'
249 | COND_SYSCALL(sendto);
| ^~~~~~~~~~~~
arch/arm64/include/asm/syscall_wrapper.h:76:32: warning: no previous prototype for '__arm64_sys_shutdown' [-Wmissing-prototypes]
76 | asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \
| ^~~~~~~~~~~~
kernel/sys_ni.c:250:1: note: in expansion of macro 'COND_SYSCALL'
250 | COND_SYSCALL(shutdown);
| ^~~~~~~~~~~~
arch/arm64/include/asm/syscall_wrapper.h:76:32: warning: no previous prototype for '__arm64_sys_recvfrom' [-Wmissing-prototypes]
76 | asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \
| ^~~~~~~~~~~~
kernel/sys_ni.c:251:1: note: in expansion of macro 'COND_SYSCALL'
251 | COND_SYSCALL(recvfrom);
| ^~~~~~~~~~~~
arch/arm64/include/asm/syscall_wrapper.h:76:32: warning: no previous prototype for '__arm64_sys_sendmsg' [-Wmissing-prototypes]
76 | asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \
| ^~~~~~~~~~~~
kernel/sys_ni.c:253:1: note: in expansion of macro 'COND_SYSCALL'
253 | COND_SYSCALL(sendmsg);
| ^~~~~~~~~~~~
arch/arm64/include/asm/syscall_wrapper.h:76:32: warning: no previous prototype for '__arm64_sys_recvmsg' [-Wmissing-prototypes]
76 | asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \
| ^~~~~~~~~~~~
kernel/sys_ni.c:255:1: note: in expansion of macro 'COND_SYSCALL'
255 | COND_SYSCALL(recvmsg);
| ^~~~~~~~~~~~
arch/arm64/include/asm/syscall_wrapper.h:76:32: warning: no previous prototype for '__arm64_sys_mremap' [-Wmissing-prototypes]
76 | asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \
| ^~~~~~~~~~~~
kernel/sys_ni.c:261:1: note: in expansion of macro 'COND_SYSCALL'
261 | COND_SYSCALL(mremap);
| ^~~~~~~~~~~~
arch/arm64/include/asm/syscall_wrapper.h:76:32: warning: no previous prototype for '__arm64_sys_add_key' [-Wmissing-prototypes]
76 | asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \
| ^~~~~~~~~~~~
kernel/sys_ni.c:264:1: note: in expansion of macro 'COND_SYSCALL'
264 | COND_SYSCALL(add_key);
| ^~~~~~~~~~~~
arch/arm64/include/asm/syscall_wrapper.h:76:32: warning: no previous prototype for '__arm64_sys_request_key' [-Wmissing-prototypes]
76 | asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \
| ^~~~~~~~~~~~
kernel/sys_ni.c:265:1: note: in expansion of macro 'COND_SYSCALL'
265 | COND_SYSCALL(request_key);
| ^~~~~~~~~~~~
arch/arm64/include/asm/syscall_wrapper.h:76:32: warning: no previous prototype for '__arm64_sys_keyctl' [-Wmissing-prototypes]
76 | asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \
| ^~~~~~~~~~~~
kernel/sys_ni.c:266:1: note: in expansion of macro 'COND_SYSCALL'
266 | COND_SYSCALL(keyctl);
| ^~~~~~~~~~~~
>> arch/arm64/include/asm/syscall_wrapper.h:76:32: warning: no previous prototype for '__arm64_sys_landlock_create_ruleset' [-Wmissing-prototypes]
76 | asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \
| ^~~~~~~~~~~~
kernel/sys_ni.c:270:1: note: in expansion of macro 'COND_SYSCALL'
270 | COND_SYSCALL(landlock_create_ruleset);
| ^~~~~~~~~~~~
>> arch/arm64/include/asm/syscall_wrapper.h:76:32: warning: no previous prototype for '__arm64_sys_landlock_add_rule' [-Wmissing-prototypes]
76 | asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \
| ^~~~~~~~~~~~
kernel/sys_ni.c:271:1: note: in expansion of macro 'COND_SYSCALL'
271 | COND_SYSCALL(landlock_add_rule);
| ^~~~~~~~~~~~
>> arch/arm64/include/asm/syscall_wrapper.h:76:32: warning: no previous prototype for '__arm64_sys_landlock_restrict_self' [-Wmissing-prototypes]
76 | asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \
| ^~~~~~~~~~~~
kernel/sys_ni.c:272:1: note: in expansion of macro 'COND_SYSCALL'
272 | COND_SYSCALL(landlock_restrict_self);
| ^~~~~~~~~~~~
arch/arm64/include/asm/syscall_wrapper.h:76:32: warning: no previous prototype for '__arm64_sys_fadvise64_64' [-Wmissing-prototypes]
76 | asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \
| ^~~~~~~~~~~~
kernel/sys_ni.c:277:1: note: in expansion of macro 'COND_SYSCALL'
277 | COND_SYSCALL(fadvise64_64);
| ^~~~~~~~~~~~
arch/arm64/include/asm/syscall_wrapper.h:76:32: warning: no previous prototype for '__arm64_sys_swapon' [-Wmissing-prototypes]
76 | asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \
| ^~~~~~~~~~~~
kernel/sys_ni.c:280:1: note: in expansion of macro 'COND_SYSCALL'
280 | COND_SYSCALL(swapon);
| ^~~~~~~~~~~~
arch/arm64/include/asm/syscall_wrapper.h:76:32: warning: no previous prototype for '__arm64_sys_swapoff' [-Wmissing-prototypes]
76 | asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \
| ^~~~~~~~~~~~
kernel/sys_ni.c:281:1: note: in expansion of macro 'COND_SYSCALL'
281 | COND_SYSCALL(swapoff);
| ^~~~~~~~~~~~
arch/arm64/include/asm/syscall_wrapper.h:76:32: warning: no previous prototype for '__arm64_sys_mprotect' [-Wmissing-prototypes]
76 | asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \
| ^~~~~~~~~~~~
kernel/sys_ni.c:282:1: note: in expansion of macro 'COND_SYSCALL'
282 | COND_SYSCALL(mprotect);
| ^~~~~~~~~~~~
arch/arm64/include/asm/syscall_wrapper.h:76:32: warning: no previous prototype for '__arm64_sys_msync' [-Wmissing-prototypes]
76 | asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \
| ^~~~~~~~~~~~
kernel/sys_ni.c:283:1: note: in expansion of macro 'COND_SYSCALL'
283 | COND_SYSCALL(msync);
| ^~~~~~~~~~~~
arch/arm64/include/asm/syscall_wrapper.h:76:32: warning: no previous prototype for '__arm64_sys_mlock' [-Wmissing-prototypes]
76 | asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \
| ^~~~~~~~~~~~
kernel/sys_ni.c:284:1: note: in expansion of macro 'COND_SYSCALL'
284 | COND_SYSCALL(mlock);
| ^~~~~~~~~~~~
arch/arm64/include/asm/syscall_wrapper.h:76:32: warning: no previous prototype for '__arm64_sys_munlock' [-Wmissing-prototypes]
76 | asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \
| ^~~~~~~~~~~~
kernel/sys_ni.c:285:1: note: in expansion of macro 'COND_SYSCALL'
285 | COND_SYSCALL(munlock);
| ^~~~~~~~~~~~
arch/arm64/include/asm/syscall_wrapper.h:76:32: warning: no previous prototype for '__arm64_sys_mlockall' [-Wmissing-prototypes]
76 | asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \
| ^~~~~~~~~~~~
kernel/sys_ni.c:286:1: note: in expansion of macro 'COND_SYSCALL'
286 | COND_SYSCALL(mlockall);
| ^~~~~~~~~~~~
arch/arm64/include/asm/syscall_wrapper.h:76:32: warning: no previous prototype for '__arm64_sys_munlockall' [-Wmissing-prototypes]
76 | asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \
| ^~~~~~~~~~~~
kernel/sys_ni.c:287:1: note: in expansion of macro 'COND_SYSCALL'
287 | COND_SYSCALL(munlockall);
| ^~~~~~~~~~~~
arch/arm64/include/asm/syscall_wrapper.h:76:32: warning: no previous prototype for '__arm64_sys_mincore' [-Wmissing-prototypes]
76 | asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \
| ^~~~~~~~~~~~
kernel/sys_ni.c:288:1: note: in expansion of macro 'COND_SYSCALL'
288 | COND_SYSCALL(mincore);
| ^~~~~~~~~~~~
arch/arm64/include/asm/syscall_wrapper.h:76:32: warning: no previous prototype for '__arm64_sys_madvise' [-Wmissing-prototypes]
76 | asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \
| ^~~~~~~~~~~~
kernel/sys_ni.c:289:1: note: in expansion of macro 'COND_SYSCALL'
289 | COND_SYSCALL(madvise);
| ^~~~~~~~~~~~
arch/arm64/include/asm/syscall_wrapper.h:76:32: warning: no previous prototype for '__arm64_sys_process_madvise' [-Wmissing-prototypes]
76 | asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \
| ^~~~~~~~~~~~
kernel/sys_ni.c:290:1: note: in expansion of macro 'COND_SYSCALL'
290 | COND_SYSCALL(process_madvise);
| ^~~~~~~~~~~~
arch/arm64/include/asm/syscall_wrapper.h:76:32: warning: no previous prototype for '__arm64_sys_remap_file_pages' [-Wmissing-prototypes]
76 | asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \
| ^~~~~~~~~~~~
kernel/sys_ni.c:291:1: note: in expansion of macro 'COND_SYSCALL'
291 | COND_SYSCALL(remap_file_pages);
| ^~~~~~~~~~~~
arch/arm64/include/asm/syscall_wrapper.h:76:32: warning: no previous prototype for '__arm64_sys_mbind' [-Wmissing-prototypes]
76 | asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \
| ^~~~~~~~~~~~
kernel/sys_ni.c:292:1: note: in expansion of macro 'COND_SYSCALL'
292 | COND_SYSCALL(mbind);
| ^~~~~~~~~~~~
arch/arm64/include/asm/syscall_wrapper.h:76:32: warning: no previous prototype for '__arm64_sys_get_mempolicy' [-Wmissing-prototypes]
76 | asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \
| ^~~~~~~~~~~~
kernel/sys_ni.c:294:1: note: in expansion of macro 'COND_SYSCALL'
294 | COND_SYSCALL(get_mempolicy);
| ^~~~~~~~~~~~
arch/arm64/include/asm/syscall_wrapper.h:76:32: warning: no previous prototype for '__arm64_sys_set_mempolicy' [-Wmissing-prototypes]
76 | asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \
| ^~~~~~~~~~~~
kernel/sys_ni.c:296:1: note: in expansion of macro 'COND_SYSCALL'
296 | COND_SYSCALL(set_mempolicy);


vim +/__arm64_sys_landlock_create_ruleset +76 arch/arm64/include/asm/syscall_wrapper.h

4378a7d4be30ec Mark Rutland 2018-07-11 50
4378a7d4be30ec Mark Rutland 2018-07-11 51 #define __SYSCALL_DEFINEx(x, name, ...) \
4378a7d4be30ec Mark Rutland 2018-07-11 52 asmlinkage long __arm64_sys##name(const struct pt_regs *regs); \
4378a7d4be30ec Mark Rutland 2018-07-11 53 ALLOW_ERROR_INJECTION(__arm64_sys##name, ERRNO); \
4378a7d4be30ec Mark Rutland 2018-07-11 54 static long __se_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)); \
4378a7d4be30ec Mark Rutland 2018-07-11 55 static inline long __do_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)); \
4378a7d4be30ec Mark Rutland 2018-07-11 56 asmlinkage long __arm64_sys##name(const struct pt_regs *regs) \
4378a7d4be30ec Mark Rutland 2018-07-11 57 { \
4378a7d4be30ec Mark Rutland 2018-07-11 58 return __se_sys##name(SC_ARM64_REGS_TO_ARGS(x,__VA_ARGS__)); \
4378a7d4be30ec Mark Rutland 2018-07-11 59 } \
4378a7d4be30ec Mark Rutland 2018-07-11 60 static long __se_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)) \
4378a7d4be30ec Mark Rutland 2018-07-11 61 { \
4378a7d4be30ec Mark Rutland 2018-07-11 62 long ret = __do_sys##name(__MAP(x,__SC_CAST,__VA_ARGS__)); \
4378a7d4be30ec Mark Rutland 2018-07-11 63 __MAP(x,__SC_TEST,__VA_ARGS__); \
4378a7d4be30ec Mark Rutland 2018-07-11 64 __PROTECT(x, ret,__MAP(x,__SC_ARGS,__VA_ARGS__)); \
4378a7d4be30ec Mark Rutland 2018-07-11 65 return ret; \
4378a7d4be30ec Mark Rutland 2018-07-11 66 } \
4378a7d4be30ec Mark Rutland 2018-07-11 67 static inline long __do_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__))
4378a7d4be30ec Mark Rutland 2018-07-11 68
4378a7d4be30ec Mark Rutland 2018-07-11 69 #define SYSCALL_DEFINE0(sname) \
4378a7d4be30ec Mark Rutland 2018-07-11 70 SYSCALL_METADATA(_##sname, 0); \
0e358bd7b7ebd2 Sami Tolvanen 2019-05-24 71 asmlinkage long __arm64_sys_##sname(const struct pt_regs *__unused); \
4378a7d4be30ec Mark Rutland 2018-07-11 72 ALLOW_ERROR_INJECTION(__arm64_sys_##sname, ERRNO); \
0e358bd7b7ebd2 Sami Tolvanen 2019-05-24 73 asmlinkage long __arm64_sys_##sname(const struct pt_regs *__unused)
4378a7d4be30ec Mark Rutland 2018-07-11 74
c27eccfe4d6c74 Sami Tolvanen 2019-09-10 75 #define COND_SYSCALL(name) \
c27eccfe4d6c74 Sami Tolvanen 2019-09-10 @76 asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \
c27eccfe4d6c74 Sami Tolvanen 2019-09-10 77 { \
c27eccfe4d6c74 Sami Tolvanen 2019-09-10 78 return sys_ni_syscall(); \
c27eccfe4d6c74 Sami Tolvanen 2019-09-10 79 }
4378a7d4be30ec Mark Rutland 2018-07-11 80

:::::: The code at line 76 was first introduced by commit
:::::: c27eccfe4d6c7481ce99f1c433ca043ab464080a arm64: fix function types in COND_SYSCALL

:::::: TO: Sami Tolvanen <samitolvanen@xxxxxxxxxx>
:::::: CC: Will Deacon <will@xxxxxxxxxx>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip