Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp4156597ybl; Mon, 26 Aug 2019 06:23:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqxUv84UnYYpHBWQs4mViUZviWMbBGHaOxnGbcdOIqG6cpmAahYeMx6end5HwWoMyQ7UqQQF X-Received: by 2002:aa7:8559:: with SMTP id y25mr19739950pfn.260.1566825812602; Mon, 26 Aug 2019 06:23:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566825812; cv=none; d=google.com; s=arc-20160816; b=C8tILZ38HH5BGeIaV8HRBU5O27pkhQ3+KlwIWt595ATqOGEONJ1ZQe8UOGLV4CtC3Y ZbjJsUM7qeWQwR0AUDUaR2150HFGdEmzbWcpKwgCKf7SNDuXn4pgdSTRKXXUZDW1fPTR GUrE977NLIZq/5hVf7sb0H2pKWxeV+hx6xjWTI2F+0tESWWaiLuOkT32Wus10WrFi4ep +ZrlVn1s5bsdc/SjOnvWFjGhQMSFfu5xbmhldw9AMd8f4X8QX9TKJyxyYkiDXy1PNBqV M1tIImnKdvT6wi1C/8N1PdRabKlXV1/fsRmSKMHuex/5PYyhRaRoI3uuOTuqaDmdPvSU pVLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=IInbJuct5ufzKNiytsnk+jMIYv1V6eVTEaTj38ohm3M=; b=NVn6jq2tj3t/w8MChIHrrt/nlr4Gx7eZFSiaSrFNbvYsMg6QvTwKQBevRy1BZI1u5z SteiHYPZPpuiYbz5f0i2sMkQWgCvKcMnaXzzRpdj4o8YtjOtRI59TkxGKvKylk1UBSgg 7kvh6VxPatXFQnSNjXwLyzEiWa4kWNoRGs78nQrv8cDkcnTYz6AVNRxUyqU0Z9+nuJa2 eAXMkJHmxktACALrJ+9AoKU95xzoOIF3P6RWs5TCivcyyN3zOyYeFrEVx9TQ5NGz9Vj5 C5EPVyHSPmwlYxv7IFQ0WxmeYE4v284GfgulK31pNt8NnF4JS54vO9ywbDmHrN+nogbl b9gA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=fnMzsCTr; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v24si7834153pgk.509.2019.08.26.06.23.17; Mon, 26 Aug 2019 06:23:32 -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=@ziepe.ca header.s=google header.b=fnMzsCTr; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731951AbfHZMU6 (ORCPT + 99 others); Mon, 26 Aug 2019 08:20:58 -0400 Received: from mail-qt1-f195.google.com ([209.85.160.195]:36525 "EHLO mail-qt1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730199AbfHZMU6 (ORCPT ); Mon, 26 Aug 2019 08:20:58 -0400 Received: by mail-qt1-f195.google.com with SMTP id z4so17619401qtc.3 for ; Mon, 26 Aug 2019 05:20:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=IInbJuct5ufzKNiytsnk+jMIYv1V6eVTEaTj38ohm3M=; b=fnMzsCTram2mN7X12asMshdyTXllFMcSBIdA21KFh1RFEex2/5FeKlO+9rtE32Hfem jNFRntwunRTt9MR1Ovw/7sG8gRUDu02VVxJVeHApVsYUYSL3ColhOVAIONzU/OwgzIsI Cf+dbVDkOq6orHb9v/8o9ozQW9LemkmRD/qs4cgkUG9GO8bMKSsQ5fVmxRZ8QKmTd/UN cMzUj24siEC0zPzjoKcmIhXTIs2pUPmj3ydsCJXBTyle1aaPAglspzS3pqQgQ9jGMdgs V8/0FEQAaqOhMwcD4fjLClL9PYtQeZh0epvkMiiCdtfvZJMAYEZM7IJ41fzr+ZyQcPqf fuvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=IInbJuct5ufzKNiytsnk+jMIYv1V6eVTEaTj38ohm3M=; b=U1SksqcYkL85UC0Q7bYSsaedrCJypdfjQx8g/zEH0ImewA39wlB+qpQ4PeUtKznyuT Lz2YVnHhbUwfeBmXM4TkRNGzM/qk1dQipVRC6hnDv7JT16NEbwqMkSjw29aqf6Zx3952 63tQ8vCWUf2goG/FlGoL9tjwm2NwazgbxDtH/Iyrd8JzQ0JgpDJinCTIPY3ilnhzncLN hn1B/1QWG2T8yd0wKG1KQ+2OEEcP3vU5CIyDRUEKOQBsYitG8h10NWsEc3/WHxeimVZf EsV4FyEis3CkYpRpU7uRCblBE/H+hNWD3m2ELN6JKHtBgjq1AxriMdv2W9K4nLrATfKu oelA== X-Gm-Message-State: APjAAAXPCXJbDc7BEbu4/tEKvks4z0n8cLVAHJ2O1U+vAnmCLNKu8PJF SECHIp0ti7DcZX1hV6AQiVdyMw== X-Received: by 2002:ac8:73c7:: with SMTP id v7mr14706237qtp.9.1566822056913; Mon, 26 Aug 2019 05:20:56 -0700 (PDT) Received: from ziepe.ca (hlfxns017vw-142-167-216-168.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.167.216.168]) by smtp.gmail.com with ESMTPSA id q6sm6213402qke.109.2019.08.26.05.20.56 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 26 Aug 2019 05:20:56 -0700 (PDT) Received: from jgg by mlx.ziepe.ca with local (Exim 4.90_1) (envelope-from ) id 1i2DzT-0007A1-Sv; Mon, 26 Aug 2019 09:20:55 -0300 Date: Mon, 26 Aug 2019 09:20:55 -0300 From: Jason Gunthorpe To: Souptick Joarder Cc: leon@kernel.org, Doug Ledford , linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, Matthew Wilcox Subject: Re: [PATCH] IB/mlx5: Convert to use vm_map_pages_zero() Message-ID: <20190826122055.GA27349@ziepe.ca> References: <1566713247-23873-1-git-send-email-jrdr.linux@gmail.com> <20190825194354.GC21239@ziepe.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 26, 2019 at 01:32:09AM +0530, Souptick Joarder wrote: > On Mon, Aug 26, 2019 at 1:13 AM Jason Gunthorpe wrote: > > > > On Sun, Aug 25, 2019 at 11:37:27AM +0530, Souptick Joarder wrote: > > > First, length passed to mmap is checked explicitly against > > > PAGE_SIZE. > > > > > > Second, if vma->vm_pgoff is passed as non zero, it would return > > > error. It appears like driver is expecting vma->vm_pgoff to > > > be passed as 0 always. > > > > ? pg_off is not zero > > Sorry, I mean, driver has a check against non zero to return error -EOPNOTSUPP > which means in true scenario driver is expecting vma->vm_pgoff should be passed > as 0. get_index is masking vm_pgoff, it is not 0 Jason