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: <20240731074814.7043d9ac@kernel.org>
Date: Wed, 31 Jul 2024 07:48:14 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Petr Machata <petrm@...dia.com>
Cc: <davem@...emloft.net>, <netdev@...r.kernel.org>, <edumazet@...gle.com>,
 <pabeni@...hat.com>, <sdf@...ichev.me>, <shuah@...nel.org>
Subject: Re: [PATCH net-next v2] selftests: net: ksft: print more of the
 stack for checks

On Wed, 31 Jul 2024 13:07:26 +0200 Petr Machata wrote:
> > +            started |= frame.function == 'ksft_run'  
> 
> Hmm, using bitwise operations on booleans is somewhat unusual in Python
> I think, especially if here the short-circuiting of "or" wouldn't be a
> problem. But it doesn't degrade to integers so I guess it's well-defined.

Right, I thought the automatic conversions to booleans are sometimes
considered in poor taste in Python, but wasn't aware that bitwise ops
may be frowned upon. IIUC the alternative would be:

	if frame.function == 'ksft_run':
		started = True

or

	started = started or frame.function == 'ksft_run'

or another way?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ