Re: [v2] ubifs: Fix read out-of-bounds in ubifs_jnl_write_inode()

2021-03-03 Thread Chengsong Ke
ping >> Reproducer: >> 0. config KASAN && apply print.patch >> 1. mount ubifs on /root/temp >> 2. run test.sh > > What does test.sh do? Go to Link: https://bugzilla.kernel.org/show_bug.cgi?id=210865. test.sh creates a very long path file test_file, and then create a symbol link link_file for

[PATCH v2] ubifs: Fix read out-of-bounds in ubifs_jnl_write_inode()

2020-12-23 Thread Chengsong Ke
ode_calc_hash. Cc: Fixes: 1e51764a3c2ac0 ("UBIFS: add new flash file system") Link: https://bugzilla.kernel.org/show_bug.cgi?id=210865 Signed-off-by: Chengsong Ke --- fs/ubifs/journal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/ubifs/journal.c b/fs

[PATCH] ubifs: Fix read out-of-bounds in ubifs_jnl_write_inode()

2020-12-22 Thread Chengsong Ke
utes Cc: Fixes: 1e51764a3c2ac0 ("UBIFS: add new flash file system") Link: https://bugzilla.kernel.org/show_bug.cgi?id=210865 Signed-off-by: Chengsong Ke --- fs/ubifs/io.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/fs/ubifs/io.c b/fs/ubifs/io.c

ubifs: Remove the redundant return in dbg_check_nondata_nodes_order

2020-12-10 Thread Chengsong Ke
ping //Chengsong Ke

Re: [PATCH v2] mtd:ubi: Remove useless code in bytes_str_to_int

2020-12-10 Thread Chengsong Ke
On Tue, Nov 3, 2020 at 1:00 PM Chengsong Ke wrote: > > From: Chengsong Ke > > As a local variable, "endp" is neither refered nor returned after this > line "endp += 2", it looks like a useless code, suggest to remove it. > > Signed-off-by: Chengsong

[PATCH v2] mtd:ubi: Remove useless code in bytes_str_to_int

2020-11-03 Thread Chengsong Ke
From: k00524021 As a local variable, "endp" is neither refered nor returned after this line "endp += 2", it looks like a useless code, suggest to remove it. Signed-off-by: Chengsong Ke --- drivers/mtd/ubi/build.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drive

[PATCH] ubifs: Remove useless code in bytes_str_to_int

2020-11-03 Thread Chengsong Ke
From: k00524021 As a local variable, "endp" is neither refered nor returned after this line "endp += 2", it looks like a useless code, suggest to remove it. Signed-off-by: Chengsong Ke --- drivers/mtd/ubi/build.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drive

Re: [PATCH v2] ubifs: Fix the printing type of c->big_lpt

2020-11-02 Thread Chengsong Ke
On Sat, Oct 31, 2020 at 9:56 AM Chengsong Ke wrote: > > Ubifs uses %d to print c->big_lpt, but c->big_lpt is a variable of > type unsigned int and should be printed with %u. > > Well, it is: > unsigned int big_lpt:1; > So, either 0 or 1. > > Does changing it

[PATCH] ubifs: Remove the redundant return in dbg_check_nondata_nodes_order

2020-11-02 Thread Chengsong Ke
There is a redundant return in dbg_check_nondata_nodes_order, which will be never reached. In addition, error code should be returned instead of zero in this branch. Signed-off-by: Chengsong Ke --- fs/ubifs/debug.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/ubifs/debug.c b/fs/ubifs

[PATCH v2] ubifs: Fix the printing type of c->big_lpt

2020-10-31 Thread Chengsong Ke
Ubifs uses %d to print c->big_lpt, but c->big_lpt is a variable of type unsigned int and should be printed with %u. Signed-off-by: Chengsong Ke --- fs/ubifs/debug.c | 2 +- fs/ubifs/lpt.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/ubifs/debug.c b/fs

[PATCH] ubifs: Fix the printing type of c->big_lpt

2020-10-31 Thread Chengsong Ke
Ubifs uses %d to print c->big_lpt, but c->big_lpt is a variable of type unsigned int and should be printed with %u. Reviewed-by: Fangpeng Wang Signed-off-by: Chengsong Ke --- fs/ubifs/debug.c | 2 +- fs/ubifs/lpt.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --gi