This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Support asan-fixed-shadow-offset in GCC
- From: Andrey Ryabinin <a dot ryabinin at samsung dot com>
- To: Yury Gribov <y dot gribov at samsung dot com>, Alexey Preobrazhensky <preobr at google dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Cc: Kostya Serebryany <kcc at google dot com>, Dmitry Vyukov <dvyukov at google dot com>, David Li <davidxl at google dot com>, Jakub Jelinek <jakub at redhat dot com>
- Date: Tue, 22 Jul 2014 14:43:59 +0400
- Subject: Re: [PATCH] Support asan-fixed-shadow-offset in GCC
- Authentication-results: sourceware.org; auth=none
- References: <CA+FTKhusLtf9frmh7VcNMWpwDdanHT3mgUh8PhduDY9Ff4sCww at mail dot gmail dot com> <53CE3A67 dot 1050908 at samsung dot com> <53CE3D5F dot 6090702 at samsung dot com>
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
>