From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [RFCv3 06/15] tcp: authopt: Compute packet signatures
Date: Wed, 25 Aug 2021 08:45:22 +0800 [thread overview]
Message-ID: <202108250816.fZXoDJPH-lkp@intel.com> (raw)
In-Reply-To: <3e8956d3895a05ca1e7672531cf88b5445b456f3.1629840814.git.cdleonard@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 5873 bytes --]
Hi Leonard,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on 3a62c333497b164868fdcd241842a1dd4e331825]
url: https://github.com/0day-ci/linux/commits/Leonard-Crestez/tcp-Initial-support-for-RFC5925-auth-option/20210825-053714
base: 3a62c333497b164868fdcd241842a1dd4e331825
config: arc-allyesconfig (attached as .config)
compiler: arceb-elf-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://github.com/0day-ci/linux/commit/8666d8497484cd6cb4b94bca9097506d886e9c46
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/20210825-053714
git checkout 8666d8497484cd6cb4b94bca9097506d886e9c46
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=arc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
net/ipv4/tcp_authopt.c: In function 'tcp_authopt_shash_traffic_key':
>> net/ipv4/tcp_authopt.c:428:42: warning: variable 'daddr' set but not used [-Wunused-but-set-variable]
428 | struct in6_addr *daddr;
| ^~~~~
>> net/ipv4/tcp_authopt.c:427:42: warning: variable 'saddr' set but not used [-Wunused-but-set-variable]
427 | struct in6_addr *saddr;
| ^~~~~
net/ipv4/tcp_authopt.c: At top level:
>> net/ipv4/tcp_authopt.c:820:5: warning: no previous prototype for '__tcp_authopt_calc_mac' [-Wmissing-prototypes]
820 | int __tcp_authopt_calc_mac(struct sock *sk,
| ^~~~~~~~~~~~~~~~~~~~~~
net/ipv4/tcp_authopt.c:117:13: warning: 'tcp_authopt_alg_incref' defined but not used [-Wunused-function]
117 | static void tcp_authopt_alg_incref(struct tcp_authopt_alg_imp *alg)
| ^~~~~~~~~~~~~~~~~~~~~~
vim +/daddr +428 net/ipv4/tcp_authopt.c
397
398 /* feed traffic key into shash */
399 static int tcp_authopt_shash_traffic_key(struct shash_desc *desc,
400 struct sock *sk,
401 struct sk_buff *skb,
402 bool input,
403 bool ipv6)
404 {
405 struct tcphdr *th = tcp_hdr(skb);
406 int err;
407 __be32 sisn, disn;
408 __be16 digestbits = htons(crypto_shash_digestsize(desc->tfm) * 8);
409
410 // RFC5926 section 3.1.1.1
411 err = crypto_shash_update(desc, "\x01TCP-AO", 7);
412 if (err)
413 return err;
414
415 /* Addresses from packet on input and from socket on output
416 * This is because on output MAC is computed before prepending IP header
417 */
418 if (input) {
419 if (ipv6)
420 err = crypto_shash_update(desc, (u8 *)&ipv6_hdr(skb)->saddr, 32);
421 else
422 err = crypto_shash_update(desc, (u8 *)&ip_hdr(skb)->saddr, 8);
423 if (err)
424 return err;
425 } else {
426 if (ipv6) {
> 427 struct in6_addr *saddr;
> 428 struct in6_addr *daddr;
429
430 saddr = &sk->sk_v6_rcv_saddr;
431 daddr = &sk->sk_v6_daddr;
432 err = crypto_shash_update(desc, (u8 *)&sk->sk_v6_rcv_saddr, 16);
433 if (err)
434 return err;
435 err = crypto_shash_update(desc, (u8 *)&sk->sk_v6_daddr, 16);
436 if (err)
437 return err;
438 } else {
439 err = crypto_shash_update(desc, (u8 *)&sk->sk_rcv_saddr, 4);
440 if (err)
441 return err;
442 err = crypto_shash_update(desc, (u8 *)&sk->sk_daddr, 4);
443 if (err)
444 return err;
445 }
446 }
447
448 /* TCP ports from header */
449 err = crypto_shash_update(desc, (u8 *)&th->source, 4);
450 if (err)
451 return err;
452
453 /* special cases for SYN and SYN/ACK */
454 if (th->syn && !th->ack) {
455 sisn = th->seq;
456 disn = 0;
457 } else if (th->syn && th->ack) {
458 sisn = th->seq;
459 disn = htonl(ntohl(th->ack_seq) - 1);
460 } else {
461 struct tcp_authopt_info *authopt_info;
462
463 /* Fetching authopt_info like this means it's possible that authopt_info
464 * was deleted while we were hashing. If that happens we drop the packet
465 * which should be fine.
466 *
467 * A better solution might be to always pass info as a parameter, or
468 * compute traffic_key for established sockets separately.
469 */
470 rcu_read_lock();
471 authopt_info = rcu_dereference(tcp_sk(sk)->authopt_info);
472 if (!authopt_info) {
473 rcu_read_unlock();
474 return -EINVAL;
475 }
476 /* Initial sequence numbers for ESTABLISHED connections from info */
477 if (input) {
478 sisn = htonl(authopt_info->dst_isn);
479 disn = htonl(authopt_info->src_isn);
480 } else {
481 sisn = htonl(authopt_info->src_isn);
482 disn = htonl(authopt_info->dst_isn);
483 }
484 rcu_read_unlock();
485 }
486
487 err = crypto_shash_update(desc, (u8 *)&sisn, 4);
488 if (err)
489 return err;
490 err = crypto_shash_update(desc, (u8 *)&disn, 4);
491 if (err)
492 return err;
493
494 err = crypto_shash_update(desc, (u8 *)&digestbits, 2);
495 if (err)
496 return err;
497
498 return 0;
499 }
500
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 68488 bytes --]
next prev parent reply other threads:[~2021-08-25 0:45 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-24 21:34 [RFCv3 00/15] tcp: Initial support for RFC5925 auth option Leonard Crestez
2021-08-24 21:34 ` [RFCv3 01/15] tcp: authopt: Initial support and key management Leonard Crestez
2021-08-31 19:04 ` Dmitry Safonov
2021-09-03 14:26 ` Leonard Crestez
2021-08-24 21:34 ` [RFCv3 02/15] docs: Add user documentation for tcp_authopt Leonard Crestez
2021-08-24 21:34 ` [RFCv3 03/15] selftests: Initial tcp_authopt test module Leonard Crestez
2021-08-24 21:34 ` [RFCv3 04/15] selftests: tcp_authopt: Initial sockopt manipulation Leonard Crestez
2021-08-24 21:34 ` [RFCv3 05/15] tcp: authopt: Add crypto initialization Leonard Crestez
2021-08-24 23:02 ` Eric Dumazet
2021-08-24 23:34 ` Eric Dumazet
2021-08-25 8:08 ` Herbert Xu
2021-08-25 14:55 ` Eric Dumazet
2021-08-25 16:04 ` Ard Biesheuvel
2021-08-25 16:31 ` Leonard Crestez
2021-08-25 16:35 ` Leonard Crestez
2021-08-25 17:55 ` Eric Dumazet
2021-08-25 18:56 ` Leonard Crestez
2021-08-24 21:34 ` [RFCv3 06/15] tcp: authopt: Compute packet signatures Leonard Crestez
2021-08-25 0:45 ` kernel test robot [this message]
2021-08-26 2:19 ` kernel test robot
2021-08-26 2:19 ` [RFC PATCH] tcp: authopt: __tcp_authopt_calc_mac() can be static kernel test robot
2021-08-28 0:39 ` [RFCv3 06/15] tcp: authopt: Compute packet signatures kernel test robot
2021-08-24 21:34 ` [RFCv3 07/15] tcp: authopt: Hook into tcp core Leonard Crestez
2021-08-24 22:59 ` Eric Dumazet
2021-08-25 16:32 ` Leonard Crestez
2021-08-25 1:48 ` kernel test robot
2021-08-25 3:31 ` kernel test robot
2021-08-28 11:59 ` kernel test robot
2021-08-28 11:59 ` [RFC PATCH] tcp: authopt: tcp_authopt_lookup_send() can be static kernel test robot
2021-08-24 21:34 ` [RFCv3 08/15] tcp: authopt: Add snmp counters Leonard Crestez
2021-08-24 21:34 ` [RFCv3 09/15] selftests: tcp_authopt: Test key address binding Leonard Crestez
2021-08-25 5:18 ` David Ahern
2021-08-25 16:37 ` Leonard Crestez
2021-08-24 21:34 ` [RFCv3 10/15] selftests: tcp_authopt: Capture and verify packets Leonard Crestez
2021-08-24 21:34 ` [RFCv3 11/15] selftests: Initial tcp_authopt support for nettest Leonard Crestez
2021-08-24 21:34 ` [RFCv3 12/15] selftests: Initial tcp_authopt support for fcnal-test Leonard Crestez
2021-08-24 21:34 ` [RFCv3 13/15] selftests: Add -t tcp_authopt option for fcnal-test.sh Leonard Crestez
2021-08-24 21:34 ` [RFCv3 14/15] tcp: authopt: Add key selection controls Leonard Crestez
2021-08-24 21:34 ` [RFCv3 15/15] selftests: tcp_authopt: Add tests for rollover Leonard Crestez
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=202108250816.fZXoDJPH-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.