Hi Leonard,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on 1fe5b01262844be03de98afdd56d1d393df04d7e]
url:
https://github.com/0day-ci/linux/commits/Leonard-Crestez/tcp-Initial-supp...
base: 1fe5b01262844be03de98afdd56d1d393df04d7e
config: m68k-randconfig-s031-20211209
(
https://download.01.org/0day-ci/archive/20211209/202112092027.W9QemnAk-lk...)
compiler: m68k-linux-gcc (GCC) 11.2.0
reproduce:
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-dirty
#
https://github.com/0day-ci/linux/commit/5935c41094c73eec0e3c39119d7bfb22d...
git remote add linux-review
https://github.com/0day-ci/linux
git fetch --no-tags linux-review
Leonard-Crestez/tcp-Initial-support-for-RFC5925-auth-option/20211208-194125
git checkout 5935c41094c73eec0e3c39119d7bfb22de066c3b
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1
CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=m68k SHELL=/bin/bash
net/ipv4/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
net/ipv4/tcp_minisocks.c: note: in included file:
> include/net/tcp_authopt.h:145:40: sparse: sparse: incorrect type
in assignment (different address spaces) @@ expected struct tcp_authopt_info
*tw_authopt_info @@ got struct tcp_authopt_info [noderef] __rcu *authopt_info @@
include/net/tcp_authopt.h:145:40: sparse: expected struct tcp_authopt_info
*tw_authopt_info
include/net/tcp_authopt.h:145:40: sparse: got struct tcp_authopt_info [noderef]
__rcu *authopt_info
vim +145 include/net/tcp_authopt.h
81
82 void tcp_authopt_free(struct sock *sk, struct tcp_authopt_info *info);
83 void tcp_authopt_clear(struct sock *sk);
84 int tcp_set_authopt(struct sock *sk, sockptr_t optval, unsigned int optlen);
85 int tcp_get_authopt_val(struct sock *sk, struct tcp_authopt *key);
86 int tcp_set_authopt_key(struct sock *sk, sockptr_t optval, unsigned int optlen);
87 struct tcp_authopt_key_info *__tcp_authopt_select_key(
88 const struct sock *sk,
89 struct tcp_authopt_info *info,
90 const struct sock *addr_sk,
91 u8 *rnextkeyid);
92 static inline struct tcp_authopt_key_info *tcp_authopt_select_key(
93 const struct sock *sk,
94 const struct sock *addr_sk,
95 struct tcp_authopt_info **info,
96 u8 *rnextkeyid)
97 {
98 if (tcp_authopt_needed) {
99 *info = rcu_dereference(tcp_sk(sk)->authopt_info);
100
101 if (*info)
102 return __tcp_authopt_select_key(sk, *info, addr_sk, rnextkeyid);
103 }
104 return NULL;
105 }
106 int tcp_authopt_hash(
107 char *hash_location,
108 struct tcp_authopt_key_info *key,
109 struct tcp_authopt_info *info,
110 struct sock *sk, struct sk_buff *skb);
111 int __tcp_authopt_openreq(struct sock *newsk, const struct sock *oldsk, struct
request_sock *req);
112 static inline int tcp_authopt_openreq(
113 struct sock *newsk,
114 const struct sock *oldsk,
115 struct request_sock *req)
116 {
117 if (!rcu_dereference(tcp_sk(oldsk)->authopt_info))
118 return 0;
119 else
120 return __tcp_authopt_openreq(newsk, oldsk, req);
121 }
122 void __tcp_authopt_finish_connect(struct sock *sk, struct sk_buff *skb,
123 struct tcp_authopt_info *info);
124 static inline void tcp_authopt_finish_connect(struct sock *sk, struct sk_buff
*skb)
125 {
126 struct tcp_authopt_info *info;
127
128 if (tcp_authopt_needed) {
129 info = rcu_dereference_protected(tcp_sk(sk)->authopt_info,
130 lockdep_sock_is_held(sk));
131
132 if (info)
133 __tcp_authopt_finish_connect(sk, skb, info);
134 }
135 }
136 static inline void tcp_authopt_time_wait(
137 struct tcp_timewait_sock *tcptw,
138 struct tcp_sock *tp)
139 {
140 if (tcp_authopt_needed) {
141 /* Transfer ownership of authopt_info to the twsk
142 * This requires no other users of the origin sock.
143 */
144 sock_owned_by_me((struct sock *)tp);
145 tcptw->tw_authopt_info = tp->authopt_info;
146 tp->authopt_info = NULL;
147 } else {
148 tcptw->tw_authopt_info = NULL;
149 }
150 }
151 /** tcp_authopt_inbound_check - check for valid TCP-AO signature.
152 *
153 * Return negative ERRNO on error, 0 if not present and 1 if present and valid.
154 *
155 * If the AO signature is present and valid then caller skips MD5 check.
156 */
157 int __tcp_authopt_inbound_check(
158 struct sock *sk,
159 struct sk_buff *skb,
160 struct tcp_authopt_info *info,
161 const u8 *opt);
162 static inline int tcp_authopt_inbound_check(struct sock *sk, struct sk_buff *skb,
const u8 *opt)
163 {
164 if (tcp_authopt_needed) {
165 struct tcp_authopt_info *info = rcu_dereference(tcp_sk(sk)->authopt_info);
166
167 if (info)
168 return __tcp_authopt_inbound_check(sk, skb, info, opt);
169 }
170 return 0;
171 }
172 static inline int tcp_authopt_inbound_check_req(struct request_sock *req, struct
sk_buff *skb,
173 const u8 *opt)
174 {
175 if (tcp_authopt_needed) {
176 struct sock *lsk = req->rsk_listener;
177 struct tcp_authopt_info *info = rcu_dereference(tcp_sk(lsk)->authopt_info);
178
179 if (info)
180 return __tcp_authopt_inbound_check((struct sock *)req, skb, info, opt);
181 }
182 return 0;
183 }
184 #else
185 static inline int tcp_set_authopt(struct sock *sk, sockptr_t optval, unsigned int
optlen)
186 {
187 return -ENOPROTOOPT;
188 }
189 static inline int tcp_get_authopt_val(struct sock *sk, struct tcp_authopt *key)
190 {
191 return -ENOPROTOOPT;
192 }
193 static inline void tcp_authopt_free(struct sock *sk, struct tcp_authopt_info
*info)
194 {
195 }
196 static inline void tcp_authopt_clear(struct sock *sk)
197 {
198 }
199 static inline int tcp_set_authopt_key(struct sock *sk, sockptr_t optval, unsigned
int optlen)
200 {
201 return -ENOPROTOOPT;
202 }
203 static inline int tcp_authopt_hash(
204 char *hash_location,
205 struct tcp_authopt_key_info *key,
206 struct tcp_authopt_key *info,
207 struct sock *sk, struct sk_buff *skb)
208 {
209 return -EINVAL;
210 }
211 static inline int tcp_authopt_openreq(struct sock *newsk,
212 const struct sock *oldsk,
213 struct request_sock *req)
214 {
215 return 0;
216 }
217 static inline void tcp_authopt_finish_connect(struct sock *sk, struct sk_buff
*skb)
218 {
219 }
220 static inline void tcp_authopt_time_wait(
221 struct tcp_timewait_sock *tcptw,
222 struct tcp_sock *tp)
223 {
224 }
225 static inline int tcp_authopt_inbound_check(struct sock *sk, struct sk_buff *skb,
const u8 *opt)
226 {
227 return 0;
228 }
229 static inline int tcp_authopt_inbound_check_req(struct request_sock *sk, struct
sk_buff *skb,
230 const u8 *opt)
231 {
232 return 0;
233 }
234 #endif
235
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org