Re: jffs2 changes and Coverity issue in porting code

2018-07-05 Thread Sebastian Huber
Hello Joel, On 05/07/18 17:52, Joel Sherrill wrote: Hi By any chance, do any of the jffs2 updates pick up changes to that method in the porting layer which Coverity thought had an issue? I know the code is the same across multiple OSes and you didn't invent or modify it porting jffs2 to

Re: [GSoC - x86_64] Minimal BSP to review

2018-07-05 Thread Gedare Bloom
On Thu, Jul 5, 2018 at 10:02 AM, Amaan Cheval wrote: > Hi! > > Yeah, the individual commits aren't logical at all. I just thought we > could review the actual code contents (in the "files changed" tab) on > Github (https://github.com/AmaanC/rtems-gsoc18/pull/1/files). Is this > what you meant by

Re: [PATCH v3] coverage : Add support to run coverage in supported bsp without extra options

2018-07-05 Thread Vijay Kumar Banerjee
Hello Chris, If you find some time, please review this patch. It's a small patch but it's important since it affects how the command will look like. please review if this patch is alright or we need to have a different approach. Thanks On 3 July 2018 at 20:30, Vijay Kumar Banerjee wrote: >

Re: [GSoC - x86_64] Minimal BSP to review

2018-07-05 Thread Amaan Cheval
Hi! Yeah, the individual commits aren't logical at all. I just thought we could review the actual code contents (in the "files changed" tab) on Github (https://github.com/AmaanC/rtems-gsoc18/pull/1/files). Is this what you meant by "final patchset"? Once this PR is polished up sufficiently, I

Re: [GSoC - x86_64] Minimal BSP to review

2018-07-05 Thread Sebastian Huber
Hello Amaan, I think it is quite confusing to review the individual commit. I will review the final patch set. Just one thing: x86_64-rtems5-ld --verbose | head -n 20 GNU ld (GNU Binutils) 2.30   Supported emulations:    elf_x86_64    elf_i386    elf_iamcu    elf32_x86_64    elf_l1om   

[GSoC - x86_64] Minimal BSP to review

2018-07-05 Thread Amaan Cheval
Hi! I've made a pull-request that's nearly complete on Github: https://github.com/AmaanC/rtems-gsoc18/pull/1/ I'd appreciate a review before I squash it into 2 commits (1. minimal BSP reaching Init task, and 2. adding the NS16550 console driver) and submit the squashed patches to devel@ after

jffs2 changes and Coverity issue in porting code

2018-07-05 Thread Joel Sherrill
Hi By any chance, do any of the jffs2 updates pick up changes to that method in the porting layer which Coverity thought had an issue? I know the code is the same across multiple OSes and you didn't invent or modify it porting jffs2 to RTEMS. Just curious if the situation might have changed.

[PATCH 04/29] linux: Add rbtree_postorder_for_each_entry_safe()

2018-07-05 Thread Sebastian Huber
Update #3465. 16 0 cpukit/include/linux/rbtree.h 22 0 testsuites/sptests/sprbtree01/init.c diff --git a/cpukit/include/linux/rbtree.h b/cpukit/include/linux/rbtree.h index e1da2c7b9a..53c777e8c1 100644 --- a/cpukit/include/linux/rbtree.h +++ b/cpukit/include/linux/rbtree.h

[PATCH 18/29] tree wide: use kvfree() than conditional kfree()/vfree()

2018-07-05 Thread Sebastian Huber
From: Tetsuo Handa There are many locations that do if (memory_was_allocated_by_vmalloc) vfree(ptr); else kfree(ptr); but kvfree() can handle both kmalloc()ed memory and vmalloc()ed memory using is_vmalloc_addr(). Unless callers have special reasons, we can replace this branch

[PATCH 06/29] jffs2: use generic posix ACL infrastructure

2018-07-05 Thread Sebastian Huber
From: Christoph Hellwig Also don't bother to set up a .get_acl method for symlinks as we do not support access control (ACLs or even mode bits) for symlinks in Linux. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro 2 5 cpukit/libfs/src/jffs2/src/acl.h diff --git

[PATCH 15/29] jffs2: fix handling of corrupted summary length

2018-07-05 Thread Sebastian Huber
From: Chen Jie sm->offset maybe wrong but magic maybe right, the offset do not have CRC. Badness at c00c7580 [verbose debug info unavailable] NIP: c00c7580 LR: c00c718c CTR: 0014 REGS: df07bb40 TRAP: 0700 Not tainted (2.6.34.13-WR4.3.0.0_standard) MSR: 00029000 CR: 22084f84 XER:

[PATCH 08/29] jffs2: avoid soft-lockup in jffs2_reserve_space_gc()

2018-07-05 Thread Sebastian Huber
From: Li Zefan We triggered soft-lockup under stress test on 2.6.34 kernel. BUG: soft lockup - CPU#1 stuck for 60009ms! [lockf2.test:14488] ... [] (jffs2_do_reserve_space+0x420/0x440 [jffs2]) [] (jffs2_reserve_space_gc+0x34/0x78 [jffs2]) [] (jffs2_garbage_collect_dnode.isra.3+0x264/0x478

[PATCH 12/29] kill wbuf_queued/wbuf_dwork_lock

2018-07-05 Thread Sebastian Huber
From: Al Viro schedule_delayed_work() happening when the work is already pending is a cheap no-op. Don't bother with ->wbuf_queued logics - it's both broken (cancelling ->wbuf_dwork leaves it set, as spotted by Jeff Harris) and pointless. It's cheaper to let schedule_delayed_work() handle that

[PATCH 29/29] jffs2: Add README

2018-07-05 Thread Sebastian Huber
Add README to document the corrspending Linux version and the update procedure. Close #3465. 35 0 cpukit/libfs/src/jffs2/README diff --git a/cpukit/libfs/src/jffs2/README b/cpukit/libfs/src/jffs2/README new file mode 100644 index 00..7d9c9f41b2 --- /dev/null +++

[PATCH 14/29] jffs2: compr_rubin: Remove unused function

2018-07-05 Thread Sebastian Huber
From: Rickard Strandqvist Remove the function pulledbits() that is not used anywhere. This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist Reviewed-by: Richard Weinberger Signed-off-by: Brian Norris 0 5

[PATCH 27/29] mtd: Stop assuming mtd_erase() is asynchronous

2018-07-05 Thread Sebastian Huber
From: Boris Brezillon None of the mtd->_erase() implementations work in an asynchronous manner, so let's simplify MTD users that call mtd_erase(). All they need to do is check the value returned by mtd_erase() and assume that != 0 means failure. Signed-off-by: Boris Brezillon Reviewed-by:

[PATCH 05/29] fs/jffs2: use rbtree postorder iteration helper instead of opencoding

2018-07-05 Thread Sebastian Huber
From: Cody P Schafer Use rbtree_postorder_for_each_entry_safe() to destroy the rbtree instead of opencoding an alternate postorder iteration that modifies the tree Signed-off-by: Cody P Schafer Cc: Michel Lespinasse Cc: Jan Kara Cc: David Woodhouse Signed-off-by: Andrew Morton

[PATCH 13/29] jffs2: Drop bogus if in comment

2018-07-05 Thread Sebastian Huber
From: Geert Uytterhoeven Signed-off-by: Geert Uytterhoeven Cc: David Woodhouse Cc: linux-...@lists.infradead.org Signed-off-by: Brian Norris 1 1 cpukit/libfs/src/jffs2/src/readinode.c diff --git a/cpukit/libfs/src/jffs2/src/readinode.c b/cpukit/libfs/src/jffs2/src/readinode.c

[PATCH 16/29] jffs2: fix unbalanced locking

2018-07-05 Thread Sebastian Huber
From: Brian Norris Li Zefan reported an unbalanced locking issue, found by his internal debugging feature on runtime. The particular case he was looking at doesn't lead to a deadlock, as the structure that this lock is embedded in is freed on error. But we should straighten out the error

[PATCH 17/29] jffs2: fix a memleak in read_direntry()

2018-07-05 Thread Sebastian Huber
From: Wei Fang Need to free the memory allocated for 'fd' if failed to read all of the remainder name. Signed-off-by: Wei Fang Signed-off-by: Brian Norris 5 1 cpukit/libfs/src/jffs2/src/readinode.c diff --git a/cpukit/libfs/src/jffs2/src/readinode.c

[PATCH 26/29] jffs2: fix spelling mistake: "requestied" -> "requested"

2018-07-05 Thread Sebastian Huber
From: Colin Ian King trivial fix to spelling mistake in JFFS2_ERROR message Signed-off-by: Colin Ian King [Brian: also fix 'an' -> 'a'] Signed-off-by: Brian Norris 1 1 cpukit/libfs/src/jffs2/src/readinode.c diff --git a/cpukit/libfs/src/jffs2/src/readinode.c

[PATCH 10/29] jffs2: Fix crash due to truncation of csize

2018-07-05 Thread Sebastian Huber
From: Ajesh Kunhipurayil Vijayan mounting JFFS2 partition sometimes crashes with this call trace: [ 1322.24] Kernel bug detected[#1]: [ 1322.244000] Cpu 2 [ 1322.244000] $ 0 : 0018 3ff00070 0001 [ 1322.252000] $ 4 :

[PATCH 02/29] linux: Install

2018-07-05 Thread Sebastian Huber
This makes it possible to test this API. Update #3465. 1 0 cpukit/headers.am 0 0 cpukit/{libfs/src/jffs2 => }/include/linux/rbtree.h diff --git a/cpukit/headers.am b/cpukit/headers.am index 2315db1e7d..fb6e1fc009 100644 --- a/cpukit/headers.am +++ b/cpukit/headers.am @@

[PATCH 25/29] sched/headers: Prepare to move signal wakeup & sigpending methods from into

2018-07-05 Thread Sebastian Huber
From: Ingo Molnar Fix up affected files that include this signal functionality via sched.h. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-ker...@vger.kernel.org Signed-off-by: Ingo Molnar 0 0

[PATCH 07/29] jffs2: remove from wait queue after schedule()

2018-07-05 Thread Sebastian Huber
From: Li Zefan @wait is a local variable, so if we don't remove it from the wait queue list, later wake_up() may end up accessing invalid memory. This was spotted by eyes. Signed-off-by: Li Zefan Cc: David Woodhouse Cc: Artem Bityutskiy Cc: Signed-off-by: Andrew Morton Signed-off-by:

[PATCH 09/29] jffs2: Fix segmentation fault found in stress test

2018-07-05 Thread Sebastian Huber
From: Kamlakant Patel Creating a large file on a JFFS2 partition sometimes crashes with this call trace: [ 306.476000] CPU 13 Unable to handle kernel paging request at virtual address c000dfff8002, epc == c03a80a8, ra == c03a8044 [ 306.488000] Oops[#1]: [ 306.488000] Cpu

[PATCH 24/29] jffs2: Remove jffs2_{get,set,remove}xattr macros

2018-07-05 Thread Sebastian Huber
From: Andreas Gruenbacher When CONFIG_JFFS2_FS_XATTR is off, jffs2_xattr_handlers is defined as NULL. With sb->s_xattr == NULL, the generic_{get,set,remove}xattr functions produce the same result as setting the {get,set,remove}xattr inode operations to NULL, so there is no need for these macros.

[PATCH 00/29] Update JFFS2 port to Linux v4.17

2018-07-05 Thread Sebastian Huber
This patch series adds all JFFS2 changes made by the Linux upstream from Linux v3.11 to v4.17 to the RTEMS port. See also: https://devel.rtems.org/ticket/3465 Ajesh Kunhipurayil Vijayan (1): jffs2: Fix crash due to truncation of csize Al Viro (1): kill wbuf_queued/wbuf_dwork_lock Andreas

[PATCH 21/29] jffs2: Improve post-mount CRC scan efficiency

2018-07-05 Thread Sebastian Huber
From: David Woodhouse We need to finish doing the CRC checks before we can allow writes to happen, and we currently process the inodes in order. This means a call to jffs2_get_ino_cache() for each possible inode# up to c->highest_ino. There may be a lot of lookups which fail, if the inode#

[PATCH 19/29] jffs2: Fix page lock / f->sem deadlock

2018-07-05 Thread Sebastian Huber
From: David Woodhouse With this fix, all code paths should now be obtaining the page lock before f->sem. Reported-by: Szabó Tamás Tested-by: Thomas Betker Signed-off-by: David Woodhouse Cc: sta...@vger.kernel.org 10 7 cpukit/libfs/src/jffs2/src/gc.c diff --git

[PATCH 23/29] vfs: make the string hashes salt the hash

2018-07-05 Thread Sebastian Huber
From: Linus Torvalds We always mixed in the parent pointer into the dentry name hash, but we did it late at lookup time. It turns out that we can simplify that lookup-time action by salting the hash with the parent pointer early instead of late. A few other users of our string hashes also

[PATCH 22/29] mm, fs: get rid of PAGE_CACHE_* and page_cache_{get, release} macros

2018-07-05 Thread Sebastian Huber
From: "Kirill A. Shutemov" PAGE_CACHE_{SIZE,SHIFT,MASK,ALIGN} macros were introduced *long* time ago with promise that one day it will be possible to implement page cache with bigger chunks than PAGE_SIZE. This promise never materialized. And unlikely will. We have many places where