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

Alexey Preobrazhensky preobr@google.com
Fri Jul 25 12:35:00 GMT 2014


Our x86_64 implementation it also checks whether frame pointer lies
within direct mapping zone (0xffff880000000000-ffffc80000000000), as
some frames are not in that zone and doesn't have shadow.

On Tue, Jul 22, 2014 at 2:43 PM, Andrey Ryabinin <a.ryabinin@samsung.com> wrote:
> 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?
>>
>> Depends on how much logic you want to hide there. If it's just "return something" than sure
>> but if you need some synchronization or complex calculations, accessing global would not be enough.
>>
>
> This function just returns some global variable, and I don't think we will need something more complex in future.
>
>> -Y
>>
>



More information about the Gcc-patches mailing list