Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp495295img; Mon, 18 Mar 2019 07:46:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqyiuTZfxkeAWmsplJkfDWZYKZG77ikM/MftCefDmxvxtZeFg0Ham8S8ADP4FZ6CbpjLH9EP X-Received: by 2002:a63:7503:: with SMTP id q3mr16892196pgc.98.1552920364451; Mon, 18 Mar 2019 07:46:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552920364; cv=none; d=google.com; s=arc-20160816; b=zribsW0ani/7PfK8NfTNLtNfOfABHzTv9+Vi5WmlVo7lS1YnI0oDx3YAd81u2mNGNP SmBOkFM1Me8C/j6rKwEd9TwE+VsS98LsAsZUjzOiRagizlgSiTHlRP7+5Vk9wGFCDfHq 3cpfc+njJNeI++n2UGQPeuYDYVY8adS77vAP4vbiDh4Lyz6X3JTx/x7chG3SXdbWHoy/ V3+8cJl+oIHVw3TyyEMY+A/ZZRpvU+smjOHV7fouQe6ZPwNLBJ3fv58ypuQIGvN8e17B coRQwpivLmwIB1QvJoDpH/8LZtN13151hZlqqEYWu7WxcKBa2f8QFiXPKWvWcpaqjT7c bSxg== 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=/+Gencg0JswbAigLpd/T2ItS1NnphPhR+c6rD3BwH/4=; b=XZqm2HXNFmfIms6xhwfGIxfb+xh2R9JVR6yKcxi6lRDw3MLWsl/8o29386CpKwuKVc EMYcV+8C+zRDxu8MxEWffqueVZq68nXUvUltHY/cSIwhohTd0t7NgOBt7Se1kdO62NFT w+WAPVe5Eg3TFb1x1Yyt6tzLNTtwhJx+8gQ2KeIV1+QtNO9HcwDm7jV0pW5YxAVVndRQ PbSS+TQmuP16tfgWMo+n+mEe+oDVdEmv0GpuKN8A8z2Tdq4ByBFMCgrbzVntQwYKIqaX 0ELckb0G5GjBrdk6d2Z4ll0UEQTHjksSwzqR9H/yeJRKuGdqJlqDnABoi7qWOBxZPU5S ybfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="eUd7YMW/"; 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 y15si9266080plr.96.2019.03.18.07.45.48; Mon, 18 Mar 2019 07:46:04 -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="eUd7YMW/"; 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 S1727779AbfCROpF (ORCPT + 99 others); Mon, 18 Mar 2019 10:45:05 -0400 Received: from mail-yw1-f67.google.com ([209.85.161.67]:32983 "EHLO mail-yw1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727481AbfCROpF (ORCPT ); Mon, 18 Mar 2019 10:45:05 -0400 Received: by mail-yw1-f67.google.com with SMTP id a199so13110622ywa.0 for ; Mon, 18 Mar 2019 07:45:04 -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=/+Gencg0JswbAigLpd/T2ItS1NnphPhR+c6rD3BwH/4=; b=eUd7YMW/iwbeqVYkUaaw/cUWk71SOkrkn+hXu01mjWUDyol7Y3918h8Me2N/Lmwg82 BACBnVwkosRYGgNkB+MEv3CCkEWOrHu3xf7N5dwYHmmMELnYsQNqsOaeyK88/Ckff/ef kh+B6RhAXAgdrluebHSVHeJbDqxICihTurm6Izpbs8uJk/KpMx9fOP+CQm89PWz1so10 k5Hy+rI3GiWNLVnAFbpLH1eywVv8873JwRYu/a9tdS5LPAoqYign21IdkWCo14GRLZpi +1s6lB6RpgPoZI0uN8BuvtNMRbB8sYv/Hh/TeFFlme7Oddb+rSFYGGHMaF7cYJURP6Fs tbhg== 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=/+Gencg0JswbAigLpd/T2ItS1NnphPhR+c6rD3BwH/4=; b=ZqjoZQWLQIluUoqHwnF3Etj8/8SVg8pyTrjyUvDMwhXAwwiIH3aB1PXD8/2QAFI2Za fEZkmBMZq4qu5jcfgkLvGQlSPK06XLpEpmDTxx1qx0VC0XHK5IyQ6/RB4MS9AP/RhH8m lLrgO2JWrTtWJPeXiXc7wivheLuXE6SLUAhbZh1WXvyFuFtxQpSMabHDV0loy/b2r3X7 Jl1YnktQb+bzKhA3T3lqjZ42iSp5AeBzDUvcYkN2lUiq6oaVCgUCKZovtZ1+gr0otAsF yDhQbJdmGv2wFxbFxxyCNQ3tQgerzHTpbIo0C1D9bzcdr1ZeXZQILtcP1ezPtn6gWsUF Sl5Q== X-Gm-Message-State: APjAAAVkkM3vF9/PdNgyc28dHIQXUXLam+PMznQhFS+13JRvhvIPOvAt zVNqdmfyffW5IHL04M6BlOE66uzIENiHoWM8Ei6ToQ== X-Received: by 2002:a81:2843:: with SMTP id o64mr13821364ywo.441.1552920303807; Mon, 18 Mar 2019 07:45:03 -0700 (PDT) MIME-Version: 1.0 References: <56d3373c1c5007d776fcd5de4523f4b9da341fb6.1552679409.git.andreyknvl@google.com> <04c5b2de-7fde-7625-9d42-228160879ea0@gmail.com> In-Reply-To: From: Eric Dumazet Date: Mon, 18 Mar 2019 07:44:52 -0700 Message-ID: Subject: Re: [PATCH v11 08/14] net, arm64: untag user pointers in tcp_zerocopy_receive To: Andrey Konovalov 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 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 */ };