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]
Date:   Wed, 26 Oct 2022 11:15:20 +0900
From:   Sergey Senozhatsky <senozhatsky@...omium.org>
To:     Alexey Romanov <avromanov@...rdevices.ru>
Cc:     minchan@...nel.org, senozhatsky@...omium.org, ngupta@...are.org,
        akpm@...ux-foundation.org, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org, kernel@...rdevices.ru
Subject: Re: [PATCH v2] zram: add size class equals check into recompression

On (22/10/25 19:26), Alexey Romanov wrote:
> +/**
> + * zs_lookup_class_index() - Returns index of the zsmalloc &size_class
> + * that hold objects of the provided size.
> + * @pool: zsmalloc pool to use
> + * @size: object size
> + *
> + * Context: Any context.
> + *
> + * Return: the index of the zsmalloc &size_class that hold objects of the
> + * provided size.
> + */
> +unsigned int zs_lookup_class_index(struct zs_pool *pool, unsigned int size)
> +{
> +	struct size_class *class;
> +
> +	class = pool->size_class[get_size_class_index(pool, size)];
> +
> +	return class->index;
> +}
> +EXPORT_SYMBOL_GPL(zs_lookup_class_index);

I cherry-picked it with one tiny tweak: I want this to be ahead of
my series (break dependency on my series). So I removed pool parameter
from `get_size_class_index(pool, size)` in this patch and add it back
in my series (when I change get_size_class_index() prototype).

Powered by blists - more mailing lists