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]
Date:   Sat, 28 Mar 2020 16:38:27 +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 3/3] f2fs: fix to check f2fs_compressed_file() in
 f2fs_bmap()

On 2020/3/28 3:32, Jaegeuk Kim wrote:
> On 03/27, Chao Yu wrote:
>> Otherwise, for compressed inode, returned physical block address
>> may be wrong.
> 
> We can use bmap to check the allocated (non)compressed blocks.

Sure, I've updated it in v2.

Thanks,

> 
>>
>> Signed-off-by: Chao Yu <yuchao0@...wei.com>
>> ---
>>  fs/f2fs/data.c | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
>> index 24643680489b..f22f3ba10a48 100644
>> --- a/fs/f2fs/data.c
>> +++ b/fs/f2fs/data.c
>> @@ -3591,6 +3591,8 @@ static sector_t f2fs_bmap(struct address_space *mapping, sector_t block)
>>  
>>  	if (f2fs_has_inline_data(inode))
>>  		return 0;
>> +	if (f2fs_compressed_file(inode))
>> +		return 0;
>>  
>>  	/* make sure allocating whole blocks */
>>  	if (mapping_tagged(mapping, PAGECACHE_TAG_DIRTY))
>> -- 
>> 2.18.0.rc1
> .
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ