Message ID | ebc80132c8ebf6016821ddffbb7e461bd2484824.1550839937.git.andreyknvl@google.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <linux-kselftest-owner@kernel.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D5DE813B5 for <patchwork-linux-kselftest@patchwork.kernel.org>; Fri, 22 Feb 2019 12:54:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C876B317D0 for <patchwork-linux-kselftest@patchwork.kernel.org>; Fri, 22 Feb 2019 12:54:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BC3E43242E; Fri, 22 Feb 2019 12:54:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, USER_IN_DEF_DKIM_WL autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7CA71317D0 for <patchwork-linux-kselftest@patchwork.kernel.org>; Fri, 22 Feb 2019 12:54:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726461AbfBVMyT (ORCPT <rfc822;patchwork-linux-kselftest@patchwork.kernel.org>); Fri, 22 Feb 2019 07:54:19 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:42251 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727260AbfBVMxr (ORCPT <rfc822;linux-kselftest@vger.kernel.org>); Fri, 22 Feb 2019 07:53:47 -0500 Received: by mail-wr1-f68.google.com with SMTP id r5so2238275wrg.9 for <linux-kselftest@vger.kernel.org>; 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=re0EACyYFWXpAoh8ruKCVahYUEGJd+9iHnStDzqc1F0ryLwVXayG6sS1/45EE6SnLP Z/6VdPl13zsvy1fZlVMziJ0jDY6p2bS3syMjwrKvvTLfNflJJqLTR0AGWep+jAwvGt56 6F7eQY22Ac/S7kNvVMO4RroePPUzy/mGvaVVmgi56LldOIrcoopC8ZJhRqaOH5zMmL0L psV8pKiqoIXNXCToVen9M2Wu2IyMXmHZIpwT2G+12EYe7bVvSngTnej8J9DiRiDO0qDo JyGom1rUXHwbHe8JGZMWLWVnGoiTrkSis7gzVmdUlGX2QQ/zaHC0ggbblrGI0LCczGHL 6WMg== X-Gm-Message-State: AHQUAuaSBaoWfFMpaEyH+ecNJ2IGQNEvYlJvkqKsKstZJ0u+EgJVfPbl Hktzd5X0VRMA4+y+Rp9N92c6xA== X-Google-Smtp-Source: AHgI3IYB1rxXC3qLSPjqnlg3vyINEmisEJ9COGx3+BlbVTSYQsvRd/r4g+wzkk/8Tl6H/RsXQOXN5Q== 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 <andreyknvl@google.com> To: Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will.deacon@arm.com>, Mark Rutland <mark.rutland@arm.com>, Robin Murphy <robin.murphy@arm.com>, Kees Cook <keescook@chromium.org>, Kate Stewart <kstewart@linuxfoundation.org>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Andrew Morton <akpm@linux-foundation.org>, Ingo Molnar <mingo@kernel.org>, "Kirill A . Shutemov" <kirill.shutemov@linux.intel.com>, Shuah Khan <shuah@kernel.org>, Vincenzo Frascino <vincenzo.frascino@arm.com>, 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 <dvyukov@google.com>, Kostya Serebryany <kcc@google.com>, Evgeniy Stepanov <eugenis@google.com>, Lee Smith <Lee.Smith@arm.com>, Ramana Radhakrishnan <Ramana.Radhakrishnan@arm.com>, Jacob Bramley <Jacob.Bramley@arm.com>, Ruben Ayrapetyan <Ruben.Ayrapetyan@arm.com>, Chintan Pandya <cpandya@codeaurora.org>, Luc Van Oostenryck <luc.vanoostenryck@gmail.com>, Dave Martin <Dave.Martin@arm.com>, Kevin Brodsky <kevin.brodsky@arm.com>, Szabolcs Nagy <Szabolcs.Nagy@arm.com>, Andrey Konovalov <andreyknvl@google.com> 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: <ebc80132c8ebf6016821ddffbb7e461bd2484824.1550839937.git.andreyknvl@google.com> X-Mailer: git-send-email 2.21.0.rc0.258.g878e2cd30e-goog In-Reply-To: <cover.1550839937.git.andreyknvl@google.com> References: <cover.1550839937.git.andreyknvl@google.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kselftest-owner@vger.kernel.org Precedence: bulk List-ID: <linux-kselftest.vger.kernel.org> X-Mailing-List: linux-kselftest@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
arm64: untag user pointers passed to the kernel
|
expand
|
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;
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 <andreyknvl@google.com> --- net/ipv4/tcp.c | 2 ++ 1 file changed, 2 insertions(+)