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: <20251202112644.YUux4LKd@linutronix.de>
Date: Tue, 2 Dec 2025 12:26:44 +0100
From: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To: Nam Cao <namcao@...utronix.de>
Cc: Yunseong Kim <ysk@...lloc.com>, Nam Cao <nam.cao@...aro.org>,
	Tomas Glozar <tglozar@...hat.com>,
	Shung-Hsi Yu <shung-hsi.yu@...e.com>,
	Byungchul Park <byungchul@...com>, syzkaller@...glegroups.com,
	linux-rt-devel@...ts.linux.dev, LKML <linux-kernel@...r.kernel.org>,
	Dan Carpenter <dan.carpenter@...aro.org>
Subject: Re: [Question] Detecting Sleep-in-Atomic Context in PREEMPT_RT via
 RV (Runtime Verification) monitor rtapp:sleep

On 2025-12-02 12:14:09 [+0100], Nam Cao wrote:
> > RV is not a static checker, it is a run-time checker.
> >
> > Just in case you are not aware yet, there is also Smatch:
> > https://github.com/error27/smatch. But I can't offer much help there.
> 
> I was looking up something unrelated, and I found that Smatch does
> detect this sleep-in-atomic problem:
> https://staticthinking.wordpress.com/2024/05/24/sleeping-in-atomic-warnings/
> 
> I'm not sure if its design takes PREEMPT_RT into consideration. But
> seems worth having a look.

It does not look like it does. Judging from
	https://github.com/error27/smatch/blob/master/check_preempt_info.c

it increments the preempt-counter on preempt_disable() and spin_lock().
So it won't yell at
	preempt_disable();
	spin_lock();

while CONFIG_DEBUG_ATOMIC_SLEEP would.

> Nam

Sebastian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ