casaroli commented on code in PR #21358:
URL: https://github.com/apache/nuttx/pull/21358#discussion_r4660193012


##########
mm/kasan/sw_tags.c:
##########
@@ -68,6 +66,17 @@ static spinlock_t g_lock;
  * Private Functions
  ****************************************************************************/
 
+static inline uint8_t kasan_random_tag(void)
+{
+  /* Use a simple LCG that does not depend on TLS (rand() requires

Review Comment:
   @W-M-R what does `rand()` have to do with TLS?
   
   I do not understand this comment:
   
   > mm/kasan/sw_tags.c: replace the rand() based tag generator with a small
   > LCG. rand() needs the per-task seed in TLS, which does not exist yet
   > during early boot, so the first tagged allocation crashed.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to