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] [day] [month] [year] [list]
Message-ID: <se3v2st4cr6vbqgw5y3a5egeq5zrkh5bede2rcheygpdsem5sm@j3k75zxt73ou>
Date: Thu, 8 Jan 2026 10:17:41 +0900
From: Sergey Senozhatsky <senozhatsky@...omium.org>
To: Yosry Ahmed <yosry.ahmed@...ux.dev>
Cc: Sergey Senozhatsky <senozhatsky@...omium.org>, 
	Andrew Morton <akpm@...ux-foundation.org>, Nhat Pham <nphamcs@...il.com>, Minchan Kim <minchan@...nel.org>, 
	Johannes Weiner <hannes@...xchg.org>, Brian Geffon <bgeffon@...gle.com>, linux-kernel@...r.kernel.org, 
	linux-mm@...ck.org
Subject: Re: [PATCHv2 2/2] zsmalloc: simplify read begin/end logic

On (26/01/07 19:03), Yosry Ahmed wrote:
> On Wed, Jan 07, 2026 at 02:21:45PM +0900, Sergey Senozhatsky wrote:
> > From: Yosry Ahmed <yosry.ahmed@...ux.dev>
> 
> While I appreciate this, I think for all intents and purposes this patch
> should be credited to you, it's different from the diff I said as it
> applies on top of your change.
> 
> If you're feeling really generous, I think Suggested-by or
> Co-developed-by + Signed-off-by is sufficient :)

Okey-dokey
Co-developed-by: Yosry Ahmed <yosry.ahmed@...ux.dev>

> > When we switched from using class->size (for spans detection)
> > to actual compressed object size, we had to compensate for
> > the fact that class->size implicitly took inlined handle
> > into consideration.  In fact, instead of adjusting the size
> > of compressed object (adding handle offset for non-huge size
> > classes), we can move some lines around and simplify the
> > code: there are already paths in read_begin/end that compensate
> > for inlined object handle offset.
> 
> I think the commit log is not clear in isolation.
> 
> How about something like this:
> 
> zs_obj_read_begin() currently maps or copies the the compressed object
> with the prefix handle for !ZsHugePage case.  Make the logic clearer and
> more officient by moving the offset of the object in the page after the
> prefix handle instead, only copying the actual object and avoiding the
> need to adjust the returned address to account for the prefix.
> 
> Adjust the logic to detect spanning objects in zs_obj_read_end()
> accordingly, slightly simplifying it by avoiding the need to account for
> the handle in both the offset and the object size.

Looks good to me.

Andrew, can we trouble you with commit message update or should I resend?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ