[PATCH] bsp/aarch64: Fix array warning

2022-06-10 Thread chrisj
From: Chris Johns Updates #4664 --- bsps/aarch64/include/bsp/start.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bsps/aarch64/include/bsp/start.h b/bsps/aarch64/include/bsp/start.h index 586eec4f48..f0af5be841 100644 --- a/bsps/aarch64/include/bsp/start.h +++ b/bsps/aarch

Re: [PATCH 13/13] jffs2: Update baseline version to Linux v5.9

2022-06-10 Thread Chris Johns
On 10/6/22 11:25 pm, Joel Sherrill wrote: > If I read the patch set correctly, there is a one line change to os-rtems.h > which looks fine and the rest is updating to the latest version. Yes it seems so. > If so, then push it. OK from me and thanks for picking up this task. I will take a look a

[PATCH 8/8] sptests/spglobalcon01/init.cc: Change license to BSD-2

2022-06-10 Thread Joel Sherrill
Updates #3053. --- testsuites/sptests/spglobalcon01/init.cc | 25 +--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/testsuites/sptests/spglobalcon01/init.cc b/testsuites/sptests/spglobalcon01/init.cc index 54f2774170..661b828ddc 100644 --- a/testsuites/sptest

[PATCH 7/8] samples/iostream/init.cc: Change license to BSD-2

2022-06-10 Thread Joel Sherrill
Updates #3053. --- testsuites/samples/iostream/init.cc | 25 ++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/testsuites/samples/iostream/init.cc b/testsuites/samples/iostream/init.cc index d80d4df9eb..22d973019b 100644 --- a/testsuites/samples/iostream/ini

[PATCH 5/8] mptests/*/*.doc: Change license to BSD-2

2022-06-10 Thread Joel Sherrill
Updates #3053. --- testsuites/mptests/mp01/mp01-node1.doc | 25 ++--- testsuites/mptests/mp01/mp01-node2.doc | 25 ++--- testsuites/mptests/mp03/mp03-node1.doc | 25 ++--- testsuites/mptests/mp03/mp03-node2.doc | 25 ++

[PATCH 6/8] sptests/*/*.doc: Change license to BSD-2

2022-06-10 Thread Joel Sherrill
Updates #3053. --- testsuites/sptests/spheapprot/spheapprot.doc | 23 +--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/testsuites/sptests/spheapprot/spheapprot.doc b/testsuites/sptests/spheapprot/spheapprot.doc index 9d01a7b005..0ac3545ece 100644 --- a/testsuite

[PATCH 3/8] psxtmtests/*/*.doc: Change license to BSD-2

2022-06-10 Thread Joel Sherrill
Updates #3053. --- .../psxtmbarrier01/psxtmbarrier01.doc | 25 --- .../psxtmbarrier02/psxtmbarrier02.doc | 25 --- .../psxtmbarrier03/psxtmbarrier03.doc | 25 --- .../psxtmbarrier04/psxtmbarrier04.doc | 25

[PATCH 4/8] smptests/*/*.doc: Change license to BSD-2

2022-06-10 Thread Joel Sherrill
Updates #3053. --- testsuites/smptests/smp01/smp01.doc | 25 --- testsuites/smptests/smp02/smp02.doc | 25 --- testsuites/smptests/smp03/smp03.doc | 25 --- testsuites/smptests/smp05/smp05.doc | 25

[PATCH 2/8] samples/*/*.doc: Change license to BSD-2

2022-06-10 Thread Joel Sherrill
Updates #3053. --- testsuites/samples/base_mp/base_mp-node1.doc | 25 +--- testsuites/samples/base_mp/base_mp-node2.doc | 25 +--- testsuites/samples/base_sp/base_sp.doc | 25 +--- testsuites/samples/capture/capture.doc | 25 +

[PATCH 1/8] smptests/*/*.py: Change license to BSD-2

2022-06-10 Thread Joel Sherrill
Manually adjusted location of SPDX annotation so #! remains first line. Updates #3053. --- .../smptests/smplock01/smplock01fair.py | 25 --- .../smptests/smplock01/smplock01perf.py | 25 --- .../smptests/smpopenmp01/smpopenmp01.py | 25 +++

[PATCH 0/8] Relicense clean up sweep on testsuites

2022-06-10 Thread Joel Sherrill
Hi I am making another pass on testsuites and (soon) cpukit to relicense the files which have only a single copyright statement and attribution to OAR, embedded brains, Chris Johns, or Gedare Bloom. The script doing this picks up some files missed by the previous passes Hopefully this is not cont

Should README's have license statement?

2022-06-10 Thread Joel Sherrill
Hi I'm back to relicensing for a bit and noticed that it looks like none of the README's in testsuites have a license or copyright statement. Should they? I can do forensics on the copyright attribution. Should the README's be BSD-2, Creative Commons, or remain like they are with nothing? Thank

[PATCH v2 6/6] testsuites/libtests/malloctest: fix warnings

2022-06-10 Thread Matthew Joyce
From: Matt Joyce Edited tests to fix new gcc 12 warnings. Updates #4662 --- testsuites/libtests/malloctest/init.c | 22 +- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/testsuites/libtests/malloctest/init.c b/testsuites/libtests/malloctest/init.c index 05d9

[PATCH v2 5/6] testsuites/libtests/POSIX/free.c: fix warning

2022-06-10 Thread Matthew Joyce
From: Matt Joyce This change fixes a new warning in gcc 12. Updates #4662 --- testsuites/libtests/POSIX/free.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testsuites/libtests/POSIX/free.c b/testsuites/libtests/POSIX/free.c index 8550eaa85c..6bc961b968 100644 --- a/testsu

[PATCH v2 3/6] cpukit/libcsupport/src/__gettod.c: avoid warning

2022-06-10 Thread Matthew Joyce
From: Matt Joyce Define _LIBC to ensure access to the function prototype. The purpose is to avoid a new warning in gcc 12. Updates #4662. --- cpukit/libcsupport/src/__gettod.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cpukit/libcsupport/src/__gettod.c b/cpukit/libc

[PATCH v2 4/6] cpukit/libmd/md5.c: fix warning

2022-06-10 Thread Matthew Joyce
From: Matt Joyce Specify array size in parameter to match function prototype. This fixes a new warning in gcc 12. Updates #4662 --- cpukit/libmd/md5.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpukit/libmd/md5.c b/cpukit/libmd/md5.c index 4c909f37a0..5e3a100c7b 100644

[PATCH v2 2/6] cpukit/posix/src/_execve.c: fix warning

2022-06-10 Thread Matthew Joyce
From: Matt Joyce Define _LIBC to access prototype for _execve() function. This fixes a new warning in gcc 12. Updates #4662 --- cpukit/posix/src/_execve.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cpukit/posix/src/_execve.c b/cpukit/posix/src/_execve.c index 2858d13

[PATCH v2 1/6] libcsupport/src/__times.c: fix warning

2022-06-10 Thread Matthew Joyce
From: Matt Joyce Define _LIBC to access prototype for _times() function. This fixes a new warning in gcc 12. Updates #4662. --- cpukit/libcsupport/src/__times.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cpukit/libcsupport/src/__times.c b/cpukit/libcsupport/src/__tim

[PATCH v2 0/6] gcc 12 warning fixes

2022-06-10 Thread Matthew Joyce
From: Matt Joyce Hello, Please find v2 attached. Changes: 1) Added additional patch for __gettod.c 2) Edited comments / formatting 3) Edited tests in malloctest 4) References RTEMS ticket #4662 Thank you! Sincerely, Matt Matt Joyce (6): libcsupport/src/__times.c: fix warning cpukit/posi

Re: [PATCH 13/13] jffs2: Update baseline version to Linux v5.9

2022-06-10 Thread Joel Sherrill
If I read the patch set correctly, there is a one line change to os-rtems.h which looks fine and the rest is updating to the latest version. If so, then push it. --joel On Fri, Jun 10, 2022 at 3:21 AM Sebastian Huber < sebastian.hu...@embedded-brains.de> wrote: > --- > cpukit/libfs/src/jffs2/V

[PATCH 5/5] bsps/stm32h7: allow config and usage of QSPI memory on stm32h747i-disco BSP

2022-06-10 Thread Karel Gardas
The QSPI memory is initialized and used only when the BSP configure file sets QSPI memory size to non-zero value. Currently QSPI is run in memory mapped mode which allows future RTEMS binary linkage and upload into QSPI memory. Sponsored-By: Precidata --- .../stm32h747i-disco/stm32h7-bspstartho

[PATCH 4/5] bsps/stm32h7: import stm32h747i-disco QSPI memory high-level driver

2022-06-10 Thread Karel Gardas
Sponsored-By: Precidata --- .../stm32h747i_discovery_conf.h | 119 ++ .../stm32h747i_discovery_errno.h | 106 ++ .../stm32h747i_discovery_qspi.c | 1100 + .../stm32h747i_discovery_qspi.h | 286 + 4 files changed, 1611

[PATCH 3/5] bsps/stm32h7: allow config and usage of QSPI memory on stm32h757i-eval BSP

2022-06-10 Thread Karel Gardas
The QSPI memory is initialized and used only when the BSP configure file sets QSPI memory size to non-zero value. Currently QSPI is run in memory mapped mode which allows future RTEMS binary linkage and upload into QSPI memory. Sponsored-By: Precidata --- .../stm/stm32h757i-eval/stm32h7-bspstar

[PATCH 2/5] bsps/stm32h7: import stm32h757i-eval QSPI memory high-level driver

2022-06-10 Thread Karel Gardas
Sponsored-By: Precidata --- .../stm32h757i-eval/stm32h747i_eval_conf.h| 130 ++ .../stm32h757i-eval/stm32h747i_eval_errno.h | 105 ++ .../stm32h757i-eval/stm32h747i_eval_qspi.c| 1088 + .../stm32h757i-eval/stm32h747i_eval_qspi.h| 284 + 4 files changed, 1607

[PATCH 1/5] bsps/stm32h7: import MT25TL01G QSPI memory low-level driver

2022-06-10 Thread Karel Gardas
Sponsored-By: Precidata --- .../stm/Components/mt25tl01g/mt25tl01g.c | 1046 + .../stm/Components/mt25tl01g/mt25tl01g.h | 362 ++ .../stm/Components/mt25tl01g/mt25tl01g_conf.h | 68 ++ 3 files changed, 1476 insertions(+) create mode 100644 bsps/arm/stm32h7/board

Re: [PATCH v2] kern_tc.c: Update pps_event() for uniprocessor configurations

2022-06-10 Thread Sebastian Huber
On 10.06.22 11:05, Gabriel Moyano wrote: Since pps->capgen equal to zero is not a special value in uniprocessor configurations, there is no need to check for this condition. Thanks, I checked it in. -- embedded brains GmbH Herr Sebastian HUBER Dornierstr. 4 82178 Puchheim Germany email: sebas

[PATCH v2] kern_tc.c: Update pps_event() for uniprocessor configurations

2022-06-10 Thread Gabriel Moyano
Since pps->capgen equal to zero is not a special value in uniprocessor configurations, there is no need to check for this condition. Update #2349 --- cpukit/score/src/kern_tc.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/cpukit/score/src/kern_tc.c b/cpukit/score/src/kern_tc.c index

AW: [PATCH] kern_tc.c: Update pps_event() for uniprocessor configurations

2022-06-10 Thread Gabriel.Moyano
> On 10.06.22 09:20, Gabriel Moyano wrote: > > Since pps->capgen is not used in uniprocessor configurations, there is > > no need to verified if it is equal to zero > > The pps->capgen is used in uniprocessor configurations. The difference to the > SMP configuration is that zero is not a special

Re: [PATCH] kern_tc.c: Update pps_event() for uniprocessor configurations

2022-06-10 Thread Sebastian Huber
On 10.06.22 09:20, Gabriel Moyano wrote: Since pps->capgen is not used in uniprocessor configurations, there is no need to verified if it is equal to zero The pps->capgen is used in uniprocessor configurations. The difference to the SMP configuration is that zero is not a special value. --

[PATCH 13/13] jffs2: Update baseline version to Linux v5.9

2022-06-10 Thread Sebastian Huber
--- cpukit/libfs/src/jffs2/VERSION | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpukit/libfs/src/jffs2/VERSION b/cpukit/libfs/src/jffs2/VERSION index 7d9c9f41b2..b13bed5750 100644 --- a/cpukit/libfs/src/jffs2/VERSION +++ b/cpukit/libfs/src/jffs2/VERSION @@ -1,9 +1,9 @@ -

[PATCH 05/13] jffs2: Fix possible null-pointer dereferences in jffs2_add_frag_to_fragtree()

2022-06-10 Thread Sebastian Huber
From: Jia-Ju Bai 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

[PATCH 09/13] jffs2: Replace zero-length array with flexible-array

2022-06-10 Thread Sebastian Huber
From: "Gustavo A. R. Silva" 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

[PATCH 06/13] jffs2: Remove jffs2_gc_fetch_page and jffs2_gc_release_page

2022-06-10 Thread Sebastian Huber
From: Christoph Hellwig Merge these two helpers into the only callers to get rid of some amazingly bad calling conventions. Suggested-by: Al Viro Signed-off-by: Christoph Hellwig Signed-off-by: Richard Weinberger --- cpukit/libfs/src/jffs2/src/fs-rtems.c | 24 -- cpukit/libfs

[PATCH 07/13] jffs2: Fix memory leak in jffs2_scan_eraseblock() error path

2022-06-10 Thread Sebastian Huber
From: Wenwen Wang 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 th

[PATCH 08/13] Revert "jffs2: Fix possible null-pointer dereferences in jffs2_add_frag_to_fragtree()"

2022-06-10 Thread Sebastian Huber
From: Joel Stanley 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_

[PATCH 12/13] treewide: Use fallthrough pseudo-keyword

2022-06-10 Thread Sebastian Huber
From: "Gustavo A. R. Silva" 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=fallthro

[PATCH 10/13] treewide: Remove uninitialized_var() usage

2022-06-10 Thread Sebastian Huber
From: Kees Cook 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 prepar

[PATCH 11/13] jffs2: fix jffs2 mounting failure

2022-06-10 Thread Sebastian Huber
From: Zhe Li 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

[PATCH 02/13] Convert jffs2 acl to struct_size

2022-06-10 Thread Sebastian Huber
From: Matthew Wilcox Need to tell the compiler that the acl entries follow the acl header. Signed-off-by: Matthew Wilcox Signed-off-by: Kees Cook --- cpukit/libfs/src/jffs2/src/acl.h | 1 + 1 file changed, 1 insertion(+) diff --git a/cpukit/libfs/src/jffs2/src/acl.h b/cpukit/libfs/src/jffs2/

[PATCH 04/13] jffs2: Remove C++ style comments from uapi header

2022-06-10 Thread Sebastian Huber
From: Masahiro Yamada 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 comm

[PATCH 01/13] jffs2: Use RTEMS_CONTAINER_OF

2022-06-10 Thread Sebastian Huber
--- cpukit/libfs/src/jffs2/src/os-rtems.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpukit/libfs/src/jffs2/src/os-rtems.h b/cpukit/libfs/src/jffs2/src/os-rtems.h index db1be61e67..0bec517691 100644 --- a/cpukit/libfs/src/jffs2/src/os-rtems.h +++ b/cpukit/libfs/src/jffs2/

[PATCH 03/13] jffs2: fix use-after-free on symlink traversal

2022-06-10 Thread Sebastian Huber
From: Al Viro 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 --- cpukit/libfs/src/jffs2/src/readinode.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletio

[PATCH 00/13] jffs2: Update baseline version to Linux v5.9

2022-06-10 Thread Sebastian Huber
Al Viro (1): jffs2: fix use-after-free on symlink traversal Christoph Hellwig (1): jffs2: Remove jffs2_gc_fetch_page and jffs2_gc_release_page Gustavo A. R. Silva (2): jffs2: Replace zero-length array with flexible-array treewide: Use fallthrough pseudo-keyword Jia-Ju Bai (1): jffs2: F

[PATCH] kern_tc.c: Update pps_event() for uniprocessor configurations

2022-06-10 Thread Gabriel Moyano
Since pps->capgen is not used in uniprocessor configurations, there is no need to verified if it is equal to zero Update #2349 --- cpukit/score/src/kern_tc.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/cpukit/score/src/kern_tc.c b/cpukit/score/src/kern_tc.c index 92739d8edd..78d7fa

Re: AW: AW: AW: AW: [PATCH] kern_tc.c: Update pps_event() for uniprocessor configurations

2022-06-10 Thread Sebastian Huber
On 10.06.22 09:09, gabriel.moy...@dlr.de wrote: On 08.06.22 09:54,gabriel.moy...@dlr.de wrote: I don't know why there is this "if" in the code. I will ask on a FreeBSD mailing list. I think it is for the case that th_generation has changed in between saving the th and th_counter. If this h

AW: AW: AW: AW: [PATCH] kern_tc.c: Update pps_event() for uniprocessor configurations

2022-06-10 Thread Gabriel.Moyano
> On 08.06.22 09:54, gabriel.moy...@dlr.de wrote: > >> I don't know why there is this "if" in the code. I will ask on a > >> FreeBSD mailing list. > >> > > I think it is for the case that th_generation has changed in > > between saving the th and th_counter. If this happens pps