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: <871pkuen2a.fsf@wotan.olymp>
Date: Tue, 16 Dec 2025 10:30:21 +0000
From: Luis Henriques <luis@...lia.com>
To: Bernd Schubert <bschubert@....com>
Cc: Miklos Szeredi <miklos@...redi.hu>,  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 Mon, Dec 15 2025, Bernd Schubert wrote:

> 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.)

Ah, good suggestion.  I'll try to include the usage of that that clean-up
construct in the code.

Cheers,
-- 
Luís

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ