diff mbox series

[3/3] Revert "Kbuild, lto, workaround: Don't warn for initcall_reference in modpost"

Message ID 20220730173636.1303357-3-masahiroy@kernel.org (mailing list archive)
State New, archived
Headers show
Series [1/3] modpost: add array range check to sec_name() | expand

Commit Message

Masahiro Yamada July 30, 2022, 5:36 p.m. UTC
This reverts commit 77ab21adae509c5540956729e2d03bc1a59bc82a.

That commit was 8 years old, and it said "This is a workaround".
If this is needed for GCC LTO, it should be added in a proper way.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

 scripts/mod/modpost.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Nick Desaulniers Aug. 2, 2022, 6:04 p.m. UTC | #1
On Sat, Jul 30, 2022 at 10:37 AM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> This reverts commit 77ab21adae509c5540956729e2d03bc1a59bc82a.
>
> That commit was 8 years old, and it said "This is a workaround".
> If this is needed for GCC LTO, it should be added in a proper way.
>
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

Please don't forget to cc the author & reviewers for a patch when
submitting a revert.

+ Jiri in case a patch needs to be carried in any downstream trees for
re-application.

Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>


> ---
>
>  scripts/mod/modpost.c | 3 ---
>  1 file changed, 3 deletions(-)
>
> diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
> index c6a055c0291e..a8ee27496da7 100644
> --- a/scripts/mod/modpost.c
> +++ b/scripts/mod/modpost.c
> @@ -1462,9 +1462,6 @@ static void default_mismatch_handler(const char *modname, struct elf_info *elf,
>         from = find_elf_symbol2(elf, r->r_offset, fromsec);
>         fromsym = sym_name(elf, from);
>
> -       if (strstarts(fromsym, "reference___initcall"))
> -               return;
> -
>         tosec = sec_name(elf, get_secindex(elf, sym));
>         to = find_elf_symbol(elf, r->r_addend, sym);
>         tosym = sym_name(elf, to);
> --
> 2.34.1
>
Jiri Slaby Aug. 4, 2022, 6:47 a.m. UTC | #2
On 02. 08. 22, 20:04, Nick Desaulniers wrote:
> On Sat, Jul 30, 2022 at 10:37 AM Masahiro Yamada <masahiroy@kernel.org> wrote:
>>
>> This reverts commit 77ab21adae509c5540956729e2d03bc1a59bc82a.
>>
>> That commit was 8 years old, and it said "This is a workaround".
>> If this is needed for GCC LTO, it should be added in a proper way.
>>
>> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> 
> Please don't forget to cc the author & reviewers for a patch when
> submitting a revert.
> 
> + Jiri in case a patch needs to be carried in any downstream trees for
> re-application.

IMO we already got rid of -fno-toplevel-reorder (we have noreorder 
attribute now), so:

Acked-by: Jiri Slaby <jirislaby@kernel.org>

> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>

Thanks for letting me know.

>>   scripts/mod/modpost.c | 3 ---
>>   1 file changed, 3 deletions(-)
>>
>> diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
>> index c6a055c0291e..a8ee27496da7 100644
>> --- a/scripts/mod/modpost.c
>> +++ b/scripts/mod/modpost.c
>> @@ -1462,9 +1462,6 @@ static void default_mismatch_handler(const char *modname, struct elf_info *elf,
>>          from = find_elf_symbol2(elf, r->r_offset, fromsec);
>>          fromsym = sym_name(elf, from);
>>
>> -       if (strstarts(fromsym, "reference___initcall"))
>> -               return;
>> -
>>          tosec = sec_name(elf, get_secindex(elf, sym));
>>          to = find_elf_symbol(elf, r->r_addend, sym);
>>          tosym = sym_name(elf, to);
>> --
>> 2.34.1
>>
> 
>
diff mbox series

Patch

diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index c6a055c0291e..a8ee27496da7 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -1462,9 +1462,6 @@  static void default_mismatch_handler(const char *modname, struct elf_info *elf,
 	from = find_elf_symbol2(elf, r->r_offset, fromsec);
 	fromsym = sym_name(elf, from);
 
-	if (strstarts(fromsym, "reference___initcall"))
-		return;
-
 	tosec = sec_name(elf, get_secindex(elf, sym));
 	to = find_elf_symbol(elf, r->r_addend, sym);
 	tosym = sym_name(elf, to);