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: <87ikgdx41h.fsf@yellow.woof>
Date: Fri, 17 Oct 2025 11:37:14 +0200
From: Nam Cao <namcao@...utronix.de>
To: Gabriele Monaco <gmonaco@...hat.com>, linux-kernel@...r.kernel.org,
 Steven Rostedt <rostedt@...dmis.org>, linux-trace-kernel@...r.kernel.org
Cc: Gabriele Monaco <gmonaco@...hat.com>, Tomas Glozar <tglozar@...hat.com>,
 Juri Lelli <jlelli@...hat.com>, Clark Williams <williams@...hat.com>, John
 Kacur <jkacur@...hat.com>
Subject: Re: [PATCH v2 12/20] verification/rvgen: Add support for Hybrid
 Automata

Gabriele Monaco <gmonaco@...hat.com> writes:
> +            if any(u in self.env_types.values() for u in ["ns", "us", "ms", "s"]):
> +                buff.append("#define HA_CLK_NS")

That any() twisted my brain. Does the following work?

    if not {"ns", "us", "ms", "s"}.isdisjoint(self.env_types.values())

> +        match unit:
> +            case "us":
> +                value *= 1000
> +            case "ms":
> +                value *= 1000000
> +            case "s":
> +                value *= 1000000000

Use 10**9 instead, so that we don't have to count the zeroes.

Nam

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ