summaryrefslogtreecommitdiffstats
path: root/cpukit/include/rtems
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2021-08-10 12:42:11 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2021-08-12 10:09:04 +0200
commit9399e12c217343545bf412a01629570377536b39 (patch)
treee8a7f068a355bd18d15e745eec7b3c1611ae2f57 /cpukit/include/rtems
parentbsps/arm: More robust SMP start (diff)
downloadrtems-9399e12c217343545bf412a01629570377536b39.tar.bz2
rtems: Fix rtems_partition_return_buffer()
The rtems_partition_return_buffer() wrongly accepted which were exactly at the buffer area end. Use the buffer area limit address for the range checking. Close #4490.
Diffstat (limited to 'cpukit/include/rtems')
-rw-r--r--cpukit/include/rtems/monitor.h2
-rw-r--r--cpukit/include/rtems/rtems/partdata.h15
2 files changed, 11 insertions, 6 deletions
diff --git a/cpukit/include/rtems/monitor.h b/cpukit/include/rtems/monitor.h
index d0a79c03be..9367e2b6e8 100644
--- a/cpukit/include/rtems/monitor.h
+++ b/cpukit/include/rtems/monitor.h
@@ -192,7 +192,7 @@ typedef struct {
rtems_name name;
/* end of common portion */
rtems_attribute attribute;
- void * start_addr;
+ const void * start_addr;
uint32_t length;
uint32_t buf_size;
uint32_t used_blocks;
diff --git a/cpukit/include/rtems/rtems/partdata.h b/cpukit/include/rtems/rtems/partdata.h
index 73babd36f4..196c2142ae 100644
--- a/cpukit/include/rtems/rtems/partdata.h
+++ b/cpukit/include/rtems/rtems/partdata.h
@@ -48,15 +48,20 @@ typedef struct {
ISR_LOCK_MEMBER( Lock )
/**
- * @brief This member contains the physical starting address of the buffer
- * area.
+ * @brief This member contains the base address of the buffer area.
+ *
+ * The base address is the address of the first byte contained in the buffer
+ * area.
*/
- void *starting_address;
+ const void *base_address;
/**
- * @brief This member contains the size of the buffer area in bytes.
+ * @brief This member contains the limit address of the buffer area.
+ *
+ * The limit address is the address of the last byte contained in the buffer
+ * area.
*/
- uintptr_t length;
+ const void *limit_address;
/**
* @brief This member contains the size of each buffer in bytes.