This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Backporting KAsan patches to 4.9 branch

On 10/14/2014 03:19 PM, Dmitry Vyukov wrote:
On Tue, Oct 14, 2014 at 3:07 PM, Yury Gribov <> wrote:
On 09/18/2014 01:57 PM, Jakub Jelinek wrote:
On Thu, Sep 18, 2014 at 01:46:21PM +0400, Yury Gribov wrote:
Kernel Asan patches are currently being discussed in LKML. One of the
points>> raised during review was that KAsan requires GCC 5.0 which is
unstable (e.g. compilation of kernel modules has been broken for two
due to

Would it make sense to backport Kasan-related patches to 4.9 branch to
this feature more accessible to kernel developers? Quick analysis showed
that at the very least this would require
Is it ok to backport these to 4.9? Note that I would discard patches for
other sanitizers (UBsan, Tsan).

I'd say so, if it doesn't need any library changes
(especially not any ABI
visible ones, guess bugfixes could be acceptable).

Finally got time to look into this. I've successfully backported 22 patches
to 4.9:
* bugfixes (12 patches)
* install Asan headers (1 patch)
* libsanitizer merge (1 patch) - this is questionable, see below for
* instrumentation with calls (1 patch)
* optimize strlen instrumentation (1 patch)
* move inlining to sanopt pass (2 patches)
* Kasan (2 patches)

One problem is that for BUILT_IN_ASAN_REPORT_{LOAD,STORE}_N patch I need
libsanitizer APIs (__asan_loadN, __asan_storeN) which were introduced in a
giant libsanitizer merge in 5.0. In current patchset I backport the whole
merge patch (and a bunch of cherry-picks which followed it) but it changes
libsanitizer ABI (new version of __asan_init_vXXX, etc.) which is probably
undesirable. Another option would be to backport just the necessary minimum
(__asan_loadN, __asan_storeN). How should I proceed?

Backporting only __asan_loadN/__asan_storeN looks like the safest option to me.

This would break forward compatibility of 4.9's libsanitizer which seems to be unacceptable.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]