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] [day] [month] [year] [list]
Message-ID: <760ee963ce814021ab64e1ec9fee6477@AcuMS.aculab.com>
Date:   Wed, 9 Aug 2023 09:03:05 +0000
From:   David Laight <David.Laight@...LAB.COM>
To:     'Linus Torvalds' <torvalds@...ux-foundation.org>,
        Christian Brauner <brauner@...nel.org>
CC:     Mateusz Guzik <mjguzik@...il.com>,
        "Eric W. Biederman" <ebiederm@...ssion.com>,
        "viro@...iv.linux.org.uk" <viro@...iv.linux.org.uk>,
        "linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "oleg@...hat.com" <oleg@...hat.com>,
        Matthew Wilcox <willy@...radead.org>
Subject: RE: [PATCH v2 (kindof)] fs: use __fput_sync in close(2)

From: Linus Torvalds
> Sent: 08 August 2023 18:05
...
>         return __filp_close(filp, id, true);
> 
> and there is zero clue about what the heck 'true' means.
> 
> At least then the "behavior flags" are named bitmasks, things make
> *sense*. But we have too many of these boolean arguments.

And make the usual case 0.

I was chasing through some code that has a flag for a
conditional lock.
However is was 'NEED_TO_LOCK' not 'ALREADY_LOCKED'.
(bpf calling in with the socket locked).

As well as making the code harder to read it is an accident
just waiting to happen.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ