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: <51f64ee9-35fb-482e-aa50-e2a446dcd972@kernel.dk>
Date: Wed, 19 Jun 2024 11:34:23 -0600
From: Jens Axboe <axboe@...nel.dk>
To: Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
 linux-block@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: Mike Galbraith <umgwanakikbuti@...il.com>,
 Minchan Kim <minchan@...nel.org>,
 Sergey Senozhatsky <senozhatsky@...omium.org>,
 Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH] zram: Replace bit spinlocks with spinlock_t for
 PREEMPT_RT.

On 6/19/24 9:08 AM, Sebastian Andrzej Siewior wrote:
> From: Mike Galbraith <umgwanakikbuti@...il.com>
> 
> The bit spinlock disables preemption. The spinlock_t lock becomes a sleeping
> lock on PREEMPT_RT and it can not be acquired in this context. In this locked
> section, zs_free() acquires a zs_pool::lock, and there is access to
> zram::wb_limit_lock.
> 
> Use a spinlock_t on PREEMPT_RT for locking and set/ clear ZRAM_LOCK bit after
> the lock has been acquired/ dropped.

The conditional code depending on CONFIG_PREEMPT_RT is nasty. Why not
just get rid of that and use the CONFIG_PREEMPT_RT variants for
everything? They are either good enough to work well in general, or it
should be redone such that it is.

-- 
Jens Axboe


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ