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: <87h5sdso27.fsf@yellow.woof>
Date: Thu, 22 Jan 2026 15:46:08 +0100
From: Nam Cao <namcao@...utronix.de>
To: Wander Lairson Costa <wander@...hat.com>, Steven Rostedt
 <rostedt@...dmis.org>, Gabriele Monaco <gmonaco@...hat.com>, Wander
 Lairson Costa <wander@...hat.com>, open list
 <linux-kernel@...r.kernel.org>, "open list:RUNTIME VERIFICATION (RV)"
 <linux-trace-kernel@...r.kernel.org>
Subject: Re: [PATCH 03/26] rv/rvgen: replace % string formatting with f-strings

Wander Lairson Costa <wander@...hat.com> writes:
> Replace all instances of percent-style string formatting with
> f-strings across the rvgen codebase. This modernizes the string
> formatting to use Python 3.6+ features, providing clearer and more
> maintainable code while improving runtime performance.
>
> The conversion handles all formatting cases including simple variable
> substitution, multi-variable formatting, and complex format specifiers.
> Dynamic width formatting is converted from "%*s" to "{var:>{width}}"
> using proper alignment syntax. Template strings for generated C code
> properly escape braces using double-brace syntax to produce literal
> braces in the output.
>
> F-strings provide approximately 2x performance improvement over percent
> formatting and are the recommended approach in modern Python.
>
> Signed-off-by: Wander Lairson Costa <wander@...hat.com>

Reviewed-by: Nam Cao <namcao@...utronix.de>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ