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: <66q2ojkbzy2l7ozzc4ilputbgvdtwav4r4qdvnl7x32tuutums@zachqbvl7y3w>
Date: Fri, 15 Nov 2024 10:49:08 +0200
From: "Kirill A. Shutemov" <kirill@...temov.name>
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, willy@...radead.org, 
	linux-btrfs@...r.kernel.org, linux-ext4@...r.kernel.org, linux-xfs@...r.kernel.org, 
	bfoster@...hat.com
Subject: Re: [PATCH 08/17] mm/filemap: add read support for RWF_UNCACHED

On Thu, Nov 14, 2024 at 08:25:12AM -0700, Jens Axboe wrote:
> @@ -2595,6 +2601,20 @@ static inline bool pos_same_folio(loff_t pos1, loff_t pos2, struct folio *folio)
>  	return (pos1 >> shift == pos2 >> shift);
>  }
>  
> +static void filemap_uncached_read(struct address_space *mapping,
> +				  struct folio *folio)
> +{
> +	if (!folio_test_uncached(folio))
> +		return;
> +	if (folio_test_writeback(folio))
> +		return;

Do we want to drop out here if the folio is dirty, but not yet under
writeback?

It is checked inside folio_unmap_invalidate(), but we will lose
PG_uncached if we get there.

> +	if (folio_test_clear_uncached(folio)) {
> +		folio_lock(folio);
> +		folio_unmap_invalidate(mapping, folio, 0);
> +		folio_unlock(folio);
> +	}
> +}
> +
>  /**
>   * filemap_read - Read data from the page cache.
>   * @iocb: The iocb to read.

-- 
  Kiryl Shutsemau / Kirill A. Shutemov

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ