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: <20241118144104.wjoxtdumjr4xaxcv@quack3>
Date: Mon, 18 Nov 2024 15:41:04 +0100
From: Jan Kara <jack@...e.cz>
To: Mateusz Guzik <mjguzik@...il.com>
Cc: Jan Kara <jack@...e.cz>, brauner@...nel.org, viro@...iv.linux.org.uk,
	linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: Re: [RFC PATCH] vfs: dodge strlen() in vfs_readlink() when ->i_link
 is populated

On Mon 18-11-24 13:20:09, Mateusz Guzik wrote:
> On Mon, Nov 18, 2024 at 12:53 PM Jan Kara <jack@...e.cz> wrote:
> >
> > On Mon 18-11-24 09:53:57, Mateusz Guzik wrote:
> > > This gives me about 1.5% speed up when issuing readlink on /initrd.img
> > > on ext4.
> > >
> > > Signed-off-by: Mateusz Guzik <mjguzik@...il.com>
> > > ---
...
> > > I would leave something of that sort in if it was not defeating the
> > > point of the change.
> > >
> > > However, I'm a little worried some crap fs *does not* fill this in
> > > despite populating i_link.
> > >
> > > Perhaps it would make sense to keep the above with the patch hanging out
> > > in next and remove later?
> > >
> > > Anyhow, worst case, should it turn out i_size does not work there are at
> > > least two 4-byte holes which can be used to store the length (and
> > > chances are some existing field can be converted into a union instead).
> >
> > I'm not sure I completely follow your proposal here...
> >
> 
> I am saying if the size has to be explicitly stored specifically for
> symlinks, 2 options are:
> - fill up one of the holes
> - find a field which is never looked at for symlink inodes and convert
> into a union
> 
> I'm going to look into it.

I guess there's limited enthusiasm for complexity to achieve 1.5% improvement
in readlink which is not *that* common. But I haven't seen the patch and
other guys may have different opinions :) So we'll see.

								Honza
-- 
Jan Kara <jack@...e.com>
SUSE Labs, CR

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ