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=-8.6 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=unavailable 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 4E626C10F00 for ; Mon, 18 Mar 2019 14:45:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1F3FE20850 for ; Mon, 18 Mar 2019 14:45:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="eUd7YMW/" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727815AbfCROpF (ORCPT ); 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-Google-Smtp-Source: APXvYqy/LrBuUxgMYxjRei67FuMQP0H17hpJ7z4CK4VwoXLf7Je3qt70qo9gwTM2VSIhDx1PncSnTBxTzploGurMk0s= 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 */ }; From mboxrd@z Thu Jan 1 00:00:00 1970 From: edumazet at google.com (Eric Dumazet) Date: Mon, 18 Mar 2019 07:44:52 -0700 Subject: [PATCH v11 08/14] net, arm64: untag user pointers in tcp_zerocopy_receive In-Reply-To: References: <56d3373c1c5007d776fcd5de4523f4b9da341fb6.1552679409.git.andreyknvl@google.com> <04c5b2de-7fde-7625-9d42-228160879ea0@gmail.com> Message-ID: 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 */ }; From mboxrd@z Thu Jan 1 00:00:00 1970 From: edumazet@google.com (Eric Dumazet) Date: Mon, 18 Mar 2019 07:44:52 -0700 Subject: [PATCH v11 08/14] net, arm64: untag user pointers in tcp_zerocopy_receive In-Reply-To: References: <56d3373c1c5007d776fcd5de4523f4b9da341fb6.1552679409.git.andreyknvl@google.com> <04c5b2de-7fde-7625-9d42-228160879ea0@gmail.com> Message-ID: Content-Type: text/plain; charset="UTF-8" Message-ID: <20190318144452.F6H8IsnQUiS8KK8U0H1FQw6mN7ml-TxJH8L8lqwfSIk@z> On Mon, Mar 18, 2019@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 */ }; From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Dumazet Subject: Re: [PATCH v11 08/14] net, arm64: untag user pointers in tcp_zerocopy_receive Date: Mon, 18 Mar 2019 07:44:52 -0700 Message-ID: References: <56d3373c1c5007d776fcd5de4523f4b9da341fb6.1552679409.git.andreyknvl@google.com> <04c5b2de-7fde-7625-9d42-228160879ea0@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org 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 List-Id: linux-arch.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 */ }; From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yw1-f66.google.com ([209.85.161.66]:38723 "EHLO mail-yw1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727573AbfCROpF (ORCPT ); Mon, 18 Mar 2019 10:45:05 -0400 Received: by mail-yw1-f66.google.com with SMTP id m207so13088986ywd.5 for ; Mon, 18 Mar 2019 07:45:05 -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 Content-Type: text/plain; charset="UTF-8" Sender: linux-arch-owner@vger.kernel.org List-ID: 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 Message-ID: <20190318144452.DPuSTFiZtRHJy5Eb16wd6exrYAFj8DclbSRsf6xgczc@z> 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 */ }; 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=-8.6 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_PASS,USER_IN_DEF_DKIM_WL 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 0CA3CC43381 for ; Mon, 18 Mar 2019 14:45:07 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B3B0820850 for ; Mon, 18 Mar 2019 14:45:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="eUd7YMW/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B3B0820850 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 3C4466B0005; Mon, 18 Mar 2019 10:45:06 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3732A6B0006; Mon, 18 Mar 2019 10:45:06 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 262C56B0007; Mon, 18 Mar 2019 10:45:06 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from mail-yw1-f69.google.com (mail-yw1-f69.google.com [209.85.161.69]) by kanga.kvack.org (Postfix) with ESMTP id EBE356B0005 for ; Mon, 18 Mar 2019 10:45:05 -0400 (EDT) Received: by mail-yw1-f69.google.com with SMTP id y129so22759368ywd.1 for ; Mon, 18 Mar 2019 07:45:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:mime-version:references :in-reply-to:from:date:message-id:subject:to:cc; bh=/+Gencg0JswbAigLpd/T2ItS1NnphPhR+c6rD3BwH/4=; b=VQSdfM4vDUj7ckc7QvJjQDbL0Ol9n0rTfxBxPWe1YGk2ATU+WU/XsTqd6F9+clvnO7 2t8nmEBZOR8V8E2PKw727+Obgx7LXLjgWRF9jUOfjxjvgUhIoULbceHleEpZVDJWcsUd F/4sV2Z3y9HX2khQliQ45lllBgvrZC7OQh9Xb9brYjxR2QMxJP06U5VjFaQSAxYcq4sX +KNHekyA9zXCyo1Wm/+8LEixYmP4qzn115rxyWg39l1xWL9IhHpcNfaJHUAD6ZJx+0Gs Xj0B1O3BJYWc0XYp0Z9pke4qIn8t/raBtjj5st99kQ0wi6iCtVYSBNU65RNy3TrJ7mmY OPCw== X-Gm-Message-State: APjAAAVdF9irokOivrGusIUuUmfRwN7kl4QRfg6RB6kYVCQEelHdR+O1 oFPhCnANI900nMSLO9htZX985qnozsqP2me2iqwUl1/9N9lOKxKvxkUt2t69M3bY5K1DxpeT6Ps M8n+sowPtIjD6ai3JwsG+O3Nr3nhZV6gGf+p5ggq0i8IXeLGhc8JH9HynV4EwnRQQMQ== X-Received: by 2002:a25:1341:: with SMTP id 62mr14516701ybt.402.1552920305653; Mon, 18 Mar 2019 07:45:05 -0700 (PDT) X-Received: by 2002:a25:1341:: with SMTP id 62mr14516644ybt.402.1552920304923; Mon, 18 Mar 2019 07:45:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552920304; cv=none; d=google.com; s=arc-20160816; b=VW0oqvwEIF042ESBTw4cBKM/O8qBXvcc9o/EKm59quTlyCfikZsUiWYaBNJM0doj4i c+B9vjdckwGOPmijxKlpLF+OWFU3Q8xYKMz8DltJTq9rvoRB2I/9vochUmY9e2qrsa6T PKalABbXkBdYdnokg92UonrR+odQtVCGOA2n9dpsXg/Qb5MRbeAEs66YHhfj/t/gTwYJ GOS4JWxvQD8meDg/KuIF25RTAANtaBzZmKOR+aWzChpGM8sASTlVCL/GNHEZTZJCAAbU qkJBN5g24npUF+yx8INOVBPgStnd05+Rm22ElC8XL44xFobHKnH7Ub9PIe+H4iCv2Gcd GuWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=/+Gencg0JswbAigLpd/T2ItS1NnphPhR+c6rD3BwH/4=; b=SwpwrydFETaR8GlI3IKPPdpxFXpXIOzXrbBwecmACNGsF/agL8Yo7X7adfqVvLfocT rHVY5nWeNgWb805kStxIRpehl88OinSjjdL9f4WXnfi0AQVhJ06Eb2MTDLQ/DorGc0Bu +g38gQMtigzIAOwZk4U2gUJMZTgxA7MDKTkCAjNfRWXJwfUUaWBXC/z3xhCEkPO/JMFs XB65OcJX+sA3K7sFe0XULP7UZT1NOkh0BF8TCQTouZDz0KrWVZiTtoiImz8+iFfxjVZT 7QahMwZll5WwFt8VzLdEoxrDcIE/5mRMtQ6J//PHzd8M7CSmBjUU+Dv2BWIFZZ520/R7 Cm2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="eUd7YMW/"; spf=pass (google.com: domain of edumazet@google.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=edumazet@google.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id q202sor559964ywg.190.2019.03.18.07.45.04 for (Google Transport Security); Mon, 18 Mar 2019 07:45:04 -0700 (PDT) Received-SPF: pass (google.com: domain of edumazet@google.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="eUd7YMW/"; spf=pass (google.com: domain of edumazet@google.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=edumazet@google.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com 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-Smtp-Source: APXvYqy/LrBuUxgMYxjRei67FuMQP0H17hpJ7z4CK4VwoXLf7Je3qt70qo9gwTM2VSIhDx1PncSnTBxTzploGurMk0s= 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" X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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 */ }; 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=-1.0 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED 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 55CE7C43381 for ; Mon, 18 Mar 2019 14:45:15 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 221CD20850 for ; Mon, 18 Mar 2019 14:45:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="u4z/8kAl"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="eUd7YMW/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 221CD20850 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=4FjGfxW9XkcreCFeqef2FO2KRCZG9QsP377H4hlY53s=; b=u4z/8kAllUv4BE 1Oj9qGcrbYmgN2jMDS8P3JZwXGYG2WSlmCaFLYlNjU/MWDBL/KxrSrMDSZKkg2Ypvco6k3h+euBvk Q2GCuXaMMlkRiDpC6y3D7HF93UMjsx9hSSBj9FAlVdjTKxOBwB1Ef0WoJDRj74J9NXPhV1xl1mDv0 iJESKImnhJQDIIEQ45PRD0BaFI9c3pT00biGwmlh1Hhp/pNBGZVzl+4zLlPOg+W+AAPpexVb2NZbi 4UcePYbIrgBCQ2dBI6679Z0Sx0nZ73+zW565fOPizShWw8Axq/Mexpmzz9LP6TdRI1q0bprM3m+Zn +hGmiYr9602dGPuUNCPQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h5tVm-0004Pq-Hp; Mon, 18 Mar 2019 14:45:10 +0000 Received: from mail-yw1-xc42.google.com ([2607:f8b0:4864:20::c42]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h5tVk-0003kG-C8 for linux-arm-kernel@lists.infradead.org; Mon, 18 Mar 2019 14:45:09 +0000 Received: by mail-yw1-xc42.google.com with SMTP id v127so12789405ywe.13 for ; Mon, 18 Mar 2019 07:45:05 -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=dkbpr8OhxCzSULEOBUkczekLRsjWwvlv4GAPWKAA5fxmtBoDHhTp6yciTbBaotzo3p gkAlfXNn6QkkST5yyvhAXnZfhrEY7Tzz7+seE+hvpXjQCxJewblmDQoGnDNuH24mS900 +vb6EG5zdyRVUt2Ws1PcRgso8aSEnsBK7eHMehiFNKCJkNh333soptzxZpnXb8xPLtSA Y6I4q3CSsYAONv1lrsDatsPLc4bbQl4g8m/cY/QWqLnP3La6AMIME47Uo0aZGugd4umZ gGGjcEm8Z77n2sHlcyjVeD1CB/sqad5u0RvOoYR756n1r5ij3GyxUU6L20iFC9noOeix TCXA== X-Gm-Message-State: APjAAAUXgV4cFYtnNU1PaoYDfoqpwIrimonnmaq0cVZBWg2i+y1NPvhn VgrCWHqyUKgh7oBCAglJuY4f0kM4vGpYMfhEIK8yNA== X-Google-Smtp-Source: APXvYqy/LrBuUxgMYxjRei67FuMQP0H17hpJ7z4CK4VwoXLf7Je3qt70qo9gwTM2VSIhDx1PncSnTBxTzploGurMk0s= 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190318_074508_438344_03FAC3DF X-CRM114-Status: GOOD ( 11.02 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Kate Stewart , "open list:DOCUMENTATION" , Peter Zijlstra , Catalin Marinas , Will Deacon , Alexei Starovoitov , Linux Memory Management List , "open list:KERNEL SELFTEST FRAMEWORK" , Chintan Pandya , Vincenzo Frascino , Shuah Khan , Ingo Molnar , linux-arch , Jacob Bramley , Daniel Borkmann , Szabolcs Nagy , Ingo Molnar , Dmitry Vyukov , Ramana Radhakrishnan , Dave Martin , Evgeniy Stepanov , Kevin Brodsky , Kees Cook , Ruben Ayrapetyan , Lee Smith , Steven Rostedt , Arnaldo Carvalho de Melo , bpf , Linux ARM , Eric Dumazet , Kostya Serebryany , Greg Kroah-Hartman , LKML , Luc Van Oostenryck , netdev , Andrew Morton , Robin Murphy , "David S. Miller" , "Kirill A . Shutemov" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.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 */ }; _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel