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: <xjykydutkvth5k6vqbxhv4tozudw44dipqphnotpkrolx65wka@ugubqmsfu2ln>
Date: Mon, 12 Jan 2026 14:07:24 +0900
From: Sergey Senozhatsky <senozhatsky@...omium.org>
To: Herbert Xu <herbert@...dor.apana.org.au>
Cc: Yosry Ahmed <yosry.ahmed@...ux.dev>, 
	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: [RFC PATCH 2/2] zsmalloc: chain-length configuration should
 consider other metrics

On (26/01/12 13:01), Herbert Xu wrote:
> On Fri, Jan 09, 2026 at 04:02:51PM +0000, Yosry Ahmed wrote:
> > 
> > Herbert, do you mind taking a look at this? It looks sane to me except
> > for one question below.
> 
> Looks alright to me too.
> 
> > > +		size_t sizes[2];
> > > +
> > > +		/* this object spans two pages */
> > > +		sizes[0] = PAGE_SIZE - off;
> > > +		sizes[1] = mem_len - sizes[0];
> > > +
> > > +		sg_init_table(sg, 2);
> > > +		sg_set_page(sg, zpdesc_page(zpdesc), sizes[0], off);
> > > +
> > > +		zpdesc = get_next_zpdesc(zpdesc);
> > > +		sg = sg_next(sg);
> > 
> > Is this stateful? Will the SG list be returned pointing at the second
> > page now?
> 
> It makes no difference because we just called sg_init_table(sg, 2),
> so sg_next(sg) is equivalent to &sg[1].

I did it this way for (sort of) consistency: sg next follows zpdesc next.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ