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: <6c527e97-c4a6-dc58-13fb-516f77e5e068@oppo.com>
Date:   Tue, 20 Jun 2023 10:42:52 +0800
From:   何云蕾(Yunlei he) <heyunlei@...o.com>
To:     Chao Yu <chao@...nel.org>, jaegeuk@...nel.org
Cc:     linux-f2fs-devel@...ts.sourceforge.net,
        linux-kernel@...r.kernel.org
Subject: Re: [f2fs-dev][PATCH] f2fs: not allowed to set file both cold and hot


On 2023/6/20 8:33, Chao Yu wrote:
> On 2023/6/13 16:52, Yunlei He wrote:
>> File set both cold and hot advise bit is confusion, so
>> return EINVAL to avoid this case.
>>
>> Signed-off-by: Yunlei He <heyunlei@...o.com>
>> ---
>>   fs/f2fs/xattr.c | 3 +++
>>   1 file changed, 3 insertions(+)
>>
>> diff --git a/fs/f2fs/xattr.c b/fs/f2fs/xattr.c
>> index 213805d3592c..917f3ac9f1a1 100644
>> --- a/fs/f2fs/xattr.c
>> +++ b/fs/f2fs/xattr.c
>> @@ -127,6 +127,9 @@ static int f2fs_xattr_advise_set(const struct 
>> xattr_handler *handler,
>>                  return -EINVAL;
>>
>>          new_advise = new_advise & FADVISE_MODIFIABLE_BITS;
>> +       if ((new_advise & FADVISE_COLD_BIT) && (new_advise & 
>> FADVISE_HOT_BIT))
>> +               return -EINVAL;
>
> Yunlei,
>
> What about the below case:
>
> 1. f2fs_xattr_advise_set(FADVISE_COLD_BIT)
> 2. f2fs_xattr_advise_set(FADVISE_HOT_BIT)

Hi,  Chao,

     I test this case work well with this patch,  case below will return 
-EINVAL:

     f2fs_xattr_advise_set(FADVISE_COLD_BIT | FADVISE_HOT_BIT)

Thanks,

>
> Thanks,
>
>> +
>>          new_advise |= old_advise & ~FADVISE_MODIFIABLE_BITS;
>>
>>          F2FS_I(inode)->i_advise = new_advise;
>> -- 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ