summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* bsp/lpc32xx: Optimize Ethernet transmitSebastian Huber2022-06-271-1/+1
| | | | | The updated Ethernet interface driver in libbsd profits from more transmit descriptors since it no longer uses transmit done interrupts.
* bsp/stm32h7: Exclude some testsSebastian Huber2022-06-241-0/+2
|
* bsp/rtl22xx: Exclude exit03Sebastian Huber2022-06-241-0/+1
|
* tstsmallmem: Exclude exit03 and tftpfsSebastian Huber2022-06-241-0/+2
|
* riscv: Include missing header fileSebastian Huber2022-06-241-0/+2
|
* score: Account for <sys/bitset.h> API changesSebastian Huber2022-06-231-17/+73
| | | | Update #4667.
* score: Remove unused _Processor_mask_Nand()Sebastian Huber2022-06-231-16/+0
| | | | Update #4667.
* spcpuset01: Account for <sys/cpuset.h> API changesSebastian Huber2022-06-231-0/+10
| | | | Update #4667.
* score: Make SMP only code explicitSebastian Huber2022-06-235-31/+36
| | | | | | | Conditional expressions with inline functions are not optimized away if optimization is disabled. Avoid such expressions to prevent dead branches. It helps also during code review to immediately see if a loop is used or not.
* kern_tc.c: Provide a weak hardpps() implementationSebastian Huber2022-06-231-0/+12
| | | | | | | The real implementation of hardpps() is defined in kern_ntptime.c. Use it only if the NTP support is needed by the application. Update #2349.
* score: Use right clock for threadq timeoutsSebastian Huber2022-06-232-4/+10
| | | | | | | | Use CLOCK_REALTIME and CLOCK_MONOTONIC for relative thread queue timeouts instead of CLOCK_REALTIME_COARSE and CLOCK_MONOTONIC_COARSE. This fixes an issue with clock_nanosleep() in combination with clock_gettime(). Close #4669.
* TFTPFS: Fix test configuration for FP targetsSebastian Huber2022-06-211-0/+2
| | | | | | The test uses snprintf(). Update #4666.
* TFTPFS: Reduce test configurationSebastian Huber2022-06-211-3/+2
| | | | Update #4666.
* TFTPFS: Add testsFrank Kühndel2022-06-218-1/+9506
| | | | Update #4666.
* TFTPFS: Implement block and window size optionsFrank Kühndel2022-06-215-673/+2195
| | | | | | | | | | | | | | | | | | | | | The original file cpukit/libfs/src/ftpfs/tftpDriver.c is split into two: tftpfs.c - This file contains the code from tftpDriver.c related to file system operations such as mount(), open(), read(), and so on. tftpDriver.c - In the original file remains only the code related to networking. This code implements the Trivial File Transfer Protocol (TFTP). Moreover, the code is extended to support * RFC 2347 TFTP Option Extension * RFC 2348 TFTP Blocksize Option * RFC 7440 TFTP Windowsize Option Update #4666.
* TFTPFS: Cleanup: Remove spaces at lines endsFrank Kühndel2022-06-211-10/+10
| | | | Update #4666.
* testsuite: Fix gcc 12 warningsChris Johns2022-06-2162-89/+96
|
* jffs2: Update baseline version to Linux v5.9Sebastian Huber2022-06-201-2/+2
|
* treewide: Use fallthrough pseudo-keywordGustavo A. R. Silva2022-06-202-1/+2
| | | | | | | | | | Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary fall-through markings when it is the case. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
* jffs2: fix jffs2 mounting failureZhe Li2022-06-201-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Thanks for the advice mentioned in the email. This is my v3 patch for this problem. Mounting jffs2 on nand flash will get message "failed: I/O error" with the steps listed below. 1.umount jffs2 2.erase nand flash 3.mount jffs2 on it (this mounting operation will be successful) 4.do chown or chmod to the mount point directory 5.umount jffs2 6.mount jffs2 on nand flash After step 6, we will get message "mount ... failed: I/O error". Typical image of this problem is like: Empty space found from 0x00000000 to 0x008a0000 Inode node at xx, totlen 0x00000044, #ino 1, version 1, isize 0... The reason for this mounting failure is that at the end of function jffs2_scan_medium(), jffs2 will check the used_size and some info of nr_blocks.If conditions are met, it will return -EIO. The detail is that, in the steps listed above, step 4 will write jffs2_raw_inode into flash without jffs2_raw_dirent, which will cause that there are some jffs2_raw_inode but no jffs2_raw_dirent on flash. This will meet the condition at the end of function jffs2_scan_medium() and return -EIO if we umount jffs2 and mount it again. We notice that jffs2 add the value of c->unchecked_size if we find an inode node while mounting. And jffs2 will never add the value of c->unchecked_size in other situations. So this patch add one more condition about c->unchecked_size of the judgement to fix this problem. Signed-off-by: Zhe Li <lizhe67@huawei.com> Signed-off-by: Richard Weinberger <richard@nod.at>
* treewide: Remove uninitialized_var() usageKees Cook2022-06-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using uninitialized_var() is dangerous as it papers over real bugs[1] (or can in the future), and suppresses unrelated compiler warnings (e.g. "unused variable"). If the compiler thinks it is uninitialized, either simply initialize the variable or make compiler changes. In preparation for removing[2] the[3] macro[4], remove all remaining needless uses with the following script: git grep '\buninitialized_var\b' | cut -d: -f1 | sort -u | \ xargs perl -pi -e \ 's/\buninitialized_var\(([^\)]+)\)/\1/g; s:\s*/\* (GCC be quiet|to make compiler happy) \*/$::g;' drivers/video/fbdev/riva/riva_hw.c was manually tweaked to avoid pathological white-space. No outstanding warnings were found building allmodconfig with GCC 9.3.0 for x86_64, i386, arm64, arm, powerpc, powerpc64le, s390x, mips, sparc64, alpha, and m68k. [1] https://lore.kernel.org/lkml/20200603174714.192027-1-glider@google.com/ [2] https://lore.kernel.org/lkml/CA+55aFw+Vbj0i=1TGqCR5vQkCzWJ0QxK6CernOU6eedsudAixw@mail.gmail.com/ [3] https://lore.kernel.org/lkml/CA+55aFwgbgqhbp1fkxvRKEpzyR5J8n1vKT1VZdz9knmPuXhOeg@mail.gmail.com/ [4] https://lore.kernel.org/lkml/CA+55aFz2500WfbKXAx8s67wrm9=yVJu65TpLgN_ybYNv0VEOKA@mail.gmail.com/ Reviewed-by: Leon Romanovsky <leonro@mellanox.com> # drivers/infiniband and mlx4/mlx5 Acked-by: Jason Gunthorpe <jgg@mellanox.com> # IB Acked-by: Kalle Valo <kvalo@codeaurora.org> # wireless drivers Reviewed-by: Chao Yu <yuchao0@huawei.com> # erofs Signed-off-by: Kees Cook <keescook@chromium.org>
* jffs2: Replace zero-length array with flexible-arrayGustavo A. R. Silva2022-06-202-3/+3
| | | | | | | | | | | | There is a regular need in the kernel to provide a way to declare having a dynamically sized set of trailing elements in a structure. Kernel code should always use “flexible array members”[1] for these cases. The older style of one-element or zero-length arrays should no longer be used[2]. [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://github.com/KSPP/linux/issues/21 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
* Revert "jffs2: Fix possible null-pointer dereferences in ↵Joel Stanley2022-06-201-1/+1
| | | | | | | | | | | | | | | | | jffs2_add_frag_to_fragtree()" This reverts commit f2538f999345405f7d2e1194c0c8efa4e11f7b3a. The patch stopped JFFS2 from being able to mount an existing filesystem with the following errors: jffs2: error: (77) jffs2_build_inode_fragtree: Add node to tree failed -22 jffs2: error: (77) jffs2_do_read_inode_internal: Failed to build final fragtree for inode #5377: error -22 Fixes: f2538f999345 ("jffs2: Fix possible null-pointer dereferences...") Cc: stable@vger.kernel.org Suggested-by: Hou Tao <houtao1@huawei.com> Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Richard Weinberger <richard@nod.at>
* jffs2: Fix memory leak in jffs2_scan_eraseblock() error pathWenwen Wang2022-06-201-1/+4
| | | | | | | | | | In jffs2_scan_eraseblock(), 'sumptr' is allocated through kmalloc() if 'sumlen' is larger than 'buf_size'. However, it is not deallocated in the following execution if jffs2_fill_scan_buf() fails, leading to a memory leak bug. To fix this issue, free 'sumptr' before returning the error. Signed-off-by: Wenwen Wang <wenwen@cs.uga.edu> Signed-off-by: Richard Weinberger <richard@nod.at>
* jffs2: Remove jffs2_gc_fetch_page and jffs2_gc_release_pageChristoph Hellwig2022-06-203-35/+27
| | | | | | | | | Merge these two helpers into the only callers to get rid of some amazingly bad calling conventions. Suggested-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Richard Weinberger <richard@nod.at>
* jffs2: Fix possible null-pointer dereferences in jffs2_add_frag_to_fragtree()Jia-Ju Bai2022-06-201-1/+1
| | | | | | | | | | | | | | | | | | | | In jffs2_add_frag_to_fragtree(), there is an if statement on line 223 to check whether "this" is NULL: if (this) When "this" is NULL, it is used at several places, such as on line 249: if (this->node) and on line 260: if (newfrag->ofs > this->ofs) Thus possible null-pointer dereferences may occur. To fix these bugs, -EINVAL is returned when "this" is NULL. These bugs are found by a static analysis tool STCheck written by us. Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com> Signed-off-by: Richard Weinberger <richard@nod.at>
* jffs2: Remove C++ style comments from uapi headerMasahiro Yamada2022-06-201-5/+0
| | | | | | | | | | | | | | | | | | | Linux kernel tolerates C++ style comments these days. Actually, the SPDX License tags for .c files start with //. On the other hand, uapi headers are written in more strict C, where the C++ comment style is forbidden. I simply dropped these lines instead of fixing the comment style. This code has been always commented out since it was added around Linux 2.4.9 (i.e. commented out for more than 17 years). 'Maybe later...' will never happen. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Richard Weinberger <richard@nod.at> Signed-off-by: Richard Weinberger <richard@nod.at>
* jffs2: fix use-after-free on symlink traversalAl Viro2022-06-201-1/+2
| | | | | | | | free the symlink body after the same RCU delay we have for freeing the struct inode itself, so that traversal during RCU pathwalk wouldn't step into freed memory. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* Convert jffs2 acl to struct_sizeMatthew Wilcox2022-06-201-0/+1
| | | | | | | Need to tell the compiler that the acl entries follow the acl header. Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com> Signed-off-by: Kees Cook <keescook@chromium.org>
* jffs2: Use RTEMS_CONTAINER_OFSebastian Huber2022-06-201-1/+1
|
* aarch64/gicv3: Remove accesses to secure registersChris Johns2022-06-161-3/+15
| | | | | | RTEMS runs at EL1 and the removed register accesses are for EL3 or the TF-A. This change aligns our driver with the Linux and FreeBSD ones.
* bsps/versal: Support a 64bit RAM baseChris Johns2022-06-161-1/+1
| | | | Set the constraint to be 64bits to allow the complete address range.
* bsp/aarch64: Flush the cache before invalidating itChris Johns2022-06-161-1/+2
| | | | | - Any page tables need to be flushed if the cache is enabled. Disabling the cache may only be available in secure mode.
* bsps/shared/*: Change license to BSD-2Joel Sherrill2022-06-1574-222/+1628
| | | | Updates #3053.
* bsps/arm: MP core timer setting off by oneChris Johns2022-06-151-1/+1
|
* cpukit: Fixes for GCC 12 warningsChris Johns2022-06-153-1/+7
| | | | Updates #6442
* cpukit: Change _COMPILING_NEWLIB to _LIBC for helper functions declsChris Johns2022-06-153-5/+5
| | | | Updates #4662
* score/cpu: Silence ARM and AARCH64 GCC 12 false trigger array warningChris Johns2022-06-152-1/+7
| | | | | | | | | | | | The false trigger is covered in: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99578 GCC 11 and 12 has been patched for constant pointer casts above 4K. This code casts a constant pointer within the first 4K page. As a result the patch disables the warning. Updates #4662
* sptests/spglobalcon01/init.cc: Change license to BSD-2Joel Sherrill2022-06-141-3/+22
| | | | Updates #3053.
* samples/iostream/init.cc: Change license to BSD-2Joel Sherrill2022-06-141-3/+22
| | | | Updates #3053.
* sptests/*/*.doc: Change license to BSD-2Joel Sherrill2022-06-141-3/+20
| | | | Updates #3053.
* mptests/*/*.doc: Change license to BSD-2Joel Sherrill2022-06-1426-78/+572
| | | | Updates #3053.
* smptests/*/*.doc: Change license to BSD-2Joel Sherrill2022-06-1410-30/+220
| | | | Updates #3053.
* psxtmtests/*/*.doc: Change license to BSD-2Joel Sherrill2022-06-1445-135/+990
| | | | Updates #3053.
* samples/*/*.doc: Change license to BSD-2Joel Sherrill2022-06-1412-33/+244
| | | | Updates #3053.
* smptests/*/*.py: Change license to BSD-2Joel Sherrill2022-06-144-12/+88
| | | | | | Manually adjusted location of SPDX annotation so #! remains first line. Updates #3053.
* bsps/atsam: Fix type of options (part 2)Christian Mauderer2022-06-142-2/+4
| | | | | | | The patch "bsps/atsam: Fix type of options" missed to adapt some parts of the yml. With that a custom value works well. But if no value is set, configure doesn't fall back to the default value but instead just causes an error. This patch fixes that.
* bsp/aarch64: Fix array warningChris Johns2022-06-111-1/+1
| | | | Updates #4664
* bsps/stm32h7: remove external memory initialization from nucleo-h743zi BSPKarel Gardas2022-06-103-480/+0
| | | | | | | Nucleo board does not provide any external memory so code does not have any function here anyway. Sponsored-By: Precidata
* bsps/stm32h7: move BSP start hooks into boards subdirectoriesKarel Gardas2022-06-1014-44/+407
| | | | | | | The idea here is to prepare for better per-board specialization of the hooks function code. Sponsored-By: Precidata