Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp3302269ybl; Sun, 25 Aug 2019 12:45:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqz7ROby4NfPIHlYQNOo+qyS4e2NRi/oskKdXw1bHZQh/joUKfx7k24tCAN43vRuM1J5EosF X-Received: by 2002:aa7:8a86:: with SMTP id a6mr6969592pfc.76.1566762348589; Sun, 25 Aug 2019 12:45:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566762348; cv=none; d=google.com; s=arc-20160816; b=N0Ud638rsR3p6v9v8wZgy3/h7H1ZRXN2tvHwDvNUAqItj6//AwFsx7G5DuGdMgEU/W MpWUhkTgJgcsvsPfO2jXHuFd4tgSEQ2LQHkIohKTKzRI6Kl50uUd0o5B2SfncrfwGrCa YWGQe6qIu5/P3QXgHAZGvkJPBwGni/H7pLurAlxXStQ1uAGDiQ9NASZLC+MOW5dSBPRK Q9Zyh4A/mjBJCg0kklOSoXUSDBVxZ3uxVthQOWA+fri/Q8KW4zi0NBN22eyljX2nOMOY fmAQwDqav/RzBH7aeRYwfKaCfOgDlrYZb7Kaq0H1CdYbXUMYgP9j69jo3TmFYTnZ0RSY 3QDQ== 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=an1FIlEKWSveTYRtKx/MAhX6QOyzHQ+HmT6tijG1CoU=; b=VvvvZP8YCm+pH0EFGCUaey724wPvqIC0itB7UBlZhEjFYJuwXwm6DLN/sIftG8AjcW wmWLQiSzm6f7LTCUx4EIclTv/BHAD61Kwx3pkk3f0fxb9GuhSOAnEqcuMLieepYnXLqX CuJ09dpM+uM8m0nr9Zn7I/d+kQw1cCERHZvnnK9QY32J4s6OaJglrQyA0hDN88i/LvJ8 6xFkXcLnVL4bQLKxUZDcv7X5YOZmciiJeJ/0p0PIKLtowk97wulVdzTQHEim6+LfporQ VGjr9I0AilZTPLKV39weD+rvzcPDeA1aq/TjtB+3kQRnHxMUZl4UpQcsPExGuEWBW/ea a9tw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b="H/CtL92d"; 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 c14si8519235pfb.252.2019.08.25.12.45.33; Sun, 25 Aug 2019 12:45:48 -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="H/CtL92d"; 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 S1728910AbfHYTn4 (ORCPT + 99 others); Sun, 25 Aug 2019 15:43:56 -0400 Received: from mail-qk1-f196.google.com ([209.85.222.196]:36206 "EHLO mail-qk1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728798AbfHYTnz (ORCPT ); Sun, 25 Aug 2019 15:43:55 -0400 Received: by mail-qk1-f196.google.com with SMTP id d23so12549061qko.3 for ; Sun, 25 Aug 2019 12:43:55 -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=an1FIlEKWSveTYRtKx/MAhX6QOyzHQ+HmT6tijG1CoU=; b=H/CtL92dRjtqaqTSw5ZV8yAF7wwnoMNJDw5+1G2x1xYVO4VZ5Axmeomj9wnZjYj0Bn DJeBgZKNZrSGGpP23n/5gmDTErHwMcxq5clo0Ka7OjcWbyx3iOt6rLhHo3VdBM6m3S4O 4apWmmag+k9tSp9q0N0DJsKghleivIZcC/WUKJygWOpXdFRGdKFJ3A4QIseoaPzp1y+W bsrWpp8MBMSXrrwxjfswhTZkAi9WdFPRChIrnZhIveybUkuJpuwjopjVoUQEsc3BK4E4 Ffmt6RjnN2yK8JXD1JU+T/ooXcfin6oBE6oKUEAYrCuKMc7sWB+JR7LXHyOxdun80blm c/Pg== 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=an1FIlEKWSveTYRtKx/MAhX6QOyzHQ+HmT6tijG1CoU=; b=LSWiaZB+PoqZgHp4LNOY+vf34peIidEokE6o5s177jnofJgtvyE2P27rqxvdef2363 EMWk2xj/A74reXAhjzpenV3Hv9Qq6raEDau3aiWvVKOtuvHmL4ig5AuHBXXcGYJATQHO KEcKjKy1c7KgyxUmkbcVdWkLx7vHbWNxTjM8T44ezyzvIONKSpzc91VNfL7cL8dkgYkj 3MoB/BMRny5lIhahZpXdNiXCj5/5HgX3SqtH4gZBg9x/uzKh/gPdm6rY4NYaS0Bhg6eB zmtEQZqJ2ghMpTLcNLH1R0+PSJx2IY/ng+pylIawlilDgYVBSFIZFZCw6VeWLZr+0bg5 pV+Q== X-Gm-Message-State: APjAAAUTCvwUeD5I8P56m0lOtgGkCDGuQblSPFsxxzsHGgpJMXQT9YGt GfHrAGc8SrCM/KJysRRtNIItPg== X-Received: by 2002:a37:680e:: with SMTP id d14mr13582652qkc.207.1566762234759; Sun, 25 Aug 2019 12:43:54 -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 n62sm5439100qkd.124.2019.08.25.12.43.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 25 Aug 2019 12:43:54 -0700 (PDT) Received: from jgg by mlx.ziepe.ca with local (Exim 4.90_1) (envelope-from ) id 1i1yQc-0005rq-1g; Sun, 25 Aug 2019 16:43:54 -0300 Date: Sun, 25 Aug 2019 16:43:54 -0300 From: Jason Gunthorpe To: Souptick Joarder Cc: leon@kernel.org, dledford@redhat.com, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, willy@infradead.org Subject: Re: [PATCH] IB/mlx5: Convert to use vm_map_pages_zero() Message-ID: <20190825194354.GC21239@ziepe.ca> References: <1566713247-23873-1-git-send-email-jrdr.linux@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1566713247-23873-1-git-send-email-jrdr.linux@gmail.com> 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 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 Jason