On 07/21/14 23:00, Alexey Preobrazhensky wrote: > Hi all, > > This patch adds support for non-fixed shadow in asan stack instrumentation. > > It is required for Kernel AddressSanitizer, as the shadow offset is > not known at the compile time,
To get shadow offset this patch uses function __asan_get_shadow_ptr. Wouldn't be more effective just to read variable instead of function call? > and the shadow may not be allocated > during the early boot stages. > It's true for now, but at some future point I want to make shadow's allocation very early, before running any instrumented code, so check for __asan_get_shadow_ptr() == 0 will be useless. > This option is intended to be triggered by -fsanitize=kernel-address > option, together with enabling instrumentation with calls. > > Bootstrapped®tested on x86_64. > > Codereview: https://codereview.appspot.com/118040043/ > > -- > Alexey >