Re: [PATCH] Support asan-fixed-shadow-offset in GCC

2014-07-25 Thread Alexey Preobrazhensky
Our x86_64 implementation it also checks whether frame pointer lies within direct mapping zone (0x8800-c800), as some frames are not in that zone and doesn't have shadow. On Tue, Jul 22, 2014 at 2:43 PM, Andrey Ryabinin wrote: > On 07/22/14 14:30, Yury Gribov wrote: I

Re: [PATCH] Support asan-fixed-shadow-offset in GCC

2014-07-22 Thread Yury Gribov
> This function just returns some global variable, and I don't think we will need something more complex in future. For kernel probably yes but what about userspace? -Y

Re: [PATCH] Support asan-fixed-shadow-offset in GCC

2014-07-22 Thread Andrey Ryabinin
On 07/22/14 14:30, Yury Gribov wrote: >>> 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? >

Re: [PATCH] Support asan-fixed-shadow-offset in GCC

2014-07-22 Thread Yury Gribov
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? Depends on how much logic you want to hide there. I

Re: [PATCH] Support asan-fixed-shadow-offset in GCC

2014-07-22 Thread Andrey Ryabinin
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_

Re: [PATCH] Support asan-fixed-shadow-offset in GCC

2014-07-21 Thread Yury Gribov
On 07/21/2014 11:00 PM, Alexey Preobrazhensky wrote: This patch adds support for non-fixed shadow in asan stack instrumentation. We probably also need to support non-fixed shadow in the middle-end (the patch only implements it for RTL stack poisoner). -Y

[PATCH] Support asan-fixed-shadow-offset in GCC

2014-07-21 Thread Alexey Preobrazhensky
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, and the shadow may not be allocated during the early boot stages. This option is intended to be triggered by -fsa