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: <at4djawky2n5d2nrxor62osid3mkaid4ttmlmc3xwsju2hstun@bos2kgakshpa>
Date: Thu, 8 May 2025 15:17:56 +0900
From: Sergey Senozhatsky <senozhatsky@...omium.org>
To: Christoph Hellwig <hch@...radead.org>
Cc: Sergey Senozhatsky <senozhatsky@...omium.org>, 
	Yosry Ahmed <yosry.ahmed@...ux.dev>, Vitaly Wool <vitaly.wool@...sulko.se>, linux-mm@...ck.org, 
	akpm@...ux-foundation.org, linux-kernel@...r.kernel.org, Nhat Pham <nphamcs@...il.com>, 
	Shakeel Butt <shakeel.butt@...ux.dev>, Johannes Weiner <hannes@...xchg.org>, 
	Minchan Kim <minchan@...nel.org>, Igor Belousov <igor.b@...dev.am>, 
	Herbert Xu <herbert@...dor.apana.org.au>
Subject: Re: [PATCH] mm/zblock: use vmalloc for page allocations

On (25/05/07 23:00), Christoph Hellwig wrote:
> On Thu, May 08, 2025 at 02:58:14PM +0900, Sergey Senozhatsky wrote:
> > Oh, I didn't realize that zram was the only swap_slot_free_notify
> > user.  zram already handles REQ_OP_DISCARD/REQ_OP_WRITE_ZEROES so
> > I guess only swap-cluster needs some work.  Are there any
> > blockers/complications on the swap-cluster side?
> 
> I think the reason it was added it was so that the discard can be
> done non-blocking with a spinlock held.  Which seems a bit sketch
> when calling into a driver anyway..

swap_slot_free_notify is not guaranteed to free anything on the zram/zsmalloc
side. zram attempts to trylock entry and if it fails to acquire the ownership
swap_slot_free_notify for that entry becomes a .miss_free.  So we just keep
stale data in zspage (potentially, preventing it from being released if that
was the last allocated object).  I don't know if .miss_free happens often in
real life.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ