google / kmsan

KernelMemorySanitizer, a detector of uses of uninitialized memory in the Linux kernel
Other
406 stars 62 forks source link

Initialize TLS parameters for __msan_memset() and friends in the compiler #63

Open ramosian-glider opened 5 years ago

ramosian-glider commented 5 years ago

It may make sense to emit stores to param_tls and param_origin_tls directly in the compiler for calls to __msan_memset() for KMSAN, so that it's possible to e.g. propagate the state of uninitialized consant byte or report errors on uninitialized pointer/size arguments.

This cannot be done for MSan, because __msan_memset may be called from the userspace RTL.