Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp591241img; Mon, 18 Mar 2019 09:48:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqxCKRBu+R8IEe2619ujQrAFWNcb24JTCJWOgg+YEAphfy/0eKGra9QA7QVZGo3JpfyxZZgn X-Received: by 2002:a63:ed53:: with SMTP id m19mr863288pgk.78.1552927727608; Mon, 18 Mar 2019 09:48:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552927727; cv=none; d=google.com; s=arc-20160816; b=cJdbCqWREtNM15QqliQxDdidDM/3gV+3aJ5jMGHM91k0y6uWw0LrZ/ftYh22Iir2cH 1SNFP+Qn+NW4I42PvmWi54jaG/Xs6FKBLwLQOWndiRqQtm8Dz1SPV66+wH7RoY8RFcDS Wm1cE2wyH8j5GWhGK8lLSyOQYoNvX71nCnQc0Ia5RNyrwjfSH86S30parV0uMRIOuqSe aX8RblLCRP5xpRVP6Td45pPmZm8WOacYVZKJCruhQdjNu6pQqDX3gnOvqrAPfiwg/NCL sGTUWKb/j1svUGkBafPJwXGtLyB5j8He4uigCeyvSfr08JcymeECmtwVrE5JjxkrOQft cgyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=4jnBV7KXAwRH/SBiWunplsgAO5XC9ZDTjIPOKm8iM+g=; b=F8aRGa+KOci/ZZUvB+8gTVjkD1GaAxNswiQVZYotNgxn1eCFoIAvTqD6oh3BriwMUV vD4pOcPiVlb6nsvWYoxWf1V5CysFxOAWaku7ZztqoCxB+OJfbl/zdji4azvGfRxU8aUt bG9bJG7Rp7XFY9nBUBxeSa4nALXrF7++6BW9pbfiTdakqToyNk6YNZCzGj6wePOzI4iJ eQLWLBoxYOHEbPfliLUmnyK+5YSQk9njwa2drR5ksk+2lf7JVqKvEbPDBKIxxN00sEbg 5QxQftRqQGW/wC5BAjIWAWd2A8aZ3n2Fjx/uo9uX7879ruuyelDlZks3J07AwEjkz3C0 IpDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=oxnKC1Tg; 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 g32si9628367pgg.223.2019.03.18.09.48.31; Mon, 18 Mar 2019 09:48:47 -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=oxnKC1Tg; 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 S1727457AbfCRQJB (ORCPT + 99 others); Mon, 18 Mar 2019 12:09:01 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:36146 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726958AbfCRQJA (ORCPT ); Mon, 18 Mar 2019 12:09:00 -0400 Received: by mail-pg1-f194.google.com with SMTP id r124so11723218pgr.3 for ; Mon, 18 Mar 2019 09:08:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=4jnBV7KXAwRH/SBiWunplsgAO5XC9ZDTjIPOKm8iM+g=; b=oxnKC1TgVy0AfRUFzdhntQ4TnaWjo/dHSXwb/USSzN9iByb1J8qb9RNkXwR6mHS+mw U0ldrfn6mRkKtGFn2Svuia32YqyzgHr8lgGpA8Ip0euwMX1zgcj9IEez46oWi1IBddSU gwBvQTSUaqVbn9YXiSr6jTBOA8Xv5UO8CN9pXByf2+OfL6o1mjVRgyqe5P+Xg2G+PiCf NrrQ0yX3K59cnkolhi014Qa1wO07CtueVQk+/0EtrVmsp+hp6aDS9QuNbVuDWXjtk1vJ lpuGAyImKDa6JNaKflwTKUzEOC9JqWe+LJv/B30MBc7OlHCI7rVxIEK1sErhlvMqw4PK B6tw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=4jnBV7KXAwRH/SBiWunplsgAO5XC9ZDTjIPOKm8iM+g=; b=tFEiwsNVg6kuOhLAU7wIC2V2Nlin1P6Zg406KHwEFUl8nrkYR3hpuwVV33s5C3Sq/a vr2yUFJ5KgYxy2pqmSIpFU2y3MUKr4rR5cIh1HYAt+bOsvfQbvRN6H1pl2fqHM0PAwHw UabskdU7HcBoEveC3r2uS034WHy082HK+nH3ZPx9PW1AUoZW21iMSZrMI9PM0OPqRHLO DZHVBmuj4CE0y1z8dWp/lJi90cHKH0tDhoRIFvGbPO274UQTQ+4AWaPxl9O2uXZnRpe7 6yHIcKAXaDb1iPYEmLDRsbcGz/SFW1ItQo1M6D7BFG0QXrCd8zYOyiQv65iAoZfDOdEF k+eA== X-Gm-Message-State: APjAAAVBv5d/PY/d7JSZjSzglTdfkILYY+KuaObZ72b/ftU1TOArfPck TMGC0JFPX1pkQ2eP3BCp56UJLMX4+Cn4gRLV/qXZxA== X-Received: by 2002:a62:4299:: with SMTP id h25mr19703730pfd.165.1552925338999; Mon, 18 Mar 2019 09:08:58 -0700 (PDT) MIME-Version: 1.0 References: <56d3373c1c5007d776fcd5de4523f4b9da341fb6.1552679409.git.andreyknvl@google.com> <04c5b2de-7fde-7625-9d42-228160879ea0@gmail.com> In-Reply-To: From: Andrey Konovalov Date: Mon, 18 Mar 2019 17:08:48 +0100 Message-ID: Subject: Re: [PATCH v11 08/14] net, arm64: untag user pointers in tcp_zerocopy_receive To: Eric Dumazet Cc: Eric Dumazet , Catalin Marinas , Will Deacon , Mark Rutland , Robin Murphy , Kees Cook , Kate Stewart , Greg Kroah-Hartman , Andrew Morton , Ingo Molnar , "Kirill A . Shutemov" , Shuah Khan , Vincenzo Frascino , "David S. Miller" , Alexei Starovoitov , Daniel Borkmann , Steven Rostedt , Ingo Molnar , Peter Zijlstra , Arnaldo Carvalho de Melo , Linux ARM , "open list:DOCUMENTATION" , Linux Memory Management List , linux-arch , netdev , bpf , "open list:KERNEL SELFTEST FRAMEWORK" , LKML , Dmitry Vyukov , Kostya Serebryany , Evgeniy Stepanov , Lee Smith , Ramana Radhakrishnan , Jacob Bramley , Ruben Ayrapetyan , Chintan Pandya , Luc Van Oostenryck , Dave Martin , Kevin Brodsky , Szabolcs Nagy Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 18, 2019 at 3:45 PM Eric Dumazet wrote: > > On Mon, Mar 18, 2019 at 6:17 AM Andrey Konovalov wrote: > > > > > Looking at the code, what's the point of this address != zc->address > > check? Should I just remove it? > > No you must not remove it. > > The test detects if a u64 ->unsigned long conversion might have truncated bits. > > Quite surprisingly some people still use 32bit kernels. > > The ABI is 64bit only, because we did not want to have yet another compat layer. > > struct tcp_zerocopy_receive { > __u64 address; /* in: address of mapping */ > __u32 length; /* in/out: number of bytes to map/mapped */ > __u32 recv_skip_hint; /* out: amount of bytes to skip */ > }; Ah, got it, thanks! I'll add a comment here then, otherwise this looks confusing.