From: kernel test robot <lkp@intel.com>
To: Dmitry Safonov <dima@arista.com>,
linux-kernel@vger.kernel.org, David Ahern <dsahern@kernel.org>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>, Jakub Kicinski <kuba@kernel.org>,
"David S. Miller" <davem@davemloft.net>
Cc: oe-kbuild-all@lists.linux.dev, netdev@vger.kernel.org,
Dmitry Safonov <dima@arista.com>,
Andy Lutomirski <luto@amacapital.net>,
Ard Biesheuvel <ardb@kernel.org>,
Bob Gilligan <gilligan@arista.com>,
Dan Carpenter <error27@gmail.com>,
David Laight <David.Laight@aculab.com>,
Eric Biggers <ebiggers@kernel.org>,
"Eric W. Biederman" <ebiederm@xmission.com>,
Francesco Ruggeri <fruggeri05@gmail.com>,
Herbert Xu <herbert@gondor.apana.org.au>,
Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,
Ivan Delalande <colona@arista.com>,
Leonard Crestez <cdleonard@gmail.com>,
Salam Noureddine <noureddine@arista.com>
Subject: Re: [PATCH v6 07/21] net/tcp: Add tcp_parse_auth_options()
Date: Sat, 13 May 2023 07:02:34 +0800 [thread overview]
Message-ID: <202305130600.uZymcUzw-lkp@intel.com> (raw)
In-Reply-To: <20230512202311.2845526-8-dima@arista.com>
Hi Dmitry,
kernel test robot noticed the following build warnings:
[auto build test WARNING on 47a2ee5d4a0bda05decdda7be0a77e792cdb09a3]
url: https://github.com/intel-lab-lkp/linux/commits/Dmitry-Safonov/net-tcp-Prepare-tcp_md5sig_pool-for-TCP-AO/20230513-042734
base: 47a2ee5d4a0bda05decdda7be0a77e792cdb09a3
patch link: https://lore.kernel.org/r/20230512202311.2845526-8-dima%40arista.com
patch subject: [PATCH v6 07/21] net/tcp: Add tcp_parse_auth_options()
config: m68k-allyesconfig (https://download.01.org/0day-ci/archive/20230513/202305130600.uZymcUzw-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 12.1.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/intel-lab-lkp/linux/commit/16d692b101c65ae6a5a60530a3461c512f3bc312
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Dmitry-Safonov/net-tcp-Prepare-tcp_md5sig_pool-for-TCP-AO/20230513-042734
git checkout 16d692b101c65ae6a5a60530a3461c512f3bc312
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=m68k olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=m68k SHELL=/bin/bash net/ipv4/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202305130600.uZymcUzw-lkp@intel.com/
All warnings (new ones prefixed by >>):
net/ipv4/tcp.c: In function 'tcp_inbound_md5_hash':
>> net/ipv4/tcp.c:4506:24: warning: implicit conversion from 'enum <anonymous>' to 'enum skb_drop_reason' [-Wenum-conversion]
4506 | return true;
| ^~~~
vim +4506 net/ipv4/tcp.c
4477
4478 /* Called with rcu_read_lock() */
4479 enum skb_drop_reason
4480 tcp_inbound_md5_hash(const struct sock *sk, const struct sk_buff *skb,
4481 const void *saddr, const void *daddr,
4482 int family, int dif, int sdif)
4483 {
4484 /*
4485 * This gets called for each TCP segment that arrives
4486 * so we want to be efficient.
4487 * We have 3 drop cases:
4488 * o No MD5 hash and one expected.
4489 * o MD5 hash and we're not expecting one.
4490 * o MD5 hash and its wrong.
4491 */
4492 const __u8 *hash_location = NULL;
4493 struct tcp_md5sig_key *hash_expected;
4494 const struct tcphdr *th = tcp_hdr(skb);
4495 const struct tcp_sock *tp = tcp_sk(sk);
4496 int genhash, l3index;
4497 u8 newhash[16];
4498
4499 /* sdif set, means packet ingressed via a device
4500 * in an L3 domain and dif is set to the l3mdev
4501 */
4502 l3index = sdif ? dif : 0;
4503
4504 hash_expected = tcp_md5_do_lookup(sk, l3index, saddr, family);
4505 if (tcp_parse_auth_options(th, &hash_location, NULL))
> 4506 return true;
4507
4508 /* We've parsed the options - do we have a hash? */
4509 if (!hash_expected && !hash_location)
4510 return SKB_NOT_DROPPED_YET;
4511
4512 if (hash_expected && !hash_location) {
4513 NET_INC_STATS(sock_net(sk), LINUX_MIB_TCPMD5NOTFOUND);
4514 return SKB_DROP_REASON_TCP_MD5NOTFOUND;
4515 }
4516
4517 if (!hash_expected && hash_location) {
4518 NET_INC_STATS(sock_net(sk), LINUX_MIB_TCPMD5UNEXPECTED);
4519 return SKB_DROP_REASON_TCP_MD5UNEXPECTED;
4520 }
4521
4522 /* Check the signature.
4523 * To support dual stack listeners, we need to handle
4524 * IPv4-mapped case.
4525 */
4526 if (family == AF_INET)
4527 genhash = tcp_v4_md5_hash_skb(newhash,
4528 hash_expected,
4529 NULL, skb);
4530 else
4531 genhash = tp->af_specific->calc_md5_hash(newhash,
4532 hash_expected,
4533 NULL, skb);
4534
4535 if (genhash || memcmp(hash_location, newhash, 16) != 0) {
4536 NET_INC_STATS(sock_net(sk), LINUX_MIB_TCPMD5FAILURE);
4537 if (family == AF_INET) {
4538 net_info_ratelimited("MD5 Hash failed for (%pI4, %d)->(%pI4, %d)%s L3 index %d\n",
4539 saddr, ntohs(th->source),
4540 daddr, ntohs(th->dest),
4541 genhash ? " tcp_v4_calc_md5_hash failed"
4542 : "", l3index);
4543 } else {
4544 net_info_ratelimited("MD5 Hash %s for [%pI6c]:%u->[%pI6c]:%u L3 index %d\n",
4545 genhash ? "failed" : "mismatch",
4546 saddr, ntohs(th->source),
4547 daddr, ntohs(th->dest), l3index);
4548 }
4549 return SKB_DROP_REASON_TCP_MD5FAILURE;
4550 }
4551 return SKB_NOT_DROPPED_YET;
4552 }
4553 EXPORT_SYMBOL(tcp_inbound_md5_hash);
4554
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
next prev parent reply other threads:[~2023-05-12 23:03 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-12 20:22 [PATCH v6 00/21] net/tcp: Add TCP-AO support Dmitry Safonov
2023-05-12 20:22 ` [PATCH v6 01/21] net/tcp: Prepare tcp_md5sig_pool for TCP-AO Dmitry Safonov
2023-05-12 23:23 ` kernel test robot
2023-05-15 4:48 ` Herbert Xu
2023-05-15 16:25 ` Dmitry Safonov
2023-05-16 10:15 ` Herbert Xu
2023-05-19 8:26 ` [PATCH 0/3] crypto: cmac - Add cloning support Herbert Xu
2023-05-19 8:28 ` [PATCH 1/3] crypto: cmac - Use modern init_tfm/exit_tfm Herbert Xu
2023-05-19 8:28 ` [PATCH 2/3] crypto: cipher - Add crypto_clone_cipher Herbert Xu
2023-05-19 13:15 ` Simon Horman
2023-05-19 8:28 ` [PATCH 3/3] crypto: cmac - Add support for cloning Herbert Xu
2023-05-19 8:54 ` Ard Biesheuvel
2023-05-19 9:04 ` [PATCH] crypto: shash - Allow cloning on algorithms with no init_tfm Herbert Xu
2023-05-19 9:31 ` Ard Biesheuvel
2023-05-19 9:35 ` Herbert Xu
2023-05-19 14:41 ` [PATCH 3/3] crypto: cmac - Add support for cloning Dmitry Safonov
2023-05-19 9:49 ` [PATCH 0/3] crypto: cmac - Add cloning support Ard Biesheuvel
2023-05-12 20:22 ` [PATCH v6 02/21] net/tcp: Add TCP-AO config and structures Dmitry Safonov
2023-05-12 20:22 ` [PATCH v6 03/21] net/tcp: Introduce TCP_AO setsockopt()s Dmitry Safonov
2023-05-12 20:22 ` [PATCH v6 04/21] net/tcp: Prevent TCP-MD5 with TCP-AO being set Dmitry Safonov
2023-05-12 20:22 ` [PATCH v6 05/21] net/tcp: Calculate TCP-AO traffic keys Dmitry Safonov
2023-05-12 20:22 ` [PATCH v6 06/21] net/tcp: Add TCP-AO sign to outgoing packets Dmitry Safonov
2023-05-12 20:22 ` [PATCH v6 07/21] net/tcp: Add tcp_parse_auth_options() Dmitry Safonov
2023-05-12 23:02 ` kernel test robot [this message]
2023-05-12 20:22 ` [PATCH v6 08/21] net/tcp: Add AO sign to RST packets Dmitry Safonov
2023-05-12 20:22 ` [PATCH v6 09/21] net/tcp: Add TCP-AO sign to twsk Dmitry Safonov
2023-05-12 20:23 ` [PATCH v6 10/21] net/tcp: Wire TCP-AO to request sockets Dmitry Safonov
2023-05-12 20:23 ` [PATCH v6 11/21] net/tcp: Sign SYN-ACK segments with TCP-AO Dmitry Safonov
2023-05-12 20:23 ` [PATCH v6 12/21] net/tcp: Verify inbound TCP-AO signed segments Dmitry Safonov
2023-05-12 20:23 ` [PATCH v6 13/21] net/tcp: Add TCP-AO segments counters Dmitry Safonov
2023-05-12 20:23 ` [PATCH v6 14/21] net/tcp: Add TCP-AO SNE support Dmitry Safonov
2023-05-12 20:23 ` [PATCH v6 15/21] net/tcp: Add tcp_hash_fail() ratelimited logs Dmitry Safonov
2023-05-12 20:23 ` [PATCH v6 16/21] net/tcp: Ignore specific ICMPs for TCP-AO connections Dmitry Safonov
2023-05-12 20:23 ` [PATCH v6 17/21] net/tcp: Add option for TCP-AO to (not) hash header Dmitry Safonov
2023-05-12 20:23 ` [PATCH v6 18/21] net/tcp: Add TCP-AO getsockopt()s Dmitry Safonov
2023-05-12 20:23 ` [PATCH v6 19/21] net/tcp: Allow asynchronous delete for TCP-AO keys (MKTs) Dmitry Safonov
2023-05-12 20:23 ` [PATCH v6 20/21] net/tcp: Add static_key for TCP-AO Dmitry Safonov
2023-05-12 20:23 ` [PATCH v6 21/21] net/tcp: Wire up l3index to TCP-AO Dmitry Safonov
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=202305130600.uZymcUzw-lkp@intel.com \
--to=lkp@intel.com \
--cc=David.Laight@aculab.com \
--cc=ardb@kernel.org \
--cc=cdleonard@gmail.com \
--cc=colona@arista.com \
--cc=davem@davemloft.net \
--cc=dima@arista.com \
--cc=dsahern@kernel.org \
--cc=ebiederm@xmission.com \
--cc=ebiggers@kernel.org \
--cc=edumazet@google.com \
--cc=error27@gmail.com \
--cc=fruggeri05@gmail.com \
--cc=gilligan@arista.com \
--cc=herbert@gondor.apana.org.au \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=netdev@vger.kernel.org \
--cc=noureddine@arista.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=pabeni@redhat.com \
--cc=yoshfuji@linux-ipv6.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.