Received: by 2002:ac0:a874:0:0:0:0:0 with SMTP id c49csp732718ima; Fri, 15 Mar 2019 12:53:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqyq6G3+siNHlf9L1TuGMuDlaQaL7XmxqATjgjpIQ4zfZm9JPqW8RmAFSRHuPgD5xaCSeNDD X-Received: by 2002:a17:902:6b05:: with SMTP id o5mr6089448plk.90.1552679594329; Fri, 15 Mar 2019 12:53:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552679594; cv=none; d=google.com; s=arc-20160816; b=G4AgMJHfncBvk78jjTSiaLph7+pkr6bLH72bHy/iktiTzfs7YQl520o//xIhmbThIp E8q8e9UDlzLRMj0rdCuNDZy1oRHcqkUhDHlVsP8Qr+KHf8PY3kT9QFimRuLMlCjZzH6g wjYxDSzX0gftn20RP/cGYo/94OVmJlqKgn4Hi7notewQBRIth7fknpCXxKRR/sCb7LGK 7cFjlHJ7SEl+Lcn/PWP9zvqipgdWwuNhDT8gfCmyI/dezdxNzAZD3rU8hCBb5+WLbngn V+iVdWQpYJ0xC2ThBdCP+08KUAQUk/Drfzg5BrNEa5X0P+baZIkveqXhPZudAtAAhOcZ IROA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:from:subject:references :mime-version:message-id:in-reply-to:date:dkim-signature; bh=o99IPl+uG2EzV+A51yAxAJoGFkhXN8vGRgmKAMdYgSA=; b=PSsifu8cEoyCuWVR+hVZTADhp/mWjGFh1H2cU2tffkdvBn+H+s41arNUsvwW8miHww gR+DQXinTCaRKh4uIwOMflYoOz4HjK6UP76cJHKieL27/YIctQ216Hc5S0jQDzu+dKTV dJj+o8awwXUqfZ9MhZm/sbycsJcr1X3V1lAos8LgO/GSAMTZds7VX/Wo45Pp/obm8w4k 8mtF49xfITuHqOBaziV3Kcpra51DwDhuleUMZsoYcc9jATP/i7ch7Q2tP8j7mlP48HE8 YffoT5I/1Rtyz761eTuUjky8TZXQNMo3jhsoc61bh/r2c8F95YjrhNlT8IRaziMjYRQ8 HSOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=qeml8KMl; 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 v2si2585659pga.5.2019.03.15.12.52.58; Fri, 15 Mar 2019 12:53:14 -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=qeml8KMl; 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 S1727490AbfCOTwN (ORCPT + 99 others); Fri, 15 Mar 2019 15:52:13 -0400 Received: from mail-oi1-f202.google.com ([209.85.167.202]:48637 "EHLO mail-oi1-f202.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727453AbfCOTwK (ORCPT ); Fri, 15 Mar 2019 15:52:10 -0400 Received: by mail-oi1-f202.google.com with SMTP id p65so4479482oib.15 for ; Fri, 15 Mar 2019 12:52:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=o99IPl+uG2EzV+A51yAxAJoGFkhXN8vGRgmKAMdYgSA=; b=qeml8KMlP7rmAvIxGUwmqXR6s58tv3WFmWASkki2NWsIADrbc1k8lfVc0+MTWbLpzs TVLOcfO6bk+g3/mT4x135nyZgaRh/a1cI0EJSPVigzGsRAp8PAEjxUHPFZAzqhmXZx4l 8Q3KL5oxK5OHSh9sOaBJzftYgvN7gNgSHSwrNoWatq8tKEtYq3SVrekzbwazA+QWLKeH U6r1Zznc3OnEUZ0dR61U5DX56ScUlBeamodtGHalBVARU3JboxCMy3bCQIt/yf/PIiTQ 7ti2uUkzpKUEL7B+2/dvfA9GvioOMJDdEfC7KsiAuJ+0KTfpgnd+IOQxpTKu3Bl4+qOo qSqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=o99IPl+uG2EzV+A51yAxAJoGFkhXN8vGRgmKAMdYgSA=; b=NvDIMV1/6Qw1NYePoGYZlVTp+lsEoGKvemO0vV6RZb/TNAI3vGoRf3fRS5znR9X18+ UrX3flkJjaCEaYCER0I/BJArpeoeG1GmC/RxtI0Ega7ccyBcZQFXIQRXwIlzVEnRTODq xH2EBFJDpvD0BVOyAkS8nxQsnuA30xCbZY3L5dU1ZwNv0r80ACl43UpxJUEDQPLNwX/q eUGjg7MFQDr5WNDF9heP2Ge8DqWFk9etho9MdLDG2HjwMZi52bwUBUSgcdh7zihr3PGi ckh5z8NTWYClbLVqqNQ/vcimGQCjVuk7eh2mJDDt6YHjvC5/V7AvRhNoL2gPJa3pANY0 DMVg== X-Gm-Message-State: APjAAAV3sAy+ytyY7TCuUILFdqigpqIZuRlpB6lxZWrfdLVCWQ7aS7e7 f8Tl53V1zLSvMML2Xnshsraep8l1T4TArFQ2 X-Received: by 2002:aca:2409:: with SMTP id n9mr3111631oic.19.1552679529309; Fri, 15 Mar 2019 12:52:09 -0700 (PDT) Date: Fri, 15 Mar 2019 20:51:32 +0100 In-Reply-To: Message-Id: <56d3373c1c5007d776fcd5de4523f4b9da341fb6.1552679409.git.andreyknvl@google.com> Mime-Version: 1.0 References: X-Mailer: git-send-email 2.21.0.360.g471c308f928-goog Subject: [PATCH v11 08/14] net, arm64: untag user pointers in tcp_zerocopy_receive From: Andrey Konovalov To: 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 , Eric Dumazet , "David S. Miller" , Alexei Starovoitov , Daniel Borkmann , Steven Rostedt , Ingo Molnar , Peter Zijlstra , Arnaldo Carvalho de Melo , linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-mm@kvack.org, linux-arch@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Cc: 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 , Andrey Konovalov 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 This patch is a part of a series that extends arm64 kernel ABI to allow to pass tagged user pointers (with the top byte set to something else other than 0x00) as syscall arguments. tcp_zerocopy_receive() uses provided user pointers for vma lookups, which can only by done with untagged pointers. Untag user pointers in this function. Signed-off-by: Andrey Konovalov --- net/ipv4/tcp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 6baa6dc1b13b..89db3b4fc753 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c @@ -1758,6 +1758,8 @@ static int tcp_zerocopy_receive(struct sock *sk, int inq; int ret; + address = untagged_addr(address); + if (address & (PAGE_SIZE - 1) || address != zc->address) return -EINVAL; -- 2.21.0.360.g471c308f928-goog