Re: [PATCH] Basic lwIP for STM32H7 BSP

2021-02-18 Thread Sebastian Huber
On 18/02/2021 20:55, Gedare Bloom wrote: On Thu, Feb 4, 2021 at 10:58 AM Sebastian Huber wrote: On 04/02/2021 18:45, Robin Müller wrote: Could you look into this, based on the existing patch? I don't really have the time to look (deeply) into it in the next few weeks, and the changes are

Re: [PATCH v1 1/2] score: Enforce stack_end alignment

2021-02-18 Thread Sebastian Huber
On 19/02/2021 07:12, Sebastian Huber wrote: On 18/02/2021 19:59, Kinsey Moore wrote: The size of the reserved TLS space is not guaranteed to adhere to stack alignment requirements which can cause stack_end to become misaligned. This enforces the alignment of stack_end. ---  

Re: [PATCH 11/13] rtems: New errors for rtems_signal_catch()

2021-02-18 Thread Sebastian Huber
On 18/02/2021 20:29, Joel Sherrill wrote: On Thu, Feb 18, 2021 at 11:32 AM Gedare Bloom > wrote: On Wed, Feb 17, 2021 at 12:30 PM Sebastian Huber mailto:sebastian.hu...@embedded-brains.de>> wrote: > > Ensure that no invalid modes are set during ASR

Re: [PATCH 12/13] rtems: Add _Modes_Set_timeslice()

2021-02-18 Thread Sebastian Huber
On 18/02/2021 18:37, Gedare Bloom wrote: +RTEMS_INLINE_ROUTINE void _Modes_Set_timeslice( I don't really like the name. It implies we want to set timeslicing true. _Modes_Update_timeslice() may be better? I just want to avoid that Get/Set implication. What about

Re: [PATCH 13/13] rtems: Avoid potential recursion in ASR handling

2021-02-18 Thread Sebastian Huber
On 18/02/2021 18:49, Gedare Bloom wrote: + executing->cpu_time_budget = normal_cpu_time_budget ; + executing->budget_algorithm = normal_budget_algorithm ; + prev_is_preemptible = executing->is_preemptible; 'prev' is unclear here, especially since we have "normal" as a previous mode also.

Re: [PATCH 05/13] posix: Remove superfluous check

2021-02-18 Thread Sebastian Huber
On 18/02/2021 20:25, Joel Sherrill wrote: > -  /* > -   * api may be NULL in case of a thread close in progress > -   */ > -  if ( !api ) > -    return; > - I believe you, but should we replace this with an assert for now? And a comment explaining why it can't be

Re: Device Drivers Which Include mkdir("/dev")

2021-02-18 Thread Sebastian Huber
On 18/02/2021 21:08, Gedare Bloom wrote: Grrr.. I've looked again at the code and it is all Gaisler code doing something like mkdir("/dev/leonXXX"). It really could fail. This should be a fatal error and would seem to indicate that we need a grlib category of fatal BSP/driver errors. Given the

Re: [PATCH v1 2/2] bsps/aarch64: Resolve usage of SUBALIGN()

2021-02-18 Thread Sebastian Huber
Hello Kinsey, could you please split up the patches. One for the linker command file and one for the linkersets.h. On 18/02/2021 19:59, Kinsey Moore wrote: diff --git a/cpukit/include/rtems/linkersets.h b/cpukit/include/rtems/linkersets.h index d3ed76043a..fce6676e4a 100644 ---

Re: [PATCH v1 1/2] score: Enforce stack_end alignment

2021-02-18 Thread Sebastian Huber
On 18/02/2021 19:59, Kinsey Moore wrote: The size of the reserved TLS space is not guaranteed to adhere to stack alignment requirements which can cause stack_end to become misaligned. This enforces the alignment of stack_end. --- cpukit/score/src/threadinitialize.c | 4 1 file changed,

Re: Device Drivers Which Include mkdir("/dev")

2021-02-18 Thread Joel Sherrill
On Thu, Feb 18, 2021 at 3:28 PM Gedare Bloom wrote: > On Thu, Feb 18, 2021 at 2:18 PM Joel Sherrill wrote: > > > > > > > > On Thu, Feb 18, 2021 at 2:08 PM Gedare Bloom wrote: > >> > >> On Thu, Feb 18, 2021 at 12:52 PM Joel Sherrill wrote: > >> > > >> > > >> > > >> > On Thu, Feb 18, 2021 at

Re: [6-freebsd-12 PATCH 1/2] rtemsbsd/bus: Add PCI support to the nexus bus

2021-02-18 Thread Chris Johns
On 17/2/21 4:54 pm, Sebastian Huber wrote: > On 17/02/2021 03:20, Chris Johns wrote: > >> I have looked into this some more with Joel. Comments below .. >> >> On 16/2/21 5:49 pm, Chris Johns wrote: >>> Hi Sebastian, >>> >>> Thank you for the review. >>> >>> On 16/2/21 5:05 pm, Sebastian Huber

Re: Device Drivers Which Include mkdir("/dev")

2021-02-18 Thread Gedare Bloom
On Thu, Feb 18, 2021 at 2:18 PM Joel Sherrill wrote: > > > > On Thu, Feb 18, 2021 at 2:08 PM Gedare Bloom wrote: >> >> On Thu, Feb 18, 2021 at 12:52 PM Joel Sherrill wrote: >> > >> > >> > >> > On Thu, Feb 18, 2021 at 11:52 AM Gedare Bloom wrote: >> >> >> >> On Thu, Feb 18, 2021 at 10:20 AM

Re: Device Drivers Which Include mkdir("/dev")

2021-02-18 Thread Joel Sherrill
On Thu, Feb 18, 2021 at 2:08 PM Gedare Bloom wrote: > On Thu, Feb 18, 2021 at 12:52 PM Joel Sherrill wrote: > > > > > > > > On Thu, Feb 18, 2021 at 11:52 AM Gedare Bloom wrote: > >> > >> On Thu, Feb 18, 2021 at 10:20 AM Joel Sherrill wrote: > >> > > >> > > >> > > >> > On Thu, Feb 18, 2021 at

Re: Device Drivers Which Include mkdir("/dev")

2021-02-18 Thread Gedare Bloom
On Thu, Feb 18, 2021 at 12:52 PM Joel Sherrill wrote: > > > > On Thu, Feb 18, 2021 at 11:52 AM Gedare Bloom wrote: >> >> On Thu, Feb 18, 2021 at 10:20 AM Joel Sherrill wrote: >> > >> > >> > >> > On Thu, Feb 18, 2021 at 11:06 AM Gedare Bloom wrote: >> >> >> >> On Thu, Feb 18, 2021 at 8:56 AM

Re: [PATCH] STM32H7 doc update

2021-02-18 Thread Gedare Bloom
On Thu, Feb 18, 2021 at 1:00 PM Gedare Bloom wrote: > > On Wed, Jan 13, 2021 at 5:28 PM Robin Mueller > wrote: > > > > --- > > > > Added doc for board variation, added some fixes > > from code review. (typo and line width formatting) > > > > user/bsps/arm/stm32h7.rst | 18 +- >

Re: Debugging rtems-docs Sphinx issue

2021-02-18 Thread Gedare Bloom
On Wed, Feb 3, 2021 at 1:04 PM Joel Sherrill wrote: > > > > On Wed, Feb 3, 2021 at 1:55 PM Gedare Bloom wrote: >> >> >> On Wed, Feb 3, 2021 at 11:51 AM Ryan Long wrote: >>> >>> Gedare, >>> >>> >>> >>> I applied your patch, but it still isn’t working for me. The error is the >>> same in the

Re: [PATCH] STM32H7 doc update

2021-02-18 Thread Gedare Bloom
On Wed, Jan 13, 2021 at 5:28 PM Robin Mueller wrote: > > --- > > Added doc for board variation, added some fixes > from code review. (typo and line width formatting) > > user/bsps/arm/stm32h7.rst | 18 +- > 1 file changed, 17 insertions(+), 1 deletion(-) > > diff --git

Re: [PATCH] Basic lwIP for STM32H7 BSP

2021-02-18 Thread Gedare Bloom
On Thu, Feb 4, 2021 at 10:58 AM Sebastian Huber wrote: > > On 04/02/2021 18:45, Robin Müller wrote: > > > Could you look into this, based on the existing patch? I don't really > > have the time to look (deeply) into it in the next few weeks, > > and the changes are probably easier for you to

Re: Device Drivers Which Include mkdir("/dev")

2021-02-18 Thread Joel Sherrill
On Thu, Feb 18, 2021 at 11:52 AM Gedare Bloom wrote: > On Thu, Feb 18, 2021 at 10:20 AM Joel Sherrill wrote: > > > > > > > > On Thu, Feb 18, 2021 at 11:06 AM Gedare Bloom wrote: > >> > >> On Thu, Feb 18, 2021 at 8:56 AM Joel Sherrill wrote: > >> > > >> > Hi > >> > > >> > There are a lot of

Re: [PATCH 11/13] rtems: New errors for rtems_signal_catch()

2021-02-18 Thread Joel Sherrill
On Thu, Feb 18, 2021 at 11:32 AM Gedare Bloom wrote: > On Wed, Feb 17, 2021 at 12:30 PM Sebastian Huber > wrote: > > > > Ensure that no invalid modes are set during ASR processing. > > > > Update #4244. > > --- > > cpukit/rtems/src/signalcatch.c | 27 +++ > > 1 file

Re: [PATCH 05/13] posix: Remove superfluous check

2021-02-18 Thread Joel Sherrill
On Thu, Feb 18, 2021 at 11:21 AM Gedare Bloom wrote: > On Wed, Feb 17, 2021 at 12:31 PM Sebastian Huber > wrote: > > > > The api pointer is never NULL. > > > > Update #4244. > > --- > > cpukit/posix/src/psignalunblockthread.c | 6 -- > > 1 file changed, 6 deletions(-) > > > > diff --git

Re: [PATCH 13/13] rtems: Avoid potential recursion in ASR handling

2021-02-18 Thread Peter Dufault
> On Feb 18, 2021, at 12:49 , Gedare Bloom wrote: > > willing to buy: style formatter. I'll buy one too. Peter - Peter Dufault HD Associates, Inc. Software and System Engineering This email is delivered through the public internet using protocols subject to

[PATCH v1 1/2] score: Enforce stack_end alignment

2021-02-18 Thread Kinsey Moore
The size of the reserved TLS space is not guaranteed to adhere to stack alignment requirements which can cause stack_end to become misaligned. This enforces the alignment of stack_end. --- cpukit/score/src/threadinitialize.c | 4 1 file changed, 4 insertions(+) diff --git

[PATCH v1 2/2] bsps/aarch64: Resolve usage of SUBALIGN()

2021-02-18 Thread Kinsey Moore
Remove usage of SUBALIGN() in aarch64 linkcmds which works around a difference in behavior on AArch64 platforms. According to commentary on GCC bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99143 this behavior was never expected to be consistent across platforms and any alignment requirements

Re: [PATCH 5/5] shell.c: Fix Dereference before null check (CID #1467420)

2021-02-18 Thread Gedare Bloom
This one can get pushed. On Thu, Feb 18, 2021 at 7:35 AM Ryan Long wrote: > > CID 1467420: Dereference before null check in rtems_shell_line_editor(). > > Closes #4254 > --- > cpukit/libmisc/shell/shell.c | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git

Re: [PATCH 4/5] grspw_pkt.c: Fix Dereference before null check (CID #1399846)

2021-02-18 Thread Gedare Bloom
CC: Cobham Gaisler The patches look good, but they touch grlib. I'm not sure if grlib in rtems.git is "authoritative" or if Cobham Gaisler maintains an upstream. So I'd like Daniel or someone to comment/approve before these go in, and we should probably get to know that relationship and document

Re: Device Drivers Which Include mkdir("/dev")

2021-02-18 Thread Gedare Bloom
On Thu, Feb 18, 2021 at 10:20 AM Joel Sherrill wrote: > > > > On Thu, Feb 18, 2021 at 11:06 AM Gedare Bloom wrote: >> >> On Thu, Feb 18, 2021 at 8:56 AM Joel Sherrill wrote: >> > >> > Hi >> > >> > There are a lot of Coverity issues related to device drivers which call >> > mkdir("/dev") and

Re: [PATCH 13/13] rtems: Avoid potential recursion in ASR handling

2021-02-18 Thread Gedare Bloom
On Wed, Feb 17, 2021 at 12:30 PM Sebastian Huber wrote: > > Do the mode changes necessary for the ASR processing directly under > protection of the thread state lock to avoid the recursive calls to > thread dispatching done in rtems_task_mode(). > > Update #4244. > --- >

Re: [PATCH 12/13] rtems: Add _Modes_Set_timeslice()

2021-02-18 Thread Gedare Bloom
On Wed, Feb 17, 2021 at 12:31 PM Sebastian Huber wrote: > > Update #4244. > --- > cpukit/include/rtems/rtems/modesimpl.h | 15 +++ > cpukit/rtems/src/taskmode.c| 8 +--- > 2 files changed, 16 insertions(+), 7 deletions(-) > > diff --git

Re: [PATCH 11/13] rtems: New errors for rtems_signal_catch()

2021-02-18 Thread Gedare Bloom
On Wed, Feb 17, 2021 at 12:30 PM Sebastian Huber wrote: > > Ensure that no invalid modes are set during ASR processing. > > Update #4244. > --- > cpukit/rtems/src/signalcatch.c | 27 +++ > 1 file changed, 27 insertions(+) > > diff --git a/cpukit/rtems/src/signalcatch.c

Re: [PATCH 05/13] posix: Remove superfluous check

2021-02-18 Thread Gedare Bloom
On Wed, Feb 17, 2021 at 12:31 PM Sebastian Huber wrote: > > The api pointer is never NULL. > > Update #4244. > --- > cpukit/posix/src/psignalunblockthread.c | 6 -- > 1 file changed, 6 deletions(-) > > diff --git a/cpukit/posix/src/psignalunblockthread.c >

Re: Device Drivers Which Include mkdir("/dev")

2021-02-18 Thread Joel Sherrill
On Thu, Feb 18, 2021 at 11:06 AM Gedare Bloom wrote: > On Thu, Feb 18, 2021 at 8:56 AM Joel Sherrill wrote: > > > > Hi > > > > There are a lot of Coverity issues related to device drivers which call > mkdir("/dev") and ignore the return value. My first thought was that they > should have (void)

Re: [PATCH] c-user: Generate signal manager documentation

2021-02-18 Thread Gedare Bloom
ok On Wed, Feb 17, 2021 at 12:24 PM Sebastian Huber wrote: > > The documentation is a consolidation of the comments in Doxygen markup > and the documentation sources in Sphinx markup. The documentation was > transfered to interface specification items. The documentation source > files were

Re: Device Drivers Which Include mkdir("/dev")

2021-02-18 Thread Gedare Bloom
On Thu, Feb 18, 2021 at 8:56 AM Joel Sherrill wrote: > > Hi > > There are a lot of Coverity issues related to device drivers which call > mkdir("/dev") and ignore the return value. My first thought was that they > should have (void) added since /dev could have been created by an earlier >

Device Drivers Which Include mkdir("/dev")

2021-02-18 Thread Joel Sherrill
Hi There are a lot of Coverity issues related to device drivers which call mkdir("/dev") and ignore the return value. My first thought was that they should have (void) added since /dev could have been created by an earlier driver. Then it occurred to me that libcsupport/src/base_fs.c includes

[PATCH 5/5] shell.c: Fix Dereference before null check (CID #1467420)

2021-02-18 Thread Ryan Long
CID 1467420: Dereference before null check in rtems_shell_line_editor(). Closes #4254 --- cpukit/libmisc/shell/shell.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cpukit/libmisc/shell/shell.c b/cpukit/libmisc/shell/shell.c index 3c357a1..1e5962b 100644 ---

[PATCH 4/5] grspw_pkt.c: Fix Dereference before null check (CID #1399846)

2021-02-18 Thread Ryan Long
CID 1399846: Dereference before null check in grspw_addr_ctrl(). Closes #4253 --- bsps/shared/grlib/spw/grspw_pkt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bsps/shared/grlib/spw/grspw_pkt.c b/bsps/shared/grlib/spw/grspw_pkt.c index 2cc4e886..ca8767e 100644 ---

[PATCH 3/5] grtc.c: Fix Dereference before null check (CID #1399840)

2021-02-18 Thread Ryan Long
CID 1399840: Dereference before null check in grtc_ioctl(). Closes #4252 --- bsps/shared/grlib/tmtc/grtc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bsps/shared/grlib/tmtc/grtc.c b/bsps/shared/grlib/tmtc/grtc.c index 44e9685..e9acea4 100644 ---

[PATCH 2/5] b1553rt.c: Fix Deference before null check (CID #1399830)

2021-02-18 Thread Ryan Long
CID 1399830: Dereference before null check in rt_control(). Closes #4251 --- bsps/shared/grlib/1553/b1553rt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bsps/shared/grlib/1553/b1553rt.c b/bsps/shared/grlib/1553/b1553rt.c index d7257e4..df72ada 100644 ---

[PATCH 1/5] b1553brm.c: Fix Dereference before null check (CID #1399829)

2021-02-18 Thread Ryan Long
CID 1399829: Dereference before null check in brm_control(). Closes #4250 --- bsps/shared/grlib/1553/b1553brm.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bsps/shared/grlib/1553/b1553brm.c b/bsps/shared/grlib/1553/b1553brm.c index 57ef701..694f585 100644 ---

[PATCH 0/5] Fix Dereference before null check errors

2021-02-18 Thread Ryan Long
Hi, I fixed these "Dereference before null check errors in Coverity. I didn't have to add anything to most of these files. I mainly just had to move the assignment of the pointers being flagged to after their corresponding check. In shell.c, I added an _Assert() to ensure that the pointer wasn't