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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6e6b2dc1-1fab-4506-bbad-41edaafd7231@p183>
Date:   Tue, 23 May 2023 11:48:23 +0300
From:   Alexey Dobriyan <adobriyan@...il.com>
To:     Thomas Gleixner <tglx@...utronix.de>
Cc:     linux-kernel@...r.kernel.org, mm-commits@...r.kernel.org,
        akpm@...ux-foundation.org
Subject: Re: + fix-mult_frac-multiple-argument-evaluation-bug.patch added to
 mm-nonmm-unstable branch

On Tue, May 23, 2023 at 01:45:40AM +0200, Thomas Gleixner wrote:
> On Mon, May 22 2023 at 14:15, Andrew Morton wrote:
> > ------------------------------------------------------
> > From: Alexey Dobriyan <adobriyan@...il.com>
> > Subject: include/linux/math.h: fix mult_frac() multiple argument evaluation bug
> > Date: Sat, 20 May 2023 21:25:19 +0300
> >
> > mult_frac() evaluates _all_ arguments multiple times in the body.
> 
> I'm not opposed to the patch, but to the description.
> 
> Multiple evaluation is not a bug per se.

It is kind of a bug if a macro pretends to be a function and is spelled in
lowercase.

> Unless there is a reasonable explanation for the alleged bug this is
> just a cosmetic exercise.

Most usages looks OK, and compiler tend to merge loads so even more
usages are OK. But formally this is not OK:

	static inline unsigned long vfs_pressure_ratio(unsigned long val)
	{
	        return mult_frac(val, sysctl_vfs_cache_pressure, 100);
	}

> Changelogs have to be self explanatory and if the shortlog, aka
> $subject, claims "bug" then there has to be a reasonable explanation
> what the actual bug is.
> 
> Seriously.
> 
> All this is documented, but obviously documention for changelogs and the
> acceptance of patches is just there to be ignored, right?

I don't want to return to kindergarten and document problem which every
C programmer learns exploring MIN(a, b).

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ