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]
Date:   Thu, 31 Jan 2019 17:00:10 +0100
From:   David Sterba <dsterba@...e.cz>
To:     Dennis Zhou <dennis@...nel.org>
Cc:     David Sterba <dsterba@...e.com>,
        Josef Bacik <josef@...icpanda.com>, Chris Mason <clm@...com>,
        Omar Sandoval <osandov@...ndov.com>,
        Nick Terrell <terrelln@...com>, kernel-team@...com,
        linux-btrfs@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 01/11] btrfs: add macros for compression type and level

On Mon, Jan 28, 2019 at 04:24:27PM -0500, Dennis Zhou wrote:
> It is very easy to miss places that rely on a certain bitshifting for
> decyphering the type_level overloading. Make macros handle this instead.

This encoding was a simple way to introduce the combined type and level
for zlib and it could certainly be improved. Either we'll use helpers
like you suggest or add a new structure that contains type and level as
members. That way we'd see where the level still matters and where the
just the type is ok.

I haven't checked how much intrusive this would be, so that's for later
consideration. Some indirection can be removed for the .set_level
callbacks as it does not necessarily need to be a function so I'm
expecting that the code around that would be touched anyway.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ