Gedare Bloom started a new discussion on cpukit/include/crypt.h: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/687#note_130012

 > +/* Code to re-introduce the C11 memset_s function
 > +*  which is missing from the RTEMS C11 compiler but which
 > +*  is used in the libcrypt functions to securely erase
 > +*  sensitive data after use. Since the C11 memset_s
 > +*  function is not available we provide our own implementation
 > +*  here. Should the RTEMS C library ever provide
 > +*  a conforming memset_s function this code can be removed.
 > +*/
 > +static inline void memset_s_rtems(void *s, size_t n) {
 > +    volatile unsigned char *p = (volatile unsigned char *)s;
 > +    while (n--) {
 > +            *p++ = 0;
 > +    }
 > +}
 > +
 > +static inline void explicit_bzero_rtems (void *s, size_t len)

since these 3 functions are only used conditionally on the libc version, you 
could define them only for the given stdc_version. In addition, you could 
collapse them to a macro. This would simplify the other parts.

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


_______________________________________________
bugs mailing list
[email protected]
http://lists.rtems.org/mailman/listinfo/bugs

Reply via email to