All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH v3 06/18] tcp: authopt: Hook into tcp core
Date: Thu, 09 Dec 2021 20:58:46 +0800	[thread overview]
Message-ID: <202112092027.W9QemnAk-lkp@intel.com> (raw)
In-Reply-To: <c6a0af64b6e41aa74d70dc0f7321a5f2293ee53e.1638962992.git.cdleonard@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 7821 bytes --]

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-support-for-RFC5925-auth-option/20211208-194125
base:   1fe5b01262844be03de98afdd56d1d393df04d7e
config: m68k-randconfig-s031-20211209 (https://download.01.org/0day-ci/archive/20211209/202112092027.W9QemnAk-lkp(a)intel.com/config)
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/5935c41094c73eec0e3c39119d7bfb22de066c3b
        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@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(a)lists.01.org

  parent reply	other threads:[~2021-12-09 12:58 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-08 11:37 [PATCH v3 00/18] tcp: Initial support for RFC5925 auth option Leonard Crestez
2021-12-08 11:37 ` [PATCH v3 01/18] tcp: authopt: Initial support and key management Leonard Crestez
2021-12-08 11:37 ` [PATCH v3 02/18] docs: Add user documentation for tcp_authopt Leonard Crestez
2021-12-08 11:37 ` [PATCH v3 03/18] tcp: authopt: Add crypto initialization Leonard Crestez
2021-12-08 11:37 ` [PATCH v3 04/18] tcp: md5: Refactor tcp_sig_hash_skb_data for AO Leonard Crestez
2021-12-08 11:37 ` [PATCH v3 05/18] tcp: authopt: Compute packet signatures Leonard Crestez
2021-12-08 11:37 ` [PATCH v3 06/18] tcp: authopt: Hook into tcp core Leonard Crestez
2021-12-08 16:45   ` kernel test robot
2021-12-08 20:39   ` kernel test robot
2021-12-08 20:39     ` kernel test robot
2021-12-09 12:58   ` kernel test robot [this message]
2021-12-08 11:37 ` [PATCH v3 07/18] tcp: authopt: Disable via sysctl by default Leonard Crestez
2021-12-08 11:37 ` [PATCH v3 08/18] tcp: authopt: Implement Sequence Number Extension Leonard Crestez
2021-12-08 11:37 ` [PATCH v3 09/18] tcp: ipv6: Add AO signing for tcp_v6_send_response Leonard Crestez
2021-12-08 21:30   ` kernel test robot
2021-12-08 11:37 ` [PATCH v3 10/18] tcp: authopt: Add support for signing skb-less replies Leonard Crestez
2021-12-08 11:37 ` [PATCH v3 11/18] tcp: ipv4: Add AO signing for " Leonard Crestez
2021-12-08 23:37   ` kernel test robot
2021-12-09 15:02   ` kernel test robot
2021-12-08 11:37 ` [PATCH v3 12/18] tcp: authopt: Add key selection controls Leonard Crestez
2021-12-09 16:57   ` kernel test robot
2021-12-08 11:37 ` [PATCH v3 13/18] tcp: authopt: Add initial l3index support Leonard Crestez
2021-12-08 11:37 ` [PATCH v3 14/18] tcp: authopt: Add NOSEND/NORECV flags Leonard Crestez
2021-12-08 11:37 ` [PATCH v3 15/18] tcp: authopt: Add prefixlen support Leonard Crestez
2021-12-09 19:01   ` kernel test robot
2021-12-08 11:37 ` [PATCH v3 16/18] selftests: nettest: Rename md5_prefix to key_addr_prefix Leonard Crestez
2021-12-08 11:37 ` [PATCH v3 17/18] selftests: nettest: Initial tcp_authopt support Leonard Crestez
2021-12-08 11:37 ` [PATCH v3 18/18] selftests: net/fcnal: " Leonard Crestez
2021-12-13 10:31 ` [PATCH v3 00/18] tcp: Initial support for RFC5925 auth option Leonard Crestez
  -- strict thread matches above, loose matches on Subject: below --
2021-12-08 21:09 [PATCH v3 06/18] tcp: authopt: Hook into tcp core kernel test robot

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=202112092027.W9QemnAk-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.