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: <20200518201737.GV16070@bombadil.infradead.org>
Date:   Mon, 18 May 2020 13:17:37 -0700
From:   Matthew Wilcox <willy@...radead.org>
To:     Souptick Joarder <jrdr.linux@...il.com>
Cc:     akpm@...ux-foundation.org, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org
Subject: Re: [RFC] mm/gup.c: Use gup_flags as parameter instead of passing
 write flag

On Tue, May 19, 2020 at 01:28:23AM +0530, Souptick Joarder wrote:
> The idea is to get rid of write parameter. Instead caller will pass
> FOLL_WRITE to __get_user_pages_fast(). This will not change any
> functionality of the API. Once it is upstream all the callers will
> be changed to pass FOLL_WRITE.

Uhh ... until you change all the callers, haven't you just broken all
the callers?

> -int __get_user_pages_fast(unsigned long start, int nr_pages, int write,
> -			  struct page **pages)
> +int __get_user_pages_fast(unsigned long start, int nr_pages,
> +			unsigned int gup_flags, struct page **pages)
>  {
>  	unsigned long len, end;
>  	unsigned long flags;
> @@ -2685,10 +2692,7 @@ int __get_user_pages_fast(unsigned long start, int nr_pages, int write,
>  	 * Internally (within mm/gup.c), gup fast variants must set FOLL_GET,
>  	 * because gup fast is always a "pin with a +1 page refcount" request.
>  	 */
> -	unsigned int gup_flags = FOLL_GET;
> -
> -	if (write)
> -		gup_flags |= FOLL_WRITE;
> +	gup_flags |= FOLL_GET;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ