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] [day] [month] [year] [list]
Message-ID: <20191224171818.GO4203@ZenIV.linux.org.uk>
Date:   Tue, 24 Dec 2019 17:18:18 +0000
From:   Al Viro <viro@...iv.linux.org.uk>
To:     Lukas Czerner <lczerner@...hat.com>
Cc:     linux-ext4@...r.kernel.org, Theodore Ts'o <tytso@....edu>,
        David Howells <dhowells@...hat.com>
Subject: Re: [PATCH 02/17] ext4: Add fs parameter description

On Tue, Dec 17, 2019 at 05:34:32PM +0100, Lukas Czerner wrote:

> > If so, I would prefer
> > 	fsparam_flag_no("barrier", Opt_barrier),	// barrier | nobarrier
> > 	fsparam_u32("barrier", Opt_barrier),		// barrier=<number>
> > as the solution, with fs_parse() having been taught to allow argument-bearing
> > and argument-less options with the same name, picking the right one.  That
> > way Opt_nobarrier gets removed as well...
> > 
> > I'll push a branch with that stuff later today; will post when it's out...
> 
> That would be great, thanks.

It took longer than I hoped, sorry ;-/  The current patchset is in
#untested.fs_parse; the really interesting part is up to
"turn fs_param_is_... into functions".

One surprising source of PITA around your patchset is ext4_show_options().
It pretty much forces you into keeping "no..." forms separate, even though
normally you could just say
	fsparam_flag_no("quota",               Opt_quota),
and get rid of Opt_noquota, etc.

If you keep that dependency, it'll need to be documented - right in
fs/ext4/super.c, to make sure we don't get "optimizing" followups breaking
the hell out of things.

Said that, I really doubt that token2str() is a good idea.  It might make
more sense to start with separating _ext4_show_options() from that
machinery.

Another thing is that all fsparam_bool() users are modifying user-visible
ABI; use fparam_flag_no() + fsparam_u32() with the same name and same
opt - that'll give you the existing behaviour.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ