Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp4987461imm; Tue, 18 Sep 2018 02:27:50 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZ9G/qO5fCJL6L2WSGH9ZEvaI7iz5gRbaIW+73lH+phhCA1m2s3/Y4YHnyMZ8EI8rWtUlkV X-Received: by 2002:aa7:800f:: with SMTP id j15-v6mr30006922pfi.174.1537262870419; Tue, 18 Sep 2018 02:27:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537262870; cv=none; d=google.com; s=arc-20160816; b=dVhuA0vwednpirIcNhbXxRjeUBoyTZdzCsHhxWiluBQmjIOrlIL8l9HkaRCjXraG+V HYlrVYw/+sJuN43ZcR3IzjaPYbHqnDk1/3vu5M9VK2H7T9CrIs+26n5NRA5FgrFM5kjT 3i88jZtyRlEqvFbyBQy48BFWRhDFaCWyylc/9w0+lyCRqyAwZIMzmvJzM2WCwfUy4nlh cLmXqQvPRcj5Aoawc1rSFe1/OnVcg6SxXUbmKNoDpJaOZnVh2udRH495WOhkLnuRqAM7 UeR6pAnxYB3Z0cX4PZNrnmLMq862Oq/+RxcV15C8f90CKbHfcQc3Q644ultEdxhyWiny Dj7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=soLtwFu6zxvnqScGX9WYTiU1PvD+Z8V3kJQ+SEZcego=; b=zFxCN7cu3g4tyv0Av7lpueQzBtC4FVceEIw6LlzNE/ro0wx1y84PScAWGRw1cnPtnW GZ/2vy7nGLm4rrIB+g2gsKqtvCPZF+RQjgG4J8b8TdsUYOw54TlB8EyzKbRTJJIZdSgp St3Gui4Rv5DZSSZsXTc+ej1hUYocK6ehu+Q8sdCjZjc9kvMaUwSF/CEx/QoiKHPd7BpV qkURDScj2wP30a2QUYE73DC5Dj3UtLtpucuQgD8WBlZOAlIMe5kT1bleqM0aoWmaKjTn E6qt+O/sIXH9OJ/R25JigusJNoeRHqyEh+ornVOL2Uf2AYtPYTzNMbdOk10ktQiTZGiq 1EjA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g128-v6si18363880pfc.339.2018.09.18.02.27.35; Tue, 18 Sep 2018 02:27:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729610AbeIRO6i (ORCPT + 99 others); Tue, 18 Sep 2018 10:58:38 -0400 Received: from www62.your-server.de ([213.133.104.62]:33603 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728467AbeIRO6i (ORCPT ); Tue, 18 Sep 2018 10:58:38 -0400 Received: from [78.46.172.3] (helo=sslproxy06.your-server.de) by www62.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.85_2) (envelope-from ) id 1g2CHM-00067B-8W; Tue, 18 Sep 2018 11:26:44 +0200 Received: from [178.197.249.15] (helo=linux.home) by sslproxy06.your-server.de with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1g2CHM-000XMd-2F; Tue, 18 Sep 2018 11:26:44 +0200 Subject: Re: linux-next: manual merge of the net-next tree with the net tree To: Vakul Garg , Stephen Rothwell , David Miller , Networking Cc: Linux-Next Mailing List , Linux Kernel Mailing List References: <20180918101107.74d8689a@canb.auug.org.au> <93982e9d-dc78-6423-bb9b-c5773d98e244@iogearbox.net> From: Daniel Borkmann Message-ID: <236589cd-b55d-1ceb-f236-36f9135f794e@iogearbox.net> Date: Tue, 18 Sep 2018 11:26:43 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Authenticated-Sender: daniel@iogearbox.net X-Virus-Scanned: Clear (ClamAV 0.100.1/24951/Tue Sep 18 10:16:39 2018) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/18/2018 11:10 AM, Vakul Garg wrote: >> -----Original Message----- >> From: Daniel Borkmann >> Sent: Tuesday, September 18, 2018 2:14 PM >> To: Stephen Rothwell ; David Miller >> ; Networking >> Cc: Linux-Next Mailing List ; Linux Kernel >> Mailing List ; Vakul Garg >> >> Subject: Re: linux-next: manual merge of the net-next tree with the net tree >> >> On 09/18/2018 02:11 AM, Stephen Rothwell wrote: >>> Hi all, >>> >>> Today's linux-next merge of the net-next tree got a conflict in: >>> >>> tools/testing/selftests/net/tls.c >>> >>> between commit: >>> >>> 50c6b58a814d ("tls: fix currently broken MSG_PEEK behavior") >>> >>> from the net tree and commit: >>> >>> c2ad647c6442 ("selftests/tls: Add test for recv(PEEK) spanning >>> across multiple records") >>> >>> from the net-next tree. >>> >>> I fixed it up (see below) and can carry the fix as necessary. This is >>> now fixed as far as linux-next is concerned, but any non trivial >>> conflicts should be mentioned to your upstream maintainer when your >>> tree is submitted for merging. You may also want to consider >>> cooperating with the maintainer of the conflicting tree to minimise >>> any particularly complex conflicts. >> >> The test from 50c6b58a814d supersedes the one from c2ad647c6442 so the >> recv_peek_large_buf_mult_recs could be removed; latter was also not >> working correctly due to this bug. > > Why remove recv_peek_large_buf_mult_recs if its correct? > Why not the newly added one which achieves the same thing? Hmm, not quite, on net-next kernel, the recv_peek_large_buf_mult_recs fails every time I invoke the tls test suite: # ./tls [==========] Running 28 tests from 2 test cases. [ RUN ] tls.sendfile [ OK ] tls.sendfile [ RUN ] tls.send_then_sendfile [ OK ] tls.send_then_sendfile [ RUN ] tls.recv_max [ OK ] tls.recv_max [ RUN ] tls.recv_small [ OK ] tls.recv_small [ RUN ] tls.msg_more [ OK ] tls.msg_more [ RUN ] tls.sendmsg_single [ OK ] tls.sendmsg_single [ RUN ] tls.sendmsg_large [ OK ] tls.sendmsg_large [ RUN ] tls.sendmsg_multiple [ OK ] tls.sendmsg_multiple [ RUN ] tls.sendmsg_multiple_stress [ OK ] tls.sendmsg_multiple_stress [ RUN ] tls.splice_from_pipe [ OK ] tls.splice_from_pipe [ RUN ] tls.splice_from_pipe2 [ OK ] tls.splice_from_pipe2 [ RUN ] tls.send_and_splice [ OK ] tls.send_and_splice [ RUN ] tls.splice_to_pipe [ OK ] tls.splice_to_pipe [ RUN ] tls.recvmsg_single [ OK ] tls.recvmsg_single [ RUN ] tls.recvmsg_single_max [ OK ] tls.recvmsg_single_max [ RUN ] tls.recvmsg_multiple [ OK ] tls.recvmsg_multiple [ RUN ] tls.single_send_multiple_recv [ OK ] tls.single_send_multiple_recv [ RUN ] tls.multiple_send_single_recv [ OK ] tls.multiple_send_single_recv [ RUN ] tls.recv_partial [ OK ] tls.recv_partial [ RUN ] tls.recv_nonblock [ OK ] tls.recv_nonblock [ RUN ] tls.recv_peek [ OK ] tls.recv_peek [ RUN ] tls.recv_peek_multiple [ OK ] tls.recv_peek_multiple [ RUN ] tls.recv_peek_large_buf_mult_recs tls.c:524:tls.recv_peek_large_buf_mult_recs:Expected memcmp(test_str, buf, len) (18446744073709551595) == 0 (0) tls.recv_peek_large_buf_mult_recs: Test failed at step #8 [ FAIL ] tls.recv_peek_large_buf_mult_recs [ RUN ] tls.pollin [ OK ] tls.pollin [ RUN ] tls.poll_wait [ OK ] tls.poll_wait [ RUN ] tls.blocking [ OK ] tls.blocking [ RUN ] tls.nonblocking [ OK ] tls.nonblocking [ RUN ] tls.control_msg [ OK ] tls.control_msg [==========] 27 / 28 tests passed. [ FAILED ] Here's what the recvfrom() with MSG_PEEK sees: [pid 2602] socket(AF_INET, SOCK_STREAM, IPPROTO_IP) = 3 [pid 2602] socket(AF_INET, SOCK_STREAM, IPPROTO_IP) = 4 [pid 2602] bind(4, {sa_family=AF_INET, sin_port=htons(0), sin_addr=inet_addr("0.0.0.0")}, 16) = 0 [pid 2602] listen(4, 10) = 0 [pid 2602] getsockname(4, {sa_family=AF_INET, sin_port=htons(41483), sin_addr=inet_addr("0.0.0.0")}, [16]) = 0 [pid 2602] connect(3, {sa_family=AF_INET, sin_port=htons(41483), sin_addr=inet_addr("0.0.0.0")}, 16) = 0 [pid 2602] setsockopt(3, SOL_TCP, 0x1f /* TCP_??? */, [7564404], 4) = 0 [pid 2602] setsockopt(3, 0x11a /* SOL_?? */, 1, "\3\0033\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 40) = 0 [pid 2602] accept(4, {sa_family=AF_INET, sin_port=htons(46290), sin_addr=inet_addr("127.0.0.1")}, [16]) = 5 [pid 2602] setsockopt(5, SOL_TCP, 0x1f /* TCP_??? */, [7564404], 4) = 0 [pid 2602] setsockopt(5, 0x11a /* SOL_?? */, 2, "\3\0033\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 40) = 0 [pid 2602] close(4) = 0 [pid 2602] sendto(3, "test_read_peek", 14, 0, NULL, 0) = 14 [pid 2602] sendto(3, "_mult_recs\0", 11, 0, NULL, 0) = 11 [pid 2602] recvfrom(5, "test_read_peektest_read_peektest"..., 64, MSG_PEEK, NULL, NULL) = 64 [pid 2602] write(2, "tls.c:526:tls.recv_peek_large_bu"..., 112tls.c:526:tls.recv_peek_large_buf_mult_recs:Expected memcmp(test_str, buf, len) (18446744073709551595) == 0 (0) ) = 112 [pid 2602] close(3) = 0 [pid 2602] close(5) = 0 [pid 2602] exit_group(8) = ? Reason for the "test_read_peektest_read_peektest[...]" is because MSG_PEEK cannot call tls_sw_advance_skb(), since the skb is sitting there that needs to be consumed for non-MSG_PEEK case, and only then we can advance it. Could you elaborate on where you ever had this test succeeding? With nxp accelerator? Thanks, Daniel