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: <834d6546-a87b-44b9-8f1e-53346a9bb7e6@ddn.com>
Date: Mon, 15 Dec 2025 14:03:35 +0000
From: Bernd Schubert <bschubert@....com>
To: Luis Henriques <luis@...lia.com>, Miklos Szeredi <miklos@...redi.hu>
CC: Amir Goldstein <amir73il@...il.com>, "Darrick J. Wong"
	<djwong@...nel.org>, Kevin Chen <kchen@....com>, Horst Birthelmer
	<hbirthelmer@....com>, "linux-fsdevel@...r.kernel.org"
	<linux-fsdevel@...r.kernel.org>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>, Matt Harvey <mharvey@...ptrading.com>,
	"kernel-dev@...lia.com" <kernel-dev@...lia.com>
Subject: Re: [RFC PATCH v2 2/6] fuse: move fuse_entry_out structs out of the
 stack

On 12/12/25 19:12, Luis Henriques wrote:
> This patch simply turns all struct fuse_entry_out instances that are
> allocated in the stack into dynamically allocated structs.  This is a
> preparation patch for further changes, including the extra helper function
> used to actually allocate the memory.
> 
> Also, remove all the memset()s that are used to zero-out these structures,
> as kzalloc() is being used.
> 
> Signed-off-by: Luis Henriques <luis@...lia.com>
> ---
>   fs/fuse/dir.c    | 139 ++++++++++++++++++++++++++++++-----------------
>   fs/fuse/fuse_i.h |   9 +++
>   fs/fuse/inode.c  |  20 +++++--
>   3 files changed, 114 insertions(+), 54 deletions(-)
> 
> diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c
> index 4dfe964a491c..e3fd5d148741 100644
> --- a/fs/fuse/dir.c
> +++ b/fs/fuse/dir.c
> @@ -172,7 +172,6 @@ static void fuse_lookup_init(struct fuse_conn *fc, struct fuse_args *args,
>   			     u64 nodeid, const struct qstr *name,
>   			     struct fuse_entry_out *outarg)
>   {
> -	memset(outarg, 0, sizeof(struct fuse_entry_out));
>   	args->opcode = FUSE_LOOKUP;
>   	args->nodeid = nodeid;
>   	args->in_numargs = 3;
> @@ -213,7 +212,7 @@ static int fuse_dentry_revalidate(struct inode *dir, const struct qstr *name,
>   		goto invalid;
>   	else if (time_before64(fuse_dentry_time(entry), get_jiffies_64()) ||
>   		 (flags & (LOOKUP_EXCL | LOOKUP_REVAL | LOOKUP_RENAME_TARGET))) {
> -		struct fuse_entry_out outarg;
> +		struct fuse_entry_out *outarg;


How about using __free(kfree) for outarg? I think it would simplify
error handling a bit?
(Still reviewing other parts.)


Thanks,
Bernd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ