Received: by 10.192.165.148 with SMTP id m20csp280508imm; Tue, 24 Apr 2018 22:28:50 -0700 (PDT) X-Google-Smtp-Source: AIpwx49feOrthiSvwEwuBIpR+PLMov+N3WB6+EOyaMA79Bmn1R/V03Eq+7QHbqrRWIDUyjFmgEOl X-Received: by 10.98.186.26 with SMTP id k26mr26861354pff.195.1524634130427; Tue, 24 Apr 2018 22:28:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524634130; cv=none; d=google.com; s=arc-20160816; b=Mab+pH+YtpfHK6hikUrL0Z9RNZGzh1+cYXorQWdS8nAd1FvymHjFnTt4VXwAN/R5Gp +hn3Mh09EXnFA7uZ49a96YBLXn4EYdumHLs1QXOYZwcE09Z0Whxf65X+k5JJX19SUuYd AQS77REs99Yzi9E9a8cCUrt8BCdNRVzYJOycGAT6ugFzypl1RrxZlOmUsNA8Nvlj2QkH W+dK8Ggo32/BPoLmGv0C29oiLkMj4IGV0kygZR3nC6vNjxt64ufUTnzmO+MkqeaxSywu rDOAMWhTCURYAMj8xuFC79AGWA+Gy3mNyWtfJGtwnvD9zO0IfClHyMvfWkdsLgq1nSoZ ZPwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=jvQ18/KeCisNHI5Mf1g0V0LWEs7l2ZkTXJaF4XbmLk8=; b=TvUXKMz2f0xceMNKDJrXur9m3L6blvPbENU8T4FkaZoZJTM0sBJcCtnVQ8HSrp++fX dl7M/nqcpM3ZsYkb4fxCzwF0Rc7Un6ptx6NKjQ18iNeCANQAeu+M/n9Lq9zP5fXKqM2F h3l3hNoZyWA0D+eb+EVxZMS77zs5DqCpXYLhDov7/RoTWqdjXWeYhFaFKuCXghf7nXzK GS9JbrQJsKFd730ZJipGlsuYlPYANI9FqeUFS5T2AMfgOT6I/ABcQlQQQVu2LysNIaHl og/minXW663fWg4Hdl7DlWQTcCZ9Amz9YKoj5oEpPY8aK34zjHbARsWKGRzpXg2fLfom 5B2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=K85NG9gD; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g18-v6si15309047plo.586.2018.04.24.22.28.35; Tue, 24 Apr 2018 22:28: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; dkim=pass header.i=@google.com header.s=20161025 header.b=K85NG9gD; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751084AbeDYF1a (ORCPT + 99 others); Wed, 25 Apr 2018 01:27:30 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:33558 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750888AbeDYF12 (ORCPT ); Wed, 25 Apr 2018 01:27:28 -0400 Received: by mail-wm0-f66.google.com with SMTP id x12so3075996wmc.0 for ; Tue, 24 Apr 2018 22:27:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=jvQ18/KeCisNHI5Mf1g0V0LWEs7l2ZkTXJaF4XbmLk8=; b=K85NG9gD0y+NyLCDXTpPCmbCRel40qvOSkRI+AFgBflg6nHN9knQ72DLWO2Bu0HNVk f4vLnC5UHY6q+iEyiRWCCSG9ylcexNn0aWkbaX4mlJe8R4R/OGt2vUEZ0eiwaqIrYX+E BJmFr4L62pnSCX48eb5NUEklBTlbus+ReyijveFrEMur0pkMhqqRlMysYGV9iseNEuY2 ajCzwDpXZJ5k3IY5i3UB/1qjdBJ65C4Q/YLGy2+J3tRnZVCBocoG/+/NPIYrlZaM9yQ0 p49WGoYJAw+sjyAW9TMZemZ8B2m/rPzhhAxYOMLTPxOgNc44WTsMCGmKtsJ9g+iy8F3n VDQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=jvQ18/KeCisNHI5Mf1g0V0LWEs7l2ZkTXJaF4XbmLk8=; b=gdNnF44Kq51rdM3pVsY1sOeij3yF4oxaO41vWwsCubdi+eVF6gcBj7EoBYSy4YFOgi Pp2K/RiyDBqIlyRdBlhX3M8LG0o+/8c42DirMZ1bMDjd/rMZtCe3u+/5OT88yTcFoF1J WSXA+TeJcDs9YtgCnkqaK355nifDxveh6duLOFxQiWuuZYE2QIa+CZGX2LWaL47YMZrn mDeJm/Gr4FOqMynVT/ZXYP/3M9ySPvlAv41/C+Z1SmaaI9rQguA4Sl/aOzxTtmV2Vwky zfiOuY812VZF+Fw6aCjpjGtdxOgLADTyC2AEEMCC9wz2GO5YOHEjwpY9PYRidfnFg6ul guVA== X-Gm-Message-State: ALQs6tAETq6gdiad+syNqLmuOySXZN0UNqhImJ0RtGu2hz+3b+aDbpD1 498X3AYBwb7kI432HkEukyQNwA== X-Received: by 10.28.51.79 with SMTP id z76mr15189385wmz.113.1524634047176; Tue, 24 Apr 2018 22:27:27 -0700 (PDT) Received: from localhost ([2620:15c:2c4:201:f5a:7eca:440a:3ead]) by smtp.gmail.com with ESMTPSA id 39-v6sm25641040wry.89.2018.04.24.22.27.25 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 24 Apr 2018 22:27:26 -0700 (PDT) From: Eric Dumazet To: "David S . Miller" Cc: netdev , Andy Lutomirski , linux-kernel , linux-mm , Soheil Hassas Yeganeh , Eric Dumazet , Eric Dumazet Subject: [PATCH net-next 0/2] tcp: mmap: rework zerocopy receive Date: Tue, 24 Apr 2018 22:27:20 -0700 Message-Id: <20180425052722.73022-1-edumazet@google.com> X-Mailer: git-send-email 2.17.0.484.g0c8726318c-goog Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org syzbot reported a lockdep issue caused by tcp mmap() support. I implemented Andy Lutomirski nice suggestions to resolve the issue and increase scalability as well. First patch is adding a new setsockopt() operation and changes mmap() behavior. Second patch changes tcp_mmap reference program. Eric Dumazet (2): tcp: add TCP_ZEROCOPY_RECEIVE support for zerocopy receive selftests: net: tcp_mmap must use TCP_ZEROCOPY_RECEIVE include/uapi/linux/tcp.h | 8 ++ net/ipv4/tcp.c | 186 +++++++++++++------------ tools/testing/selftests/net/tcp_mmap.c | 63 +++++---- 3 files changed, 139 insertions(+), 118 deletions(-) -- 2.17.0.484.g0c8726318c-goog