Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1743796ybi; Sat, 1 Jun 2019 03:42:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqwba37rZBDtOxsqQ6+OkZuRkuy5lKBrnpdLif6Zg0AY7Hme2jJ3YdmGxX4KGnVXc0Opq23R X-Received: by 2002:a63:2325:: with SMTP id j37mr14442979pgj.137.1559385748685; Sat, 01 Jun 2019 03:42:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559385748; cv=none; d=google.com; s=arc-20160816; b=x1EkcqK9G+0B8/QK4bEEk5qakLBu51w9vlPE5UBBsq3iBF/PrOxa5Nqc+bzlIt9tgJ iYX/+B5eIL08XBuidDlJdXVDmUrkznVS7uuxq8R9qqcRfCQdTjKM6YPgmKfVEAhWGcAJ cmtmFHDzthVvw3NNoOo6t2Tx+cSx1H7X32ND/yEOXbLVbQvJXYpIhq7SM2QVy8Zj6X+C ZH7Qa0h9rbBKlEZ+vYs4yEjtaB6/oy+V4fe52rj9HVg9Rpn4ZR2fTB6E+gLuHhw3bkhI 613lkZ09QrOFbs/OlS8P94cz0XAs4UXmwUtXiUGnoPpINnuH4IyfZX3aXNQ8mH0rzIGP pRrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=HfG8SFYlwhX2T6RV6yxB9+NDJcpkM3O1MaSrYiv8LPo=; b=fD4iSCmitFpOV+4jwNWv3ZbIx2mykB9TxbE5f2I0YgJ44HPL0Jo1GQjL4IX39aGWo0 pSI6IoorgZQVfH04ialyVh4F73ks4x9jIwZAx2zsfin4q+nuZR+uSkArRTQJTtqVFYkg HVcI5gETKTLtaiWMZHKx0zYPcdrN5eaiiOMtiR33A9NcXqJRXSGi4lVb0dVjaq1PXAM3 Ym0XFJaCdQSnd5Ye8rpOAMVPOB7GbNphcDrM8fC4yyunu0fafL5Z5lN9N8o8PD4G5zs6 PEjaIGw8xMPrUYhPw5FQo7QlVqmTu/CH8kd5XU4Grk8vqpTH84/fR2PBAz4k43FArsac ipCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rjoKGRLL; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c8si10564166pfn.208.2019.06.01.03.42.13; Sat, 01 Jun 2019 03:42:28 -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=@gmail.com header.s=20161025 header.b=rjoKGRLL; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726881AbfFAKlN (ORCPT + 99 others); Sat, 1 Jun 2019 06:41:13 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:42005 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726109AbfFAKlN (ORCPT ); Sat, 1 Jun 2019 06:41:13 -0400 Received: by mail-lj1-f194.google.com with SMTP id t28so837605lje.9 for ; Sat, 01 Jun 2019 03:41:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=HfG8SFYlwhX2T6RV6yxB9+NDJcpkM3O1MaSrYiv8LPo=; b=rjoKGRLLtJKt2NLllelbm573MDL2ykr+faYahdLKjSY7Y5bcl9oOcfgIPjxjLRT8Rg mveZbNR6/4PcibX5IGuiP2ht/kulnh3WcI4MaWK2Y1A0DXjutsYEwD3qTftFhiv8GqfK 7+qaDof1ZYd3doX7X1h+7WeRcfHVpsj0pwMdcoQ9xEdSqbExbR0q5XsGZkhOjNfO0bju T5gSSanCNIC12PTxtOjXIjZmgaW8TSijlkhgbcIQjczBFFhQDLrsYZl8VwB/3MG1Gh3c 8YfiZYGEuJBRTypFu7XSl1WsefQ2ppNKSDi5woINqma62CXA6zpRINHHLvZ5yGrTw5X8 DUHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=HfG8SFYlwhX2T6RV6yxB9+NDJcpkM3O1MaSrYiv8LPo=; b=ESFbTMWKWNsQZtw8LzlXnfkJeb311AJdEHRp+7wQkvvSm9JrZYa3RfDgMf1LexO4Mk 6Pb6Zj+joCRrCSK+OHtIrz4cNKwiOianfVjLkfnNogSM3no5PT3zLEiNdn/tR0OiZiBg 9vvq0gKM0HFnR9oJ7KleKsCmsHhwRlzhcW4Ys7vj8ppJNsOcoj1jN/NGvobD5aAs1MDL IOKVcUtaCnFmyeBRUA0vMjsVoBRfSE/XmfHuutjNr3ayOA0Iz5SHZLh2ELgwhW1GJWnp tXYXB9eUoZCLEnvK/kuvH1zmRAk5d1Pw1b0WFzYUts4S+JiUi9UCQPHlzYVNdj1chfCk CkfQ== X-Gm-Message-State: APjAAAUDJJiQzyM7V0fQ9ORjw11KTVz8d9QuQyPR3WDE5dphuSIf31rW eQQSQfsM62PwIXsCXmRh3/7OyArGWUazOo3r8To= X-Received: by 2002:a2e:9157:: with SMTP id q23mr8892650ljg.188.1559385671552; Sat, 01 Jun 2019 03:41:11 -0700 (PDT) MIME-Version: 1.0 References: <20190528193004.GA7744@gmail.com> In-Reply-To: From: Miguel Ojeda Date: Sat, 1 Jun 2019 12:41:00 +0200 Message-ID: Subject: Re: [PATCH] mm: Fail when offset == num in first check of vm_map_pages_zero() To: Souptick Joarder , Andrew Morton Cc: Matthew Wilcox , Peter Zijlstra , =?UTF-8?B?SsOpcsO0bWUgR2xpc3Nl?= , "Aneesh Kumar K.V" , Huang Ying , open list , Linux-MM 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 On Wed, May 29, 2019 at 9:09 AM Souptick Joarder wrote: > > On Wed, May 29, 2019 at 1:38 AM Miguel Ojeda > wrote: > > > > If the user asks us for offset == num, we should already fail in the > > first check, i.e. the one testing for offsets beyond the object. > > > > At the moment, we are failing on the second test anyway, > > since count cannot be 0. Still, to agree with the comment of the first > > test, we should first there. > > I think, we need to cc linux-mm. Cc'ing Andrew as well as Souptick suggested me. Cheers, Miguel