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: <20250822184547.GX22430@suse.cz>
Date: Fri, 22 Aug 2025 20:45:47 +0200
From: David Sterba <dsterba@...e.cz>
To: Calvin Owens <calvin@...nvd.org>
Cc: Qu Wenruo <quwenruo.btrfs@....com>, linux-kernel@...r.kernel.org,
	linux-btrfs@...r.kernel.org, Daniel Vacek <neelx@...e.com>,
	David Sterba <dsterba@...e.com>, Josef Bacik <josef@...icpanda.com>,
	Chris Mason <clm@...com>
Subject: Re: [PATCH] btrfs: Accept and ignore compression level for lzo

On Fri, Aug 22, 2025 at 02:28:29AM -0700, Calvin Owens wrote:
> On Friday 08/22 at 17:57 +0930, Qu Wenruo wrote:
> > 在 2025/8/22 17:15, Calvin Owens 写道:
> > > The compression level is meaningless for lzo, but before commit
> > > 3f093ccb95f30 ("btrfs: harden parsing of compression mount options"),
> > > it was silently ignored if passed.
> > 
> > Since LZO doesn't support compression level, why providing a level parameter
> > in the first place?
> 
> Interpreting "no level" as "level is always one" doesn't seem that
> unreasonable to me, especially since it has worked forever.

As it currently works, no level means use the default, which is defined
for all compression. For LZO it's implicit and 1.

> > I think it's time for those users to properly update their mount options.
> 
> It's a user visable regression, and fixing it has zero possible
> downside. I think you should take my patch :)

I tend to agree this is a usability regression, even if LZO is a bit odd
with levels, accepting the allowed values should work.

The mount options and level combinations that should work:

- compress=NAME   - use default level for NAME
- compress=NAME:0 - use default, while accepting the level setting
- compress=NAME:N - if N is in the allowed range for NAME then take it

The syntax is consistent for all three compressions.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ