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: <0c3d6c2c2273eebcc207ce5010ed90ee80460bed.camel@redhat.com>
Date: Mon, 22 Dec 2025 16:26:32 +0100
From: Gabriele Monaco <gmonaco@...hat.com>
To: Nam Cao <namcao@...utronix.de>, linux-kernel@...r.kernel.org, Steven
 Rostedt <rostedt@...dmis.org>, Masami Hiramatsu <mhiramat@...nel.org>, 
	linux-trace-kernel@...r.kernel.org
Cc: Tomas Glozar <tglozar@...hat.com>, Juri Lelli <jlelli@...hat.com>, Clark
 Williams <williams@...hat.com>, John Kacur <jkacur@...hat.com>
Subject: Re: [PATCH v3 02/13] rv: Add Hybrid Automata monitor type



On Thu, 2025-12-18 at 12:57 +0700, Nam Cao wrote:
> Gabriele Monaco <gmonaco@...hat.com> writes:
> > +static inline void ha_start_timer_ns(struct ha_monitor *ha_mon, enum envs
> > env,
> > +				     u64 expire, u64 time_ns)
> > +{
> > +	u64 passed = ha_invariant_passed_ns(ha_mon, env, expire, time_ns);
> > +
> > +	ha_start_timer_jiffy(ha_mon, ENV_MAX_STORED,
> > +			     nsecs_to_jiffies(expire - passed) + 1,
> > time_ns);
> 
> What is the +1 for? I guess to prevent it being rounded down to zero? If
> so, maybe we should do
> 
>      nsecs_to_jiffies(expire - passed + TICK_NSEC - 1)
> 
> instead.

Yeah that was the reason and your suggestion is actually cleaner.

Thanks,
Gabriele

> 
> Anyway, no big deal:
> Reviewed-by: Nam Cao <namcao@...utronix.de>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ