RTEMS | libmisc/stackchk: Add stack smashing protection (!277)

Mohamed Hassan (@Hamzi) gitlab at rtems.org
Thu Nov 14 03:55:51 UTC 2024




Mohamed Hassan commented on a discussion on cpukit/include/rtems/stackchk.h: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/277#note_114901

 >  extern const Stack_checker_Reporter_handler Stack_checker_Reporter;
 >  
 > +/*
 > + * Define stack check guard pattern
 > + */
 > +#ifndef RTEMS_STACK_CHECKER_GUARD_VALUE
 > +  #define RTEMS_STACK_CHECKER_GUARD_VALUE 0xDEADBEEF
 > +#endif
 > +
 > +  __attribute__((weak)) uintptr_t __stack_chk_guard = RTEMS_STACK_CHECKER_GUARD_VALUE;
 > +
 > +/**
 > + * @brief Stack smashing protecting function
 > + * 
 > + * @note This function is called when a stack overflow occurs.
 > + *       User application can override it's default implementation.

Noted.

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/277#note_114901
You're receiving this email because of your account on gitlab.rtems.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20241114/006c8e2c/attachment.htm>


More information about the bugs mailing list