lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200430142311.091b82235141ca47b9c6475a@linux-foundation.org>
Date:   Thu, 30 Apr 2020 14:23:11 -0700
From:   Andrew Morton <akpm@...ux-foundation.org>
To:     Souptick Joarder <jrdr.linux@...il.com>
Cc:     linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm/gup.c: Handle error at earliest for incorrect
 nr_pages value

On Fri,  1 May 2020 01:41:58 +0530 Souptick Joarder <jrdr.linux@...il.com> wrote:

> As per documentation, pin_user_pages_fast() & get_user_pages_fast()
> will return 0, if nr_pages <= 0. But this can be figure out only after
> going inside the internal_get_user_pages_fast().
> 
> This can be handled early. Adding a check for the same.

Calling get_user_pages() for (nrpages <= 0) is a nonsensical thing to
do so it isn't a thing we should care to optimize.  Adding new checks
will actually slow down the use cases which we *do* care about.  And it
adds more code.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ