[PATCH] D34412: [sanitizer] Add a function to gather random bytes

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 20 15:28:49 PDT 2017


rnk added a comment.

In https://reviews.llvm.org/D34412#785712, @zturner wrote:

> Assuming sanitizer windows doesn't mind to take a dependency on `advapi32.dll` (maybe it already has one?) this can be implemented pretty trivially using `CryptGenRandom` or `RtlGenRandom` (latter is easier to use).


We can definitely do that. We probably already link against it.

> In any case, shouldn't the unimplemented versions at least do *something*, even if they are not cryptographically strong?

The use case for this random data is more ASLR. We can definitely add this API on Windows now, but scudo is only supported on Linux for now, so there isn't much reason to do it or to block this patch for Windows or Mac. I support landing this as is.


https://reviews.llvm.org/D34412





More information about the llvm-commits mailing list