[f2fs-dev] [PATCH] f2fs: remove the unused compr parameter

2020-06-15 Thread Wang Xiaojun
The parameter compr is unused in the f2fs_cluster_blocks function so we no longer need to pass it as a parameter. Signed-off-by: Wang Xiaojun --- fs/f2fs/compress.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c index

Re: [f2fs-dev] [PATCH] f2fs: fix use-after-free when accessing bio->bi_crypt_context

2020-06-15 Thread Sahitya Tummala
On Mon, Jun 15, 2020 at 08:47:20AM -0700, Eric Biggers wrote: > On Mon, Jun 15, 2020 at 03:23:16PM +0530, Sahitya Tummala wrote: > > > > > > Should I fold this change into the original patch? Or keep it as a > > > separate patch when I send out the fscrypt/f2fs inline encryption > > > patches? >

Re: [f2fs-dev] [PATCH] f2fs: Eliminate usage of uninitialized_var() macro

2020-06-15 Thread Kees Cook
On Mon, Jun 15, 2020 at 04:51:32PM +0800, Jason Yan wrote: > This is an effort to eliminate the uninitialized_var() macro[1]. > > The use of this macro is the wrong solution because it forces off ANY > analysis by the compiler for a given variable. It even masks "unused > variable" warnings. > >

[f2fs-dev] [PATCH 3/4] lib: use ${libuuid_LIBS} instead of -luuid everywhere

2020-06-15 Thread Jaegeuk Kim
From: Rolf Eike Beer Otherwise linking will fail if the library is in an uncommon location or has a non-standard name. Signed-off-by: Rolf Eike Beer Signed-off-by: Jaegeuk Kim --- mkfs/Makefile.am | 2 +- tools/Makefile.am | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git

[f2fs-dev] [PATCH 2/4] lib: fix include path for blkid.h

2020-06-15 Thread Jaegeuk Kim
From: Rolf Eike Beer $ pkg-config --cflags blkid -I/usr/include/blkid The "blkid/" directory is actually part of the include path. This usually still works because most people have the path one level up in their default include path. Signed-off-by: Rolf Eike Beer Signed-off-by: Jaegeuk Kim

[f2fs-dev] [PATCH 1/4] lib: fix include path for uuid.h

2020-06-15 Thread Jaegeuk Kim
From: Rolf Eike Beer $ pkg-config --cflags uuid -I/usr/include/uuid The "uuid/" directory is actually part of the include path. This usually still works because most people have the path one level up in their default include path. Signed-off-by: Rolf Eike Beer Signed-off-by: Jaegeuk Kim ---

[f2fs-dev] [PATCH 4/4] lib: pass all needed include paths to libf2fs

2020-06-15 Thread Jaegeuk Kim
From: Rolf Eike Beer Otherwise the paths to uuid and blkid headers extracted from pkg-config are not respected. Signed-off-by: Rolf Eike Beer Signed-off-by: Jaegeuk Kim --- mkfs/Makefile.am | 1 - 1 file changed, 1 deletion(-) diff --git a/mkfs/Makefile.am b/mkfs/Makefile.am index

Re: [f2fs-dev] [PATCH v3] f2fs: use kfree() instead of kvfree() to free superblock data

2020-06-15 Thread Jaegeuk Kim
On 06/09, Eric Biggers wrote: > On Wed, Jun 10, 2020 at 01:14:46AM +0300, Denis Efremov wrote: > > Use kfree() instead of kvfree() to free super in read_raw_super_block() > > because the memory is allocated with kzalloc() in the function. > > Use kfree() instead of kvfree() to free sbi, raw_super

Re: [f2fs-dev] [PATCH] f2fs: fix use-after-free when accessing bio->bi_crypt_context

2020-06-15 Thread Eric Biggers
On Mon, Jun 15, 2020 at 03:23:16PM +0530, Sahitya Tummala wrote: > > > > Should I fold this change into the original patch? Or keep it as a > > separate patch when I send out the fscrypt/f2fs inline encryption > > patches? > > It may be good to keep it seperate as we already have the base FBE

[f2fs-dev] [PATCH v3] f2fs: fix use-after-free when accessing bio->bi_crypt_context

2020-06-15 Thread Sahitya Tummala
There could be a potential race between these two paths below, leading to use-after-free when accessing bio->bi_crypt_context. f2fs_write_cache_pages ->f2fs_do_write_data_page on page#1 ->f2fs_inplace_write_data ->f2fs_merge_page_bio ->add_bio_entry ->f2fs_do_write_data_page on

[f2fs-dev] [PATCH v2] f2fs: fix use-after-free when accessing bio->bi_crypt_context

2020-06-15 Thread Sahitya Tummala
There could be a potential race between these two paths below, leading to use-after-free when accessing bio->bi_crypt_context. f2fs_write_cache_pages ->f2fs_do_write_data_page on page#1 ->f2fs_inplace_write_data ->f2fs_merge_page_bio ->add_bio_entry ->f2fs_do_write_data_page on

Re: [f2fs-dev] [PATCH] f2fs: fix use-after-free when accessing bio->bi_crypt_context

2020-06-15 Thread Sahitya Tummala
Hi Satya, On Mon, Jun 15, 2020 at 06:16:33AM +, Satya Tangirala wrote: > On Sun, Jun 14, 2020 at 10:00:19PM -0700, Eric Biggers wrote: > > On Mon, Jun 15, 2020 at 09:29:48AM +0530, Sahitya Tummala wrote: > > > There could be a potential race between these two paths below, > > > leading to

Re: [f2fs-dev] [PATCH] f2fs: fix use-after-free when accessing bio->bi_crypt_context

2020-06-15 Thread Sahitya Tummala
Hi Eric, On Sun, Jun 14, 2020 at 10:00:19PM -0700, Eric Biggers wrote: > On Mon, Jun 15, 2020 at 09:29:48AM +0530, Sahitya Tummala wrote: > > There could be a potential race between these two paths below, > > leading to use-after-free when accessing bio->bi_crypt_context. > > > >

Re: [f2fs-dev] [PATCH] f2fs: Eliminate usage of uninitialized_var() macro

2020-06-15 Thread Chao Yu
On 2020/6/15 16:51, Jason Yan wrote: > This is an effort to eliminate the uninitialized_var() macro[1]. > > The use of this macro is the wrong solution because it forces off ANY > analysis by the compiler for a given variable. It even masks "unused > variable" warnings. > > Quoted from Linus[2]:

[f2fs-dev] [PATCH] f2fs: Eliminate usage of uninitialized_var() macro

2020-06-15 Thread Jason Yan
This is an effort to eliminate the uninitialized_var() macro[1]. The use of this macro is the wrong solution because it forces off ANY analysis by the compiler for a given variable. It even masks "unused variable" warnings. Quoted from Linus[2]: "It's a horrible thing to use, in that it adds

Re: [f2fs-dev] [PATCH] f2fs: Eliminate usage of uninitialized_var() macro

2020-06-15 Thread Jason Yan
在 2020/6/15 16:26, Chao Yu 写道: On 2020/6/15 12:02, Jason Yan wrote: This is an effort to eliminate the uninitialized_var() macro[1]. The use of this macro is the wrong solution because it forces off ANY analysis by the compiler for a given variable. It even masks "unused variable" warnings.

Re: [f2fs-dev] [PATCH] f2fs: Eliminate usage of uninitialized_var() macro

2020-06-15 Thread Chao Yu
On 2020/6/15 12:02, Jason Yan wrote: > This is an effort to eliminate the uninitialized_var() macro[1]. > > The use of this macro is the wrong solution because it forces off ANY > analysis by the compiler for a given variable. It even masks "unused > variable" warnings. > > Quoted from Linus[2]:

Re: [f2fs-dev] [PATCH v2] f2fs: remove useless truncate in f2fs_collapse_range()

2020-06-15 Thread Chao Yu
On 2020/6/15 16:11, Wei Fang wrote: > Since offset < new_size, no need to do truncate_pagecache() again > with new_size. > > Signed-off-by: Wei Fang Reviewed-by: Chao Yu Thanks, ___ Linux-f2fs-devel mailing list

[f2fs-dev] [PATCH v2] f2fs: remove useless truncate in f2fs_collapse_range()

2020-06-15 Thread Wei Fang
Since offset < new_size, no need to do truncate_pagecache() again with new_size. Signed-off-by: Wei Fang --- v2: remove the lock coverage change fs/f2fs/file.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 3268f8dd59bb..98721f9bef25 100644 ---

Re: [f2fs-dev] [PATCH] f2fs: remove useless truncate in f2fs_collapse_range()

2020-06-15 Thread Wei Fang
On 2020/6/15 9:42, Chao Yu wrote: > Hi Wei Fang, > > On 2020/6/13 12:25, Wei Fang wrote: >> Since offset < new_size, no need to do truncate_pagecache() again >> with new_size. >> >> Signed-off-by: Wei Fang >> --- >> fs/f2fs/file.c | 5 ++--- >> 1 file changed, 2 insertions(+), 3 deletions(-)

[f2fs-dev] [ANNOUNCE] fsverity-utils v1.1

2020-06-15 Thread Eric Biggers
I've released fsverity-utils v1.1: Git: https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/fsverity-utils.git/tag/?h=v1.1 Tarball: https://kernel.org/pub/linux/kernel/people/ebiggers/fsverity-utils/v1.1/ Release notes: * Split the file measurement computation and signing functionality

[f2fs-dev] [PATCH 11/29] fs: docs: f2fs.rst: fix a broken table

2020-06-15 Thread Mauro Carvalho Chehab
As reported by Sphinx: Documentation/filesystems/f2fs.rst:229: WARNING: Malformed table. Text in column margin in table line 126. == background_gc=%s Turn on/off cleaning

[f2fs-dev] [PATCH 00/29] Documentation fixes

2020-06-15 Thread Mauro Carvalho Chehab
Hi Jon, That's a bunch of files I have to be applied on the top of v5.8-rc1 fixing documentation warnings. I already removed some duplicated stuff. Regards, Mauro Mauro Carvalho Chehab (29): mm: vmalloc.c: remove a kernel-doc annotation from a removed parameter net: dev: add a missing

Re: [f2fs-dev] [PATCH] f2fs: fix use-after-free when accessing bio->bi_crypt_context

2020-06-15 Thread Satya Tangirala via Linux-f2fs-devel
On Sun, Jun 14, 2020 at 10:00:19PM -0700, Eric Biggers wrote: > On Mon, Jun 15, 2020 at 09:29:48AM +0530, Sahitya Tummala wrote: > > There could be a potential race between these two paths below, > > leading to use-after-free when accessing bio->bi_crypt_context. > > > > f2fs_write_cache_pages >