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: <c2b1cd09-f35e-9281-81a2-75e4d624ae0f@gmail.com>
Date:   Mon, 28 Aug 2023 20:55:01 +0200
From:   Jan Cincera <hcincera@...il.com>
To:     "Darrick J. Wong" <djwong@...nel.org>
Cc:     Namjae Jeon <linkinjeon@...nel.org>,
        Sungjong Seo <sj1557.seo@...sung.com>,
        linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] exfat: add ioctls for accessing attributes

On Mon, Aug 28, 2023, Darrick J. Wong wrote:
> On Sun, Aug 27, 2023 at 12:42:07PM +0200, Jan Cincera wrote:
>> Add GET and SET attributes ioctls to enable attribute modification.
>> We already do this in FAT and a few userspace utils made for it would
>> benefit from this also working on exFAT, namely fatattr.
>>
>> Signed-off-by: Jan Cincera <hcincera@...il.com>
>> ---
>> Changes in v2:
>>   - Removed irrelevant comments.
>>   - Now masking reserved fields.
>>
>>  fs/exfat/exfat_fs.h |  6 +++
>>  fs/exfat/file.c     | 93 +++++++++++++++++++++++++++++++++++++++++++++
>>  2 files changed, 99 insertions(+)
>>
>> diff --git a/fs/exfat/exfat_fs.h b/fs/exfat/exfat_fs.h
>> index 729ada9e26e8..ebe8c4b928f4 100644
>> --- a/fs/exfat/exfat_fs.h
>> +++ b/fs/exfat/exfat_fs.h
>> @@ -149,6 +149,12 @@ enum {
>>  #define DIR_CACHE_SIZE		\
>>  	(DIV_ROUND_UP(EXFAT_DEN_TO_B(ES_MAX_ENTRY_NUM), SECTOR_SIZE) + 1)
>>  
>> +/*
>> + * attribute ioctls, same as their FAT equivalents.
>> + */
>> +#define EXFAT_IOCTL_GET_ATTRIBUTES	_IOR('r', 0x10, __u32)
>> +#define EXFAT_IOCTL_SET_ATTRIBUTES	_IOW('r', 0x11, __u32)
> 
> Can you reuse the definitions from include/uapi/linux/msdos_fs.h instead
> of redefining them here?
> 
> Otherwise this looks like a mostly straight port of the fs/fat/
> versions of these functions.
> 
> --D
> 

I don't think that's necessary right now, as exfat doesn't reuse attribute
definitions either. With some refactoring of existing code we could reuse
both, but I've been trying to keep this patch as simple as possible.

Jan Cincera

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ