[PATCH 00/13] Avoid potential recursion in ASR handling

Sebastian Huber sebastian.huber at embedded-brains.de
Wed Feb 17 19:30:15 UTC 2021


This patch set adds validation tests for the signal manager and fixes a
potential issue with a recursion in the ASR handling.  The main issue is
that _Signal_Action_handler() used rtems_task_mode() to save, set, and
restore the task mode during ASR processing.  This is effectively a
recursive call to thread dispatching which may result in the next level
of ASR processing.

Sebastian Huber (13):
  validation: Add Validation1 test suite
  validation: Add signal manager tests
  score: Change thread action locking
  score: Add _Thread_Append_post_switch_action()
  posix: Remove superfluous check
  rtems: Remove unused _Modes_Mask_changed()
  rtems: Remove unused _Modes_Change()
  rtems: Remove unused ASR_Information::nest_level
  rtems: Move _Signal_Action_handler()
  rtems: Simplify signal handling
  rtems: New errors for rtems_signal_catch()
  rtems: Add _Modes_Set_timeslice()
  rtems: Avoid potential recursion in ASR handling

 cpukit/headers.am                             |    1 -
 cpukit/include/rtems/rtems/asrdata.h          |    4 -
 cpukit/include/rtems/rtems/asrimpl.h          |   90 --
 cpukit/include/rtems/rtems/modesimpl.h        |   47 +-
 cpukit/include/rtems/rtems/signalimpl.h       |   10 -
 cpukit/include/rtems/score/thread.h           |   19 +-
 cpukit/include/rtems/score/threadimpl.h       |   38 +-
 cpukit/posix/src/psignalunblockthread.c       |    8 +-
 cpukit/rtems/src/signalcatch.c                |   99 +-
 cpukit/rtems/src/signalsend.c                 |  132 +-
 cpukit/rtems/src/taskmode.c                   |   32 +-
 cpukit/score/src/threaddispatch.c             |    3 -
 spec/build/bsps/tstsmallmem.yml               |    1 +
 spec/build/cpukit/librtemscpu.yml             |    1 -
 spec/build/testsuites/validation/grp.yml      |    2 +
 .../testsuites/validation/validation-0.yml    |    2 +
 .../testsuites/validation/validation-1.yml    |   21 +
 testsuites/validation/tc-signal-catch.c       | 1017 +++++++++++++++
 testsuites/validation/tc-signal-send.c        | 1146 +++++++++++++++++
 testsuites/validation/ts-default.h            |    4 +-
 testsuites/validation/ts-validation-0.c       |    4 +-
 testsuites/validation/ts-validation-1.c       |   75 ++
 22 files changed, 2505 insertions(+), 251 deletions(-)
 delete mode 100644 cpukit/include/rtems/rtems/asrimpl.h
 create mode 100644 spec/build/testsuites/validation/validation-1.yml
 create mode 100644 testsuites/validation/tc-signal-catch.c
 create mode 100644 testsuites/validation/tc-signal-send.c
 create mode 100644 testsuites/validation/ts-validation-1.c

-- 
2.26.2



More information about the devel mailing list