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: <d6d432828fb542903cf87e1c0be57812cda92b0a.camel@redhat.com>
Date: Wed, 23 Jul 2025 13:18:21 +0200
From: Gabriele Monaco <gmonaco@...hat.com>
To: Nam Cao <namcao@...utronix.de>
Cc: linux-kernel@...r.kernel.org, Steven Rostedt <rostedt@...dmis.org>, 
 linux-trace-kernel <linux-trace-kernel@...r.kernel.org>, Tomas Glozar
 <tglozar@...hat.com>, Juri Lelli <jlelli@...hat.com>,  Clark Williams
 <williams@...hat.com>, John Kacur <jkacur@...hat.com>
Subject: Re: [PATCH v4 09/14] tools/dot2c: Fix generated files going over
 100 column limit

On Mon, 2025-07-21 at 16:52 +0200, Nam Cao wrote:
> On Mon, Jul 21, 2025 at 10:23:19AM +0200, Gabriele Monaco wrote:
> > The dot2c.py script generates all states in a single line. This
> > breaks the
> > 100 column limit when the state machines are non-trivial.
> > 
> > Change dot2c.py to generate the states in separate lines in case
> > the
> > generated line is going to be too long.
> > 
> > Also adapt existing monitors with line length over the limit.
> > 
> > Suggested-by: Nam Cao <namcao@...utronix.de>
> > Signed-off-by: Gabriele Monaco <gmonaco@...hat.com>
> > ---
> > -        strformat = self.__get_state_string_length()
> > -
> > +        maxlen = self.__get_max_strlen_of_states() +
> > len(self.enum_suffix)
> > +        tab_braces = 2 * 8 + 2 + 1 # "\t\t{ " ... "}"
> > +        comma_space = 2 # ", " count last comma here
> 
> PEP8 prefers two spaces before the comments.
> 
> > +        linetoolong = tab_braces + (maxlen + comma_space) *
> > nr_events >= self.line_length
> 
> Shouldn't this be '>' instead of '>='? 100 columns are still within
> the limit.

Right, will do.

Thanks,
Gabriele


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ