[PATCH v4 2/3] High level configuration option for thread stack protection
Utkarsh Rai
utkarsh.rai60 at gmail.com
Sat Aug 22 15:19:00 UTC 2020
-Configurations options are provided by using the new-build system. Refer to https://ftp.rtems.org/pub/rtems/people/sebh/user.pdf,
chapter 7,for basic setup and https://ftp.rtems.org/pub/rtems/people/sebh/eng.pdf(chapter 9) for the internals of the build system.
---
.../arm/realview-pbx-a9/bsprealviewpbxa9.yml | 1 +
spec/build/cpukit/cpuopts.yml | 2 ++
spec/build/cpukit/librtemscpu.yml | 3 +++
.../build/cpukit/optthreadstackprotection.yml | 16 ++++++++++++++++
spec/build/testsuites/samples/grp.yml | 2 ++
.../samples/threadstackprotection.yml | 19 +++++++++++++++++++
6 files changed, 43 insertions(+)
create mode 100644 spec/build/cpukit/optthreadstackprotection.yml
create mode 100644 spec/build/testsuites/samples/threadstackprotection.yml
diff --git a/spec/build/bsps/arm/realview-pbx-a9/bsprealviewpbxa9.yml b/spec/build/bsps/arm/realview-pbx-a9/bsprealviewpbxa9.yml
index 2721152b93..f7d2187c66 100644
--- a/spec/build/bsps/arm/realview-pbx-a9/bsprealviewpbxa9.yml
+++ b/spec/build/bsps/arm/realview-pbx-a9/bsprealviewpbxa9.yml
@@ -57,6 +57,7 @@ links:
source:
- bsps/arm/realview-pbx-a9/console/console-config.c
- bsps/arm/realview-pbx-a9/console/console-polled.c
+- bsps/arm/realview-pbx-a9/mmu/bsp-set-mmu-attr.c
- bsps/arm/realview-pbx-a9/start/bspreset.c
- bsps/arm/realview-pbx-a9/start/bspstart.c
- bsps/arm/realview-pbx-a9/start/bspstarthooks.c
diff --git a/spec/build/cpukit/cpuopts.yml b/spec/build/cpukit/cpuopts.yml
index 1902e543ca..f7641a5e50 100644
--- a/spec/build/cpukit/cpuopts.yml
+++ b/spec/build/cpukit/cpuopts.yml
@@ -63,6 +63,8 @@ links:
uid: optszoff
- role: build-dependency
uid: optsztime
+- role: build-dependency
+ uid: optthreadstackprotection
- role: build-dependency
uid: optversion
target: cpukit/include/rtems/score/cpuopts.h
diff --git a/spec/build/cpukit/librtemscpu.yml b/spec/build/cpukit/librtemscpu.yml
index 63a0b7dca5..9855401665 100644
--- a/spec/build/cpukit/librtemscpu.yml
+++ b/spec/build/cpukit/librtemscpu.yml
@@ -353,6 +353,7 @@ install:
- cpukit/include/rtems/score/isrlevel.h
- cpukit/include/rtems/score/isrlock.h
- cpukit/include/rtems/score/memory.h
+ - cpukit/include/rtems/score/memoryprotection.h
- cpukit/include/rtems/score/mpci.h
- cpukit/include/rtems/score/mpciimpl.h
- cpukit/include/rtems/score/mppkt.h
@@ -405,6 +406,7 @@ install:
- cpukit/include/rtems/score/smplockstats.h
- cpukit/include/rtems/score/smplockticket.h
- cpukit/include/rtems/score/stack.h
+ - cpukit/include/rtems/score/stackprotection.h
- cpukit/include/rtems/score/stackimpl.h
- cpukit/include/rtems/score/states.h
- cpukit/include/rtems/score/statesimpl.h
@@ -1509,6 +1511,7 @@ source:
- cpukit/score/src/semaphore.c
- cpukit/score/src/smpbarrierwait.c
- cpukit/score/src/stackallocator.c
+- cpukit/score/src/stackprotection.c
- cpukit/score/src/threadallocateunlimited.c
- cpukit/score/src/thread.c
- cpukit/score/src/threadchangepriority.c
diff --git a/spec/build/cpukit/optthreadstackprotection.yml b/spec/build/cpukit/optthreadstackprotection.yml
new file mode 100644
index 0000000000..4722d9f0cb
--- /dev/null
+++ b/spec/build/cpukit/optthreadstackprotection.yml
@@ -0,0 +1,16 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+actions:
+- get-boolean: null
+- env-enable: null
+- define-condition: null
+build-type: option
+copyrights:
+- Copyright (C) 2020 Utkarsh Rai (utkarsh.rai60 at gmail.com)
+default: false
+default-by-variant: []
+description: |
+ Enable the thread stack protection support
+enabled-by: true
+links: []
+name: RTEMS_THREAD_STACK_PROTECTION
+type: build
diff --git a/spec/build/testsuites/samples/grp.yml b/spec/build/testsuites/samples/grp.yml
index c7591dc551..3fb8d588a6 100644
--- a/spec/build/testsuites/samples/grp.yml
+++ b/spec/build/testsuites/samples/grp.yml
@@ -40,6 +40,8 @@ links:
uid: pppd
- role: build-dependency
uid: ticker
+- role: build-dependency
+ uid: threadstackprotection
- role: build-dependency
uid: unlimited
type: build
diff --git a/spec/build/testsuites/samples/threadstackprotection.yml b/spec/build/testsuites/samples/threadstackprotection.yml
new file mode 100644
index 0000000000..a33c53d392
--- /dev/null
+++ b/spec/build/testsuites/samples/threadstackprotection.yml
@@ -0,0 +1,19 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+build-type: test-program
+cflags: []
+copyrights:
+- Copyright (C) 2020 Utkarsh Rai (utkarsh.rai60 at gmail.com)
+cppflags: []
+cxxflags: []
+enabled-by: true
+features: c cprogram
+includes: []
+ldflags: []
+links: []
+source:
+- testsuites/samples/thread_stack_protection/init.c
+stlib: []
+target: testsuites/samples/thread_stack_protection.exe
+type: build
+use-after: []
+use-before: []
--
2.17.1
More information about the devel
mailing list