Received: by 2002:ac0:a679:0:0:0:0:0 with SMTP id p54csp1497566imp; Fri, 22 Feb 2019 04:55:10 -0800 (PST) X-Google-Smtp-Source: AHgI3IZ1qCi83yx8rGtyh6bs3xsRqgi2bV1iNk1S3en/xic7ZnnL5MnIvl0Qf+4hnuBLFTz7wIrG X-Received: by 2002:a65:6483:: with SMTP id e3mr3812262pgv.273.1550840110114; Fri, 22 Feb 2019 04:55:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550840110; cv=none; d=google.com; s=arc-20160816; b=SHMY8giLt9KpMwbW6jmIjXOhCNi+n63Vzf3Px3BTtnqj0eEC4JhhH0niiOMFYoFIhe p6APmkrbl+oiGZmbpNlLNyKLWJGAoNr/gw868yMmKnYja4yFNTOuNktHxA6p7tjqGop9 CXiTo70fDGnvCli+AKysT8ArcXncepIL9wnAUYhwRbhDk427+ndtDFnf6GdcLyTFbIEG 2o+lZ2+QiIq7/XLHuv6UuYLL5mcvXCzK8KcLfhVYxTzW+GLyuPyKDysBd8HMMA+ns0U0 XcdzLlvSUzM37POYi7CYtdaxobHmT3a1d+oIE6+eeDNMCQsOybKDE4YUmsLc7UkXCjR6 dXnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=9mSxyMmz1xjHsHJUyT/WYIPnpYi9SCNSb/qUJqV67bQ=; b=Ngx7xhuZ33MwBXDrERuUWiePOT1MqYi0KOXMzRV9g556b8P/yDV4HZsMTgisgA6WQw +e7CLUxzkCozjK/7puWMhMkxeFSpye8gX9wZluicaWff5l4AFyxBmgs7dAZ31LoCdXXW dZ4PzOGnfKoncHuB6XJUj7gZTiXTIc0K4cuq2eJleecLj7xmm/RfgwZu0udzR7Yi4Esh EzPj1fNN6TfIYRYx2Wj4QWY9Y6r21ComEpBaZuO/L4QxTL2mFMlSvaFfi/X4rXl42SGI KKUVFB0c2/dSfS537VUgSC7jQlIc1FS4dvC9h8b5BrLfkzTQkFf/rrYQewesXOpRZJEP jEZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=dFFShaLk; 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 a8si1378486ple.216.2019.02.22.04.54.55; Fri, 22 Feb 2019 04:55:10 -0800 (PST) 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=dFFShaLk; 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 S1727294AbfBVMyO (ORCPT + 99 others); Fri, 22 Feb 2019 07:54:14 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:40132 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727259AbfBVMxr (ORCPT ); Fri, 22 Feb 2019 07:53:47 -0500 Received: by mail-wr1-f66.google.com with SMTP id q1so2250128wrp.7 for ; Fri, 22 Feb 2019 04:53:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9mSxyMmz1xjHsHJUyT/WYIPnpYi9SCNSb/qUJqV67bQ=; b=dFFShaLkfC9Jd78NrGHT6+qV8Fa9yuKItk3VxryuG9FBzLyVutr/noYyEqX9rPsCPB 4FR/7879ajA8ORjVk4I07QF8PQLg274w2Q+K0O39R3Ga3Hhea7F4g92KaP8LM4y5+Hso eJt1r7agSQJ/Q7Cx/ewAN6NsplIo0lNiUtrymbVmaJov1lsCukOg7OdDCcVG/G6dymSR 5NrIRbGPjHAFt0tx/2kWNS9S69vHxnpOLSsET8RPCLmIYV5M4RxLn41hJi0rYK9TmjkN 4J4iqkL9iIltHwkRu+ZKdYA7Xy0gQC5aG2HVCItmVD26gYOu7PxGByh9QtCwnvGsjRA4 qTzA== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=9mSxyMmz1xjHsHJUyT/WYIPnpYi9SCNSb/qUJqV67bQ=; b=oRQIjkgVDzl4kspRWgcNUBYt6WEMNlrZv51J/rfBcjDAAJT48SmlOfQnzFDSqvGKpi tc5KbGh8u6v4AYw7Q0gvOOxf6mIAZ7avJlb8VRxGF/5eihKV0H49R13BE4fFjWIJEnTx c+QVYePczLo+3m7cSL6QiHuyCpGGLW6F7BLxm2FEb5iIxvPHJnOynMznSe7HXBXqlSYB vY9k/mT0Z4BPkT3wu4p9892wASRyoAb1qyklYrryqm1C2AfRAepEXsMRhhTsAS1CQssH qc7GyFLOjx1LkBoPJpzq1+999/WC5PXuXIS04IMi0TK00nBsicjCmZibl8Lg5XClz9iB E6KA== X-Gm-Message-State: AHQUAubR5OcXhDOnddzU2Ky3Qbm11wU42/jEeTjB8TNX3hpg8g4LAvdU jTM87oxvvwTxnsZoBrJnwgl1LA== X-Received: by 2002:a5d:500c:: with SMTP id e12mr3055201wrt.27.1550840025673; Fri, 22 Feb 2019 04:53:45 -0800 (PST) Received: from andreyknvl0.muc.corp.google.com ([2a00:79e0:15:13:8ce:d7fa:9f4c:492]) by smtp.gmail.com with ESMTPSA id o14sm808209wrp.34.2019.02.22.04.53.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Feb 2019 04:53:44 -0800 (PST) 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 , linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-mm@kvack.org, linux-arch@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 Subject: [PATCH v10 08/12] net, arm64: untag user pointers in tcp_zerocopy_receive Date: Fri, 22 Feb 2019 13:53:20 +0100 Message-Id: X-Mailer: git-send-email 2.21.0.rc0.258.g878e2cd30e-goog In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 cf3c5095c10e..80f3c1fb9809 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c @@ -1756,6 +1756,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.rc0.258.g878e2cd30e-goog