Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp4585353imm; Mon, 17 Sep 2018 17:12:00 -0700 (PDT) X-Google-Smtp-Source: ANB0VdavbFb6NLBDwM1XuC7MFPd0hCeloENHTQn7JmtPwnixX97WwpGhlgl7PPq5ODnGQXsvwvx/ X-Received: by 2002:a62:1c0a:: with SMTP id c10-v6mr28395380pfc.41.1537229520707; Mon, 17 Sep 2018 17:12:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537229520; cv=none; d=google.com; s=arc-20160816; b=kZPxnoHWycNFC7coSMHefaVpO0nW25LMqfNeZdZtyQBe4RQ7mNRBQlNj3gqnNcPtIR bj+jQMaPZGnOp1UjBLliZ/Bf1xtefXfDBOM5Sef7C0ur/adz1lgPFLaGR2ZS7rtPNcm9 LcP1dIUfrgtzHOndKFHo5hC06MpBLsw2jObJX77zUx/bhjTkxRn0ijZCoDUrhBRRVcJu jKRao2fihLTZ2h4vM3/tBspZfEqwMQBis9jKmI7/rltQN9tin+LqlYGR4hM3ZPMesKUV Nj3xxqC/fh5jbjiP6xxfSaOpHIzvzcNUGmbbMniHgb7O1mM0MZ8/Qem2CKSO3pqf3BrW 88Cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:subject:cc:to :from:date:dkim-signature; bh=pauCh1KftlHSGzME39f7FE+zMMXf+vf8vMcE4Z+1HFU=; b=rBzPXX1YZccmenXS1tN0jVPipwIQMkt6krzZOGWjBX+wnvqcwoG4ncuW/MfYEe6x1L ZT9HAvIEiW8q1eU1AngnrCnWvPQWDVlvsOvF/SajdJ7ZKy23lkzH0m7tya0wCI1vzMzh TRbm2xc16/dbN3IsTII3P3pHizN027/vMsHHabfLXuh199akNrK1ydQWKeYNiN9QeVCa uIfPowjSAOl0xS9iI7XlR/+T0jxAT16M0drC0EMv1XfWPAxcKlf2xl/3T4JbBXELFD20 JYdcFTUNIz4E+DIB9bN8lxQb+snFZfJrfEfGwIML29Z127u4kS80TeLl/Gwrx0so9gZD xt6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canb.auug.org.au header.s=201702 header.b=gjTAn8lv; 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 t14-v6si16971004pga.583.2018.09.17.17.11.44; Mon, 17 Sep 2018 17:12:00 -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; dkim=pass header.i=@canb.auug.org.au header.s=201702 header.b=gjTAn8lv; 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 S1728912AbeIRFlP (ORCPT + 99 others); Tue, 18 Sep 2018 01:41:15 -0400 Received: from ozlabs.org ([203.11.71.1]:40535 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727294AbeIRFlO (ORCPT ); Tue, 18 Sep 2018 01:41:14 -0400 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPSA id 42Dk1R5qz2z9sBv; Tue, 18 Sep 2018 10:11:23 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=canb.auug.org.au DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=canb.auug.org.au; s=201702; t=1537229484; bh=Xq2BnsrY+hNh9j+xEgV++sfiq0oQyxiyjTTepg6ERN0=; h=Date:From:To:Cc:Subject:From; b=gjTAn8lvurr5KMivHL33MeqoUMSk6rzobAHLlltMd/4tDw3A+LFWnAzfCTwJ7Z4h2 pHYR0cBJvyWucAB/0tdoARbLtM9uPvGWm9s09iz+AhJQlI/YPc0/xsF065inxFtqwq ziOxnCf1gpYPRfvwZEuoaKUn8ChblJ4EGAHKh2ae7nZDorgvpV6ij8RwLjkm864K94 XxKywbIwEjPbCShwimAXMLAuQ6KvJIxScInRTp9ZEBE9MQDJbTw9yFwIvuiD967zT5 BU1JBY1Ormey/G0s1yAgYh6bE6b3t+mmSyH7Lyiw71ibCcvDixPSwVukhBOs0iZ6RD oTcbCCWD+XMyg== Date: Tue, 18 Sep 2018 10:11:07 +1000 From: Stephen Rothwell To: David Miller , Networking Cc: Linux-Next Mailing List , Linux Kernel Mailing List , Daniel Borkmann , Vakul Garg Subject: linux-next: manual merge of the net-next tree with the net tree Message-ID: <20180918101107.74d8689a@canb.auug.org.au> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/gk.xrKYo+V8dzSowvoh9sfc"; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --Sig_/gk.xrKYo+V8dzSowvoh9sfc Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable 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 mul= tiple 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. --=20 Cheers, Stephen Rothwell diff --cc tools/testing/selftests/net/tls.c index 8fdfeafaf8c0,96fc6fe70293..000000000000 --- a/tools/testing/selftests/net/tls.c +++ b/tools/testing/selftests/net/tls.c @@@ -502,55 -502,28 +502,77 @@@ TEST_F(tls, recv_peek_multiple EXPECT_EQ(memcmp(test_str, buf, send_len), 0); } =20 +TEST_F(tls, recv_peek_multiple_records) +{ + char const *test_str =3D "test_read_peek_mult_recs"; + char const *test_str_first =3D "test_read_peek"; + char const *test_str_second =3D "_mult_recs"; + int len; + char buf[64]; + + len =3D strlen(test_str_first); + EXPECT_EQ(send(self->fd, test_str_first, len, 0), len); + + len =3D strlen(test_str_second) + 1; + EXPECT_EQ(send(self->fd, test_str_second, len, 0), len); + + len =3D sizeof(buf); + memset(buf, 0, len); + EXPECT_NE(recv(self->cfd, buf, len, MSG_PEEK), -1); + + /* MSG_PEEK can only peek into the current record. */ + len =3D strlen(test_str_first) + 1; + EXPECT_EQ(memcmp(test_str_first, buf, len), 0); + + len =3D sizeof(buf); + memset(buf, 0, len); + EXPECT_NE(recv(self->cfd, buf, len, 0), -1); + + /* Non-MSG_PEEK will advance strparser (and therefore record) + * however. + */ + len =3D strlen(test_str) + 1; + EXPECT_EQ(memcmp(test_str, buf, len), 0); + + /* MSG_MORE will hold current record open, so later MSG_PEEK + * will see everything. + */ + len =3D strlen(test_str_first); + EXPECT_EQ(send(self->fd, test_str_first, len, MSG_MORE), len); + + len =3D strlen(test_str_second) + 1; + EXPECT_EQ(send(self->fd, test_str_second, len, 0), len); + + len =3D sizeof(buf); + memset(buf, 0, len); + EXPECT_NE(recv(self->cfd, buf, len, MSG_PEEK), -1); + + len =3D strlen(test_str) + 1; + EXPECT_EQ(memcmp(test_str, buf, len), 0); +} + + TEST_F(tls, recv_peek_large_buf_mult_recs) + { + char const *test_str =3D "test_read_peek_mult_recs"; + char const *test_str_first =3D "test_read_peek"; + char const *test_str_second =3D "_mult_recs"; + int len; + char buf[64]; +=20 + len =3D strlen(test_str_first); + EXPECT_EQ(send(self->fd, test_str_first, len, 0), len); +=20 + len =3D strlen(test_str_second) + 1; + EXPECT_EQ(send(self->fd, test_str_second, len, 0), len); +=20 + len =3D sizeof(buf); + memset(buf, 0, len); + EXPECT_NE(recv(self->cfd, buf, len, MSG_PEEK), -1); +=20 + len =3D strlen(test_str) + 1; + EXPECT_EQ(memcmp(test_str, buf, len), 0); + } +=20 TEST_F(tls, pollin) { char const *test_str =3D "test_poll"; --Sig_/gk.xrKYo+V8dzSowvoh9sfc Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEENIC96giZ81tWdLgKAVBC80lX0GwFAlugQpsACgkQAVBC80lX 0Gz3EQf/UJDAfYgBYpPjUgDz82f+NRcBqrR/ekZfPvomH1PKo/d6tHibfGRW4VEX f1BEF2Qp5z7JmKfqToq6Yv5wqBV+m3Lfk9pn5QkzhPBRLHko/35ia/RubS2GBCYw qnyMGZtvA6nX4APzziHLhmWUDJDHrCw+2qAKA3VGWTnfI+DAFed6PdCnUX+jOYVz J0Tp1G6JDAWLpQZqKYMjjligl0agrRaLvXbVTw36lhAtuS45BPzpv8kZb+2KK1hU tJIAOuK+RB2bT+jl7jn75LhsdVqfkmzgpJc+cGVG2fWJQauZQYXCKym+wc3gZQCw qSJfixe1ozp58yU1SLC8Y7Ydwtoirw== =Mcd3 -----END PGP SIGNATURE----- --Sig_/gk.xrKYo+V8dzSowvoh9sfc--