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: <3993ce80-7446-2fce-e8da-c677c8cf5225@huawei.com>
Date:   Sun, 8 Apr 2018 09:15:38 +0800
From:   Chao Yu <yuchao0@...wei.com>
To:     Jaegeuk Kim <jaegeuk@...nel.org>
CC:     <linux-f2fs-devel@...ts.sourceforge.net>,
        <linux-kernel@...r.kernel.org>, <chao@...nel.org>
Subject: Re: [PATCH] f2fs: fix to show encrypt flag in FS_IOC_GETFLAGS

On 2018/4/5 11:46, Jaegeuk Kim wrote:
> On 04/03, Chao Yu wrote:
>> On 2018/4/3 4:21, Jaegeuk Kim wrote:
>>> On 04/02, Chao Yu wrote:
>>>> This patch fixes to show encrypt flag in FS_IOC_GETFLAGS like ext4 does.
>>>
>>> Actually, we have to show internal flags owned by f2fs, not generic ones.
>>> We may need to define all of them separately?
>>
>> Agreed, I wrote a patch, could check that? and in that patch, do we need to
>> delete flag definition f2fs don't use?
> 
> IMO, we'd better keep the flags. I merged it and could you add encryption part

Agreed.

> on top of it?

No problem. ;)

Thanks,

> 
> Thanks,
> 
>>
>> Thanks,
>>
>>>
>>>>
>>>> Signed-off-by: Chao Yu <yuchao0@...wei.com>
>>>> ---
>>>>  fs/f2fs/file.c | 9 +++++++--
>>>>  1 file changed, 7 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
>>>> index 8068b015ece5..271fadadaa36 100644
>>>> --- a/fs/f2fs/file.c
>>>> +++ b/fs/f2fs/file.c
>>>> @@ -1584,8 +1584,13 @@ static int f2fs_ioc_getflags(struct file *filp, unsigned long arg)
>>>>  {
>>>>  	struct inode *inode = file_inode(filp);
>>>>  	struct f2fs_inode_info *fi = F2FS_I(inode);
>>>> -	unsigned int flags = fi->i_flags &
>>>> -			(FS_FL_USER_VISIBLE | FS_PROJINHERIT_FL);
>>>> +	unsigned int flags = fi->i_flags;
>>>> +
>>>> +	if (file_is_encrypt(inode))
>>>> +		flags |= FS_ENCRYPT_FL;
>>>> +
>>>> +	flags &= FS_FL_USER_VISIBLE | FS_PROJINHERIT_FL;
>>>> +
>>>>  	return put_user(flags, (int __user *)arg);
>>>>  }
>>>>  
>>>> -- 
>>>> 2.15.0.55.gc2ece9dc4de6
>>>
>>> .
>>>
> 
> .
> 

Powered by blists - more mailing lists