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/202112092244.UyUWpjLG-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/8d4bf3a9b770cb44bf4e37e794e63f7db...
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 8d4bf3a9b770cb44bf4e37e794e63f7db7a08cb6
# 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_ipv4.c:666:22: sparse: sparse: incorrect type in
assignment (different address spaces) @@ expected struct tcp_authopt_info *[assigned]
info @@ got struct tcp_authopt_info [noderef] __rcu *authopt_info @@
net/ipv4/tcp_ipv4.c:666:22: sparse: expected struct tcp_authopt_info *[assigned] info
net/ipv4/tcp_ipv4.c:666:22: sparse: got struct tcp_authopt_info [noderef] __rcu
*authopt_info
net/ipv4/tcp_ipv4.c:3219:41: sparse: sparse: incorrect type in argument 1 (different
address spaces) @@ expected void const *data @@ got struct tcp_congestion_ops
const [noderef] __rcu *tcp_congestion_control @@
net/ipv4/tcp_ipv4.c:3219:41: sparse: expected void const *data
net/ipv4/tcp_ipv4.c:3219:41: sparse: got struct tcp_congestion_ops const [noderef]
__rcu *tcp_congestion_control
net/ipv4/tcp_ipv4.c:3327:45: sparse: sparse: incorrect type in argument 1 (different
address spaces) @@ expected void const *data @@ got struct tcp_congestion_ops
const [noderef] __rcu *extern [addressable] [toplevel] tcp_congestion_control @@
net/ipv4/tcp_ipv4.c:3327:45: sparse: expected void const *data
net/ipv4/tcp_ipv4.c:3327:45: sparse: got struct tcp_congestion_ops const [noderef]
__rcu *extern [addressable] [toplevel] tcp_congestion_control
net/ipv4/tcp_ipv4.c:3331:50: sparse: sparse: incorrect type in assignment (different
address spaces) @@ expected struct tcp_congestion_ops const [noderef] __rcu
*tcp_congestion_control @@ got struct tcp_congestion_ops * @@
net/ipv4/tcp_ipv4.c:3331:50: sparse: expected struct tcp_congestion_ops const
[noderef] __rcu *tcp_congestion_control
net/ipv4/tcp_ipv4.c:3331:50: sparse: got struct tcp_congestion_ops *
net/ipv4/tcp_ipv4.c:1715:25: sparse: sparse: context imbalance in
'tcp_v4_syn_recv_sock' - unexpected unlock
net/ipv4/tcp_ipv4.c:1988:17: sparse: sparse: context imbalance in
'tcp_add_backlog' - unexpected unlock
net/ipv4/tcp_ipv4.c:2258:21: sparse: sparse: context imbalance in 'tcp_v4_rcv'
- different lock contexts for basic block
net/ipv4/tcp_ipv4.c:3220:41: sparse: sparse: dereference of noderef expression
net/ipv4/tcp_ipv4.c:3220:41: sparse: sparse: dereference of noderef expression
net/ipv4/tcp_ipv4.c:3328:45: sparse: sparse: dereference of noderef expression
net/ipv4/tcp_ipv4.c:3328:45: sparse: sparse: dereference of noderef expression
vim +666 net/ipv4/tcp_ipv4.c
648
649 #ifdef CONFIG_TCP_AUTHOPT
650 /** tcp_v4_authopt_handle_reply - Insert TCPOPT_AUTHOPT if required
651 *
652 * returns number of bytes (always aligned to 4) or zero
653 */
654 static int tcp_v4_authopt_handle_reply(const struct sock *sk,
655 struct sk_buff *skb,
656 __be32 *optptr,
657 struct tcphdr *th)
658 {
659 struct tcp_authopt_info *info;
660 struct tcp_authopt_key_info *key_info;
661 u8 rnextkeyid;
662
663 if (sk->sk_state == TCP_TIME_WAIT)
664 info = tcp_twsk(sk)->tw_authopt_info;
665 else
666 info = tcp_sk(sk)->authopt_info;
667 if (!info)
668 return 0;
669 key_info = __tcp_authopt_select_key(sk, info, sk, &rnextkeyid);
670 if (!key_info)
671 return 0;
672 *optptr = htonl((TCPOPT_AUTHOPT << 24) |
673 (TCPOLEN_AUTHOPT_OUTPUT << 16) |
674 (key_info->send_id << 8) |
675 (rnextkeyid));
676 /* must update doff before signature computation */
677 th->doff += TCPOLEN_AUTHOPT_OUTPUT / 4;
678 tcp_v4_authopt_hash_reply((char *)(optptr + 1),
679 info,
680 key_info,
681 ip_hdr(skb)->daddr,
682 ip_hdr(skb)->saddr,
683 th);
684
685 return TCPOLEN_AUTHOPT_OUTPUT;
686 }
687 #endif
688
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org