This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Add support for KernelAddressSanitizer
- From: Yury Gribov <y dot gribov at samsung dot com>
- To: Dmitry Vyukov <dvyukov at google dot com>, Jakub Jelinek <jakub at redhat dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Konstantin Serebryany <kcc at gcc dot gnu dot org>, Andrey Ryabinin <a dot ryabinin at samsung dot com>
- Date: Fri, 18 Jul 2014 17:31:03 +0400
- Subject: Re: [PATCH] Add support for KernelAddressSanitizer
- Authentication-results: sourceware.org; auth=none
- References: <53C9079F dot 3060907 at samsung dot com> <20140718122625 dot GC3003 at laptop dot redhat dot com> <CACT4Y+Z5tRuAs+KBc83feeMj8zaY5Atqy7OTzxpqkYpcp_JyXg at mail dot gmail dot com>
>> Also, oring in SANITIZER_ADDRESS means you add -lasan to link flags, I'd
>> guess that for -fsanitize=kernel-address you don't want to add any
libraries
>> at link time?
>
> I suspect that we don't pass -fsanitize=kernel-address during linking
> in kernel today. But I agree that it's better to disable any
> processing during linking for now. Later we may want to do something
> special during linking if -fsanitize=kernel-address is supplied.
AFAIK kernel is linked directly with ld so this may not be a big issue.
>> Do you error out on -fsanitize=thread -fsanitize=kernel-address ?
>> Perhaps -fsanitize=kernel-address -fsanitize=address should be
>> invalid too?
>
> Yes, all these combinations are invalid.
Ok, I'll add these.
-Y