Re: [PATCH v2 15/28] init: lto: ensure initcall ordering

2020-09-10 Thread Sami Tolvanen
On Thu, Sep 10, 2020 at 10:25:40AM +0100, David Woodhouse wrote: > On Thu, 2020-09-03 at 13:30 -0700, Sami Tolvanen wrote: > > With LTO, the compiler doesn't necessarily obey the link order for > > initcalls, and initcall variables need globally unique names to avoid > > collisions at link time. >

Re: [PATCH v2 15/28] init: lto: ensure initcall ordering

2020-09-10 Thread David Woodhouse
On Thu, 2020-09-03 at 13:30 -0700, Sami Tolvanen wrote: > With LTO, the compiler doesn't necessarily obey the link order for > initcalls, and initcall variables need globally unique names to avoid > collisions at link time. > > This change exports __KBUILD_MODNAME and adds the initcall_id()

Re: [PATCH v2 15/28] init: lto: ensure initcall ordering

2020-09-08 Thread Sami Tolvanen
On Thu, Sep 03, 2020 at 03:40:31PM -0700, Kees Cook wrote: > On Thu, Sep 03, 2020 at 01:30:40PM -0700, Sami Tolvanen wrote: > > With LTO, the compiler doesn't necessarily obey the link order for > > initcalls, and initcall variables need globally unique names to avoid > > collisions at link time.

Re: [PATCH v2 15/28] init: lto: ensure initcall ordering

2020-09-03 Thread Kees Cook
On Thu, Sep 03, 2020 at 01:30:40PM -0700, Sami Tolvanen wrote: > With LTO, the compiler doesn't necessarily obey the link order for > initcalls, and initcall variables need globally unique names to avoid > collisions at link time. > > This change exports __KBUILD_MODNAME and adds the

[PATCH v2 15/28] init: lto: ensure initcall ordering

2020-09-03 Thread Sami Tolvanen
With LTO, the compiler doesn't necessarily obey the link order for initcalls, and initcall variables need globally unique names to avoid collisions at link time. This change exports __KBUILD_MODNAME and adds the initcall_id() macro, which uses it together with __COUNTER__ and __LINE__ to help