Re: [PATCH] kasan: account for new sections when instrumenting globals

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2016-06-23 17:38 GMT+03:00 Dmitry Vyukov <dvyukov@xxxxxxxxxx>:
> On Thu, Jun 23, 2016 at 4:00 PM, Andrey Ryabinin <ryabinin.a.a@xxxxxxxxx> wrote:
>> 2016-06-23 16:21 GMT+03:00 Dmitry Vyukov <dvyukov@xxxxxxxxxx>:
>>>>
>>>> gcc version 6.1.1 20160513
>>>>
>>>> .dtors contains asan destructors for global vars:
>>>>
>>
>> Something has changed very recently, because my gcc-6.1.0 2016-04-27
>> generate .fini_array.
>> So if this is not a bug in gcc, and such change done intentionally, we
>> can just discard .dtors.
>> In case this is a bug, and it will be fixed in gcc release (6.2.0) we
>> can ignore it.
>
>
> Okay, turns out we configure our compilers with
> --disable-initfini-array for some reason. This switches it to usage of
> .ctors/.dtors.
>
> What about?
>

Looks good.

> --- a/include/asm-generic/vmlinux.lds.h
> +++ b/include/asm-generic/vmlinux.lds.h
> @@ -537,15 +537,19 @@
>
>  #define INIT_TEXT                                                      \
>         *(.init.text)                                                   \
> +       *(.text.startup)                                                \
>         MEM_DISCARD(init.text)
>
>  #define EXIT_DATA                                                      \
>         *(.exit.data)                                                   \
> +       *(.fini_array)                                                  \
> +       *(.dtors)                                                       \
>         MEM_DISCARD(exit.data)                                          \
>         MEM_DISCARD(exit.rodata)
>
>  #define EXIT_TEXT                                                      \
>         *(.exit.text)                                                   \
> +       *(.text.exit)                                                   \
>         MEM_DISCARD(exit.text)
>
>  #define EXIT_CALL                                                      \
--
To unsubscribe from this list: send the line "unsubscribe linux-arch" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux