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: <20230726031846.GJ955071@google.com>
Date:   Wed, 26 Jul 2023 12:18:46 +0900
From:   Sergey Senozhatsky <senozhatsky@...omium.org>
To:     Andrew Yang <andrew.yang@...iatek.com>
Cc:     Minchan Kim <minchan@...nel.org>,
        Sergey Senozhatsky <senozhatsky@...omium.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Matthias Brugger <matthias.bgg@...il.com>,
        AngeloGioacchino Del Regno 
        <angelogioacchino.delregno@...labora.com>,
        Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
        wsd_upstream@...iatek.com, casper.li@...iatek.com,
        linux-mm@...ck.org, linux-kernel@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org,
        linux-mediatek@...ts.infradead.org
Subject: Re: [PATCH] zsmalloc: Fix races between modifications of fullness
 and isolated

On (23/07/21 14:37), Andrew Yang wrote:
> 
> Since fullness and isolated share the same unsigned int,
> modifications of them should be protected by the same lock.
> 
> Signed-off-by: Andrew Yang <andrew.yang@...iatek.com>
> Fixes: c4549b871102 ("zsmalloc: remove zspage isolation for migration")

Have you observed issues in real life? That commit is more than a year
and a half old, so I wonder.

> @@ -1858,8 +1860,8 @@ static int zs_page_migrate(struct page *newpage, struct page *page,
>  	 * Since we complete the data copy and set up new zspage structure,
>  	 * it's okay to release the pool's lock.
>  	 */

This comment should be moved too, because this is not where we unlock the
pool anymore.

> -	spin_unlock(&pool->lock);
>  	dec_zspage_isolation(zspage);
> +	spin_unlock(&pool->lock);
>  	migrate_write_unlock(zspage);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ