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: <20240508173835.GB19059@sol.localdomain>
Date: Wed, 8 May 2024 10:38:35 -0700
From: Eric Biggers <ebiggers@...nel.org>
To: Mateusz Guzik <mjguzik@...il.com>
Cc: tytso@....edu, jaegeuk@...nel.org, linux-kernel@...r.kernel.org,
	linux-fscrypt@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH v2] fscrypt: try to avoid refing parent dentry in
 fscrypt_file_open

On Wed, May 08, 2024 at 10:14:00AM +0200, Mateusz Guzik wrote:
> Merely checking if the directory is encrypted happens for every open
> when using ext4, at the moment refing and unrefing the parent, costing 2
> atomics and serializing opens of different files.
> 
> The most common case of encryption not being used can be checked for
> with RCU instead.
> 
> Sample result from open1_processes -t 20 ("Separate file open/close")
> from will-it-scale on Sapphire Rapids (ops/s):
> before:	12539898
> after:	25575494 (+103%)
> 
> v2:
> - add a comment justifying rcu usage, submitted by Eric Biggers
> - whack spurious IS_ENCRYPTED check from the refed case
> 
> Signed-off-by: Mateusz Guzik <mjguzik@...il.com>
> ---
>  fs/crypto/hooks.c | 32 ++++++++++++++++++++++++++------
>  1 file changed, 26 insertions(+), 6 deletions(-)

Applied to https://git.kernel.org/pub/scm/fs/fscrypt/linux.git/log/?h=for-next

Thanks!

- Eric

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ