From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SIGNED_OFF_BY,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8BDE2C282C0 for ; Fri, 25 Jan 2019 17:06:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5450A218CD for ; Fri, 25 Jan 2019 17:06:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="pAYUWNMu" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729060AbfAYRGc (ORCPT ); Fri, 25 Jan 2019 12:06:32 -0500 Received: from mail-pg1-f193.google.com ([209.85.215.193]:43176 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726311AbfAYRGc (ORCPT ); Fri, 25 Jan 2019 12:06:32 -0500 Received: by mail-pg1-f193.google.com with SMTP id v28so4442865pgk.10 for ; Fri, 25 Jan 2019 09:06:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=3yUnnQ0MyonKS4jb8dAhHgWjJyjj7g/EcXFOGw2k5KE=; b=pAYUWNMu1sL2+M2PDtOBOwlXWLUl+mqJts86EKz/89TGqPv7C3oligvA0YeVIogQH3 3GbaYxGNcZY9r2D1IV5cwrdvcsVYPPKjdJqvWJfEF3+q9TtavopkF+ja1CbLEO1i+gZ7 bEcXQFMeOC88pghA/1QZIrjPgJb/jp4yqcIcCzFa66Vco+FZoU+2ukwuQH5CJs3uQWdF P1gVjiTaH7/IU1Hp0uKop9UpRHya4QUC/VphyTqELSka4hdnlgId6dfCD7nAYQEeHOkK JF6NxbxVR07e4jm/VPmUcvCSdA2O5MFNEutWmd4aqZujXupa70mKBQw0Fpq0bbh81/WU gDeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=3yUnnQ0MyonKS4jb8dAhHgWjJyjj7g/EcXFOGw2k5KE=; b=MkZk8vhyI1tkU55LUOwlsyW92T3d7XZnb9V/70juFcpWgr9sX+CyEpgUAESLngCmth tkq7IPPf6avZXzCYfw/YPhxzbQQWXkC38FIunEWWG+zD227bWjKCJbehr4Ibxls/IBX+ +A4bI2o6NhhntVHWCmGnjBESOsidECeF+yUYEOx38WUQiNTBG7dG+kZBubkS2oKWj4QF Wcm+A5GxnFLQcxKqi8mHa0EN3O+lY7Q+oQyqZ+DX2PWF22RZSixleuhARDPZN2XWmo6g CVp0xdX53vkbqOEOoeOpiEQqcYR2OkEm+jwWm6zYYJ3goizmnknI3E9qsUXX7XmrmyAf uoAw== X-Gm-Message-State: AJcUukfo1duxR1ULHtl4rKugyi6DVieelHORC6Z3o4P6SACE8/8R1J5V JeTupPnz71/3DKmIxozebMw= X-Google-Smtp-Source: ALg8bN66u8W0c/SIgkR16Bx444BFp8/+RjByKcMFfWs2cuemdwB0Uynzy1Ck1Ozrh5+azQTA+GM/Gg== X-Received: by 2002:a63:7512:: with SMTP id q18mr9816100pgc.231.1548435991513; Fri, 25 Jan 2019 09:06:31 -0800 (PST) Received: from ?IPv6:2620:15c:2c1:200:55c7:81e6:c7d8:94b? ([2620:15c:2c1:200:55c7:81e6:c7d8:94b]) by smtp.gmail.com with ESMTPSA id v184sm33245168pfb.182.2019.01.25.09.06.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 25 Jan 2019 09:06:30 -0800 (PST) Subject: Re: [PATCH net-next] tcp: allow zerocopy with fastopen To: Willem de Bruijn , netdev@vger.kernel.org Cc: davem@davemloft.net, ycheng@google.com, edumazet@google.com, alexey.kodanev@oracle.com, Willem de Bruijn References: <20190125161723.75429-1-willemdebruijn.kernel@gmail.com> From: Eric Dumazet Message-ID: <2f9ce7fa-15d2-0888-7583-bf7d00698617@gmail.com> Date: Fri, 25 Jan 2019 09:06:25 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20190125161723.75429-1-willemdebruijn.kernel@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 01/25/2019 08:17 AM, Willem de Bruijn wrote: > From: Willem de Bruijn > > Accept MSG_ZEROCOPY in all the TCP states that allow sendmsg. Remove > the explicit check for ESTABLISHED and CLOSE_WAIT states. > > This requires correctly handling zerocopy state (uarg, sk_zckey) in > all paths reachable from other TCP states. Such as the EPIPE case > in sk_stream_wait_connect, which a sendmsg() in incorrect state will > now hit. Most paths are already safe. > > Only extension needed is for TCP Fastopen active open. This can build > an skb with data in tcp_send_syn_data. Pass the uarg along with other > fastopen state, so that this skb also generates a zerocopy > notification on release. > > Tested with active and passive tcp fastopen packetdrill scripts at > https://github.com/wdebruij/packetdrill/commit/1747eef03d25a2404e8132817d0f1244fd6f129d > > Signed-off-by: Willem de Bruijn > --- Let see if syzkaller finds issues with this :) Signed-off-by: Eric Dumazet