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: <Zy5Wl84aHADMe8MQ@casper.infradead.org>
Date: Fri, 8 Nov 2024 18:21:11 +0000
From: Matthew Wilcox <willy@...radead.org>
To: Jens Axboe <axboe@...nel.dk>
Cc: linux-mm@...ck.org, linux-fsdevel@...r.kernel.org, hannes@...xchg.org,
	clm@...a.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 04/13] mm/readahead: add readahead_control->uncached
 member

On Fri, Nov 08, 2024 at 10:43:27AM -0700, Jens Axboe wrote:
> +++ b/mm/readahead.c
> @@ -191,7 +191,13 @@ static void read_pages(struct readahead_control *rac)
>  static struct folio *ractl_alloc_folio(struct readahead_control *ractl,
>  				       gfp_t gfp_mask, unsigned int order)
>  {
> -	return filemap_alloc_folio(gfp_mask, order);
> +	struct folio *folio;
> +
> +	folio = filemap_alloc_folio(gfp_mask, order);
> +	if (folio && ractl->uncached)
> +		folio_set_uncached(folio);

If we've just allocated it, it should be safe to use
__folio_set_uncached() here, no?

Not that I'm keen on using a folio flag here, but I'm reserving judgement
on that unti I've got further through this series and see how it's used.
I can see that it might be necessary.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ