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: <YzpQBqwET9bTEsoU@google.com>
Date:   Mon, 3 Oct 2022 11:59:18 +0900
From:   Sergey Senozhatsky <senozhatsky@...omium.org>
To:     Brian Geffon <bgeffon@...gle.com>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        Minchan Kim <minchan@...nel.org>,
        Nitin Gupta <ngupta@...are.org>,
        Sergey Senozhatsky <senozhatsky@...omium.org>,
        linux-kernel@...r.kernel.org,
        Suleiman Souhlal <suleiman@...gle.com>,
        Rom Lemarchand <romlem@...gle.com>, linux-mm@...ck.org
Subject: Re: [PATCH] zram: Always expose rw_page

On (22/09/30 15:52), Brian Geffon wrote:
> Currently zram will adjust its fops to a version which does not
> contain rw_page when a backing device has been assigned. This is
> done to prevent upper layers from assuming a synchronous operation
> when a page may have been written back. This forces every operation
> through bio which has overhead associated with bio_alloc/frees.
> 
> The code can be simplified to always expose a rw_page method and
> only in the rare event that a page is written back we instead will
> return -EOPNOTSUPP forcing the upper layer to fallback to bio.

Reviewed-by: Sergey Senozhatsky <senozhatsky@...omium.org>

> @@ -1267,6 +1253,9 @@ static int __zram_bvec_read(struct zram *zram, struct page *page, u32 index,
>  		struct bio_vec bvec;
>  
>  		zram_slot_unlock(zram, index);
> +		/* If we don't have a bio we came via rw_page, we must fallback to bio */
> +		if (!bio)
> +			return -EOPNOTSUPP;

The comment is above 80 cols.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ