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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250324084944.z1J0Kf8c@linutronix.de>
Date: Mon, 24 Mar 2025 09:49:44 +0100
From: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To: cuiguoqi <cuiguoqi@...inos.cn>
Cc: tglx@...utronix.de, anna-maria@...utronix.de, clrkwllms@...nel.org,
	frederic@...nel.org, linux-kernel@...r.kernel.org,
	linux-rt-devel@...ts.linux.dev, rostedt@...dmis.org
Subject: Re: [PATCH] hrtimer: Fix the incorrect initialization of
 timer->is_hard

On 2025-03-22 16:24:03 [+0800], cuiguoqi wrote:
> Hi tglx,
>  
> First of all, I'd like to thank you for your reply and for pointing out the email issue. 
> 
> As you've accurately noted, when PREEMPT_RT is disabled, it introduces a certain
> degree of ambiguity for kernel developers. So far, no malfunctions have been
> observed as a direct consequence of this.
>  
> This issue came to light during kernel development when using the is_hard flag, 
> where the expected logic was not achieved.Naturally, we opted for the more reliable 
> is_soft flag to address the situation.
>  
> Consequently, when PREEMPT_RT is disabled, there is a potential risk if developers
> choose to use the is_hard flag. I firmly believe this risk should not be overlooked.

You shouldn't try to set the is_hard flag without knowing its
implications. HRTIMER_MODE_HARD is what you should pay attention to.
Everything else is implementation specific.

> I concur with your analysis that one of these flags is redundant. In fact,
> it might be possible to consolidate them based on the overall requirements. 

A timer that is missing HRTIMER_MODE_HARD is not a automatically a
HRTIMER_MODE_SOFT and also a timer missing HRTIMER_MODE_SOFT is not
automatically HRTIMER_MODE_HARD. These depends on RT vs non-RT mode.
Wouldn't your suggestion influence the warning in
hrtimer_start_range_ns()?

> Thanks.
>  
> 
> Cui Guoqi

Sebastian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ