[PATCH] D36399: [sanitizers] Add a blocking boolean to GetRandom prototype

Kostya Kortchinsky via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 7 07:53:25 PDT 2017


cryptoad created this revision.
Herald added a subscriber: kubamracek.

On platforms with `getrandom`, the system call defaults to blocking. This
becomes an issue in the very early stage of the boot for Scudo, when the RNG
source is not set-up yet: the syscall will block and we'll stall.

Introduce a parameter to specify that the function should not block, defaulting
to blocking as the underlying syscall does.

Update Scudo to use the non-blocking version.


https://reviews.llvm.org/D36399

Files:
  lib/sanitizer_common/sanitizer_common.h
  lib/sanitizer_common/sanitizer_linux.cc
  lib/sanitizer_common/sanitizer_mac.cc
  lib/sanitizer_common/sanitizer_win.cc
  lib/sanitizer_common/tests/sanitizer_common_test.cc
  lib/scudo/scudo_utils.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D36399.109995.patch
Type: text/x-patch
Size: 5467 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170807/4994af03/attachment.bin>


More information about the llvm-commits mailing list