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  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]
Date:   Wed, 12 Aug 2020 22:25:34 +0900
From:   Tetsuhiro Kohada <kohada.t2@...il.com>
To:     Namjae Jeon <namjae.jeon@...sung.com>
Cc:     kohada.tetsuhiro@...mitsubishielectric.co.jp,
        mori.takahiro@...mitsubishielectric.co.jp,
        motai.hirotaka@...mitsubishielectric.co.jp,
        'Sungjong Seo' <sj1557.seo@...sung.com>,
        linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] exfat: integrates dir-entry getting and validation

Thank you for your reply.

>> @@ -171,7 +174,9 @@ struct exfat_entry_set_cache {
>>   	unsigned int start_off;
>>   	int num_bh;
>>   	struct buffer_head *bh[DIR_CACHE_SIZE];
>> -	unsigned int num_entries;
>> +	int num_entries;
>> +	struct exfat_de_file *de_file;
>> +	struct exfat_de_stream *de_stream;
> I prefer to assign validated entries to **de and use it using enum value.
> 	struct exfat_dentry **de;

I've tried several implementations that add a struct exfat_dentry type.(*de0 & *de1;  *de[2]; etc...)
The problem with the struct exfat_dentry type is that it is too flexible for type.
This means weak typing.
Therefore, when using them,
	de[XXX_FILE]->dentry.file.zzz ...
It is necessary to re-specify the type. (against the DRY principle)
Strong typing prevents use with wrong type, at compiling.

I think the approach of using de_file/de_stream could be strongly typed.
I don't think we need excessive flexibility.


BR
---
Tetsuhiro Kohada <kohada.t2@...il.com>

Powered by blists - more mailing lists