[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202206250009.0xTP9gZk-lkp@intel.com>
Date: Sat, 25 Jun 2022 10:58:35 +0800
From: kernel test robot <lkp@...el.com>
To: Seth Forshee <sforshee@...italocean.com>
Cc: llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
linux-kernel@...r.kernel.org
Subject: [sforshee:kuid-equality 2/2] include/linux/uidgid.h:63:9: error:
call to undeclared function 'uid_valid'; ISO C99 and later do not support
implicit function declarations
tree: https://git.kernel.org/pub/scm/linux/kernel/git/sforshee/linux.git kuid-equality
head: fb9ea59b896e3054b9652ea40d5dae8969b21638
commit: fb9ea59b896e3054b9652ea40d5dae8969b21638 [2/2] uidgid: Do not consider two invalid ids to be equal
config: hexagon-randconfig-r041-20220624
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 6fa9120080c35a5ff851c3fc3358692c4ef7ce0d)
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/sforshee/linux.git/commit/?id=fb9ea59b896e3054b9652ea40d5dae8969b21638
git remote add sforshee https://git.kernel.org/pub/scm/linux/kernel/git/sforshee/linux.git
git fetch --no-tags sforshee kuid-equality
git checkout fb9ea59b896e3054b9652ea40d5dae8969b21638
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon prepare
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@...el.com>
All errors (new ones prefixed by >>):
In file included from arch/hexagon/kernel/asm-offsets.c:12:
In file included from include/linux/compat.h:12:
In file included from include/linux/stat.h:20:
>> include/linux/uidgid.h:63:9: error: call to undeclared function 'uid_valid'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
return uid_valid(left) && __kuid_val(left) == __kuid_val(right);
^
>> include/linux/uidgid.h:68:9: error: call to undeclared function 'gid_valid'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
return gid_valid(left) && __kgid_val(left) == __kgid_val(right);
^
>> include/linux/uidgid.h:111:20: error: static declaration of 'uid_valid' follows non-static declaration
static inline bool uid_valid(kuid_t uid)
^
include/linux/uidgid.h:63:9: note: previous implicit declaration is here
return uid_valid(left) && __kuid_val(left) == __kuid_val(right);
^
>> include/linux/uidgid.h:116:20: error: static declaration of 'gid_valid' follows non-static declaration
static inline bool gid_valid(kgid_t gid)
^
include/linux/uidgid.h:68:9: note: previous implicit declaration is here
return gid_valid(left) && __kgid_val(left) == __kgid_val(right);
^
In file included from arch/hexagon/kernel/asm-offsets.c:12:
In file included from include/linux/compat.h:17:
In file included from include/linux/fs.h:33:
In file included from include/linux/percpu-rwsem.h:7:
In file included from include/linux/rcuwait.h:6:
In file included from include/linux/sched/signal.h:6:
include/linux/signal.h:97:11: warning: array index 3 is past the end of the array (which contains 2 elements) [-Warray-bounds]
return (set->sig[3] | set->sig[2] |
^ ~
include/uapi/asm-generic/signal.h:62:2: note: array 'sig' declared here
unsigned long sig[_NSIG_WORDS];
^
In file included from arch/hexagon/kernel/asm-offsets.c:12:
In file included from include/linux/compat.h:17:
In file included from include/linux/fs.h:33:
In file included from include/linux/percpu-rwsem.h:7:
In file included from include/linux/rcuwait.h:6:
In file included from include/linux/sched/signal.h:6:
include/linux/signal.h:97:25: warning: array index 2 is past the end of the array (which contains 2 elements) [-Warray-bounds]
return (set->sig[3] | set->sig[2] |
^ ~
include/uapi/asm-generic/signal.h:62:2: note: array 'sig' declared here
unsigned long sig[_NSIG_WORDS];
^
In file included from arch/hexagon/kernel/asm-offsets.c:12:
In file included from include/linux/compat.h:17:
In file included from include/linux/fs.h:33:
In file included from include/linux/percpu-rwsem.h:7:
In file included from include/linux/rcuwait.h:6:
In file included from include/linux/sched/signal.h:6:
include/linux/signal.h:113:11: warning: array index 3 is past the end of the array (which contains 2 elements) [-Warray-bounds]
return (set1->sig[3] == set2->sig[3]) &&
^ ~
include/uapi/asm-generic/signal.h:62:2: note: array 'sig' declared here
unsigned long sig[_NSIG_WORDS];
^
In file included from arch/hexagon/kernel/asm-offsets.c:12:
In file included from include/linux/compat.h:17:
In file included from include/linux/fs.h:33:
In file included from include/linux/percpu-rwsem.h:7:
In file included from include/linux/rcuwait.h:6:
In file included from include/linux/sched/signal.h:6:
include/linux/signal.h:113:27: warning: array index 3 is past the end of the array (which contains 2 elements) [-Warray-bounds]
return (set1->sig[3] == set2->sig[3]) &&
^ ~
include/uapi/asm-generic/signal.h:62:2: note: array 'sig' declared here
unsigned long sig[_NSIG_WORDS];
^
In file included from arch/hexagon/kernel/asm-offsets.c:12:
In file included from include/linux/compat.h:17:
In file included from include/linux/fs.h:33:
In file included from include/linux/percpu-rwsem.h:7:
In file included from include/linux/rcuwait.h:6:
In file included from include/linux/sched/signal.h:6:
include/linux/signal.h:114:5: warning: array index 2 is past the end of the array (which contains 2 elements) [-Warray-bounds]
(set1->sig[2] == set2->sig[2]) &&
^ ~
include/uapi/asm-generic/signal.h:62:2: note: array 'sig' declared here
unsigned long sig[_NSIG_WORDS];
^
In file included from arch/hexagon/kernel/asm-offsets.c:12:
In file included from include/linux/compat.h:17:
In file included from include/linux/fs.h:33:
In file included from include/linux/percpu-rwsem.h:7:
In file included from include/linux/rcuwait.h:6:
In file included from include/linux/sched/signal.h:6:
include/linux/signal.h:114:21: warning: array index 2 is past the end of the array (which contains 2 elements) [-Warray-bounds]
(set1->sig[2] == set2->sig[2]) &&
^ ~
include/uapi/asm-generic/signal.h:62:2: note: array 'sig' declared here
unsigned long sig[_NSIG_WORDS];
^
In file included from arch/hexagon/kernel/asm-offsets.c:12:
In file included from include/linux/compat.h:17:
In file included from include/linux/fs.h:33:
In file included from include/linux/percpu-rwsem.h:7:
In file included from include/linux/rcuwait.h:6:
In file included from include/linux/sched/signal.h:6:
include/linux/signal.h:156:1: warning: array index 3 is past the end of the array (which contains 2 elements) [-Warray-bounds]
_SIG_SET_BINOP(sigorsets, _sig_or)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/signal.h:137:8: note: expanded from macro '_SIG_SET_BINOP'
a3 = a->sig[3]; a2 = a->sig[2]; \
^ ~
include/uapi/asm-generic/signal.h:62:2: note: array 'sig' declared here
unsigned long sig[_NSIG_WORDS];
^
In file included from arch/hexagon/kernel/asm-offsets.c:12:
In file included from include/linux/compat.h:17:
In file included from include/linux/fs.h:33:
In file included from include/linux/percpu-rwsem.h:7:
In file included from include/linux/rcuwait.h:6:
In file included from include/linux/sched/signal.h:6:
include/linux/signal.h:156:1: warning: array index 2 is past the end of the array (which contains 2 elements) [-Warray-bounds]
_SIG_SET_BINOP(sigorsets, _sig_or)
vim +/uid_valid +63 include/linux/uidgid.h
60
61 static inline bool uid_eq(kuid_t left, kuid_t right)
62 {
> 63 return uid_valid(left) && __kuid_val(left) == __kuid_val(right);
64 }
65
66 static inline bool gid_eq(kgid_t left, kgid_t right)
67 {
> 68 return gid_valid(left) && __kgid_val(left) == __kgid_val(right);
69 }
70
71 static inline bool uid_gt(kuid_t left, kuid_t right)
72 {
73 return __kuid_val(left) > __kuid_val(right);
74 }
75
76 static inline bool gid_gt(kgid_t left, kgid_t right)
77 {
78 return __kgid_val(left) > __kgid_val(right);
79 }
80
81 static inline bool uid_gte(kuid_t left, kuid_t right)
82 {
83 return __kuid_val(left) >= __kuid_val(right);
84 }
85
86 static inline bool gid_gte(kgid_t left, kgid_t right)
87 {
88 return __kgid_val(left) >= __kgid_val(right);
89 }
90
91 static inline bool uid_lt(kuid_t left, kuid_t right)
92 {
93 return __kuid_val(left) < __kuid_val(right);
94 }
95
96 static inline bool gid_lt(kgid_t left, kgid_t right)
97 {
98 return __kgid_val(left) < __kgid_val(right);
99 }
100
101 static inline bool uid_lte(kuid_t left, kuid_t right)
102 {
103 return __kuid_val(left) <= __kuid_val(right);
104 }
105
106 static inline bool gid_lte(kgid_t left, kgid_t right)
107 {
108 return __kgid_val(left) <= __kgid_val(right);
109 }
110
> 111 static inline bool uid_valid(kuid_t uid)
112 {
113 return __kuid_val(uid) != (uid_t) -1;
114 }
115
> 116 static inline bool gid_valid(kgid_t gid)
117 {
118 return __kgid_val(gid) != (gid_t) -1;
119 }
120
--
0-DAY CI Kernel Test Service
https://01.org/lkp
View attachment "config" of type "text/plain" (119606 bytes)
Powered by blists - more mailing lists