netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: build failure after merge of the modules tree
@ 2022-11-14  0:13 Stephen Rothwell
  2022-11-14  8:01 ` Jiri Olsa
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Rothwell @ 2022-11-14  0:13 UTC (permalink / raw)
  To: Luis Chamberlain, David Miller
  Cc: Networking, Alexei Starovoitov, Jiri Olsa, Zhen Lei,
	Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 2974 bytes --]

Hi all,

After merging the modules tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

kernel/trace/ftrace.c: In function 'ftrace_lookup_symbols':
kernel/trace/ftrace.c:8316:52: error: passing argument 1 of 'module_kallsyms_on_each_symbol' from incompatible pointer type [-Werror=incompatible-pointer-types]
 8316 |         found_all = module_kallsyms_on_each_symbol(kallsyms_callback, &args);
      |                                                    ^~~~~~~~~~~~~~~~~
      |                                                    |
      |                                                    int (*)(void *, const char *, long unsigned int)
In file included from include/linux/device/driver.h:21,
                 from include/linux/device.h:32,
                 from include/linux/node.h:18,
                 from include/linux/cpu.h:17,
                 from include/linux/stop_machine.h:5,
                 from kernel/trace/ftrace.c:17:
include/linux/module.h:882:48: note: expected 'const char *' but argument is of type 'int (*)(void *, const char *, long unsigned int)'
  882 | int module_kallsyms_on_each_symbol(const char *modname,
      |                                    ~~~~~~~~~~~~^~~~~~~
kernel/trace/ftrace.c:8316:71: error: passing argument 2 of 'module_kallsyms_on_each_symbol' from incompatible pointer type [-Werror=incompatible-pointer-types]
 8316 |         found_all = module_kallsyms_on_each_symbol(kallsyms_callback, &args);
      |                                                                       ^~~~~
      |                                                                       |
      |                                                                       struct kallsyms_data *
include/linux/module.h:883:42: note: expected 'int (*)(void *, const char *, long unsigned int)' but argument is of type 'struct kallsyms_data *'
  883 |                                    int (*fn)(void *, const char *, unsigned long),
      |                                    ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/trace/ftrace.c:8316:21: error: too few arguments to function 'module_kallsyms_on_each_symbol'
 8316 |         found_all = module_kallsyms_on_each_symbol(kallsyms_callback, &args);
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/module.h:882:5: note: declared here
  882 | int module_kallsyms_on_each_symbol(const char *modname,
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Caused by commit

  90de88426f3c ("livepatch: Improve the search performance of module_kallsyms_on_each_symbol()")

from the modules tree interatcing with commit

  3640bf8584f4 ("ftrace: Add support to resolve module symbols in ftrace_lookup_symbols")

from the next-next tree.

I have no idea how to easily fix this up, so I have used the modules
tree from next-20221111 for today in the hope someone will send me a fix.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: linux-next: build failure after merge of the modules tree
  2022-11-14  0:13 linux-next: build failure after merge of the modules tree Stephen Rothwell
@ 2022-11-14  8:01 ` Jiri Olsa
  2022-11-14  9:08   ` Leizhen (ThunderTown)
  0 siblings, 1 reply; 3+ messages in thread
From: Jiri Olsa @ 2022-11-14  8:01 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Luis Chamberlain, David Miller, Networking, Alexei Starovoitov,
	Zhen Lei, Linux Kernel Mailing List, Linux Next Mailing List

On Mon, Nov 14, 2022 at 11:13:50AM +1100, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the modules tree, today's linux-next build (powerpc
> ppc64_defconfig) failed like this:
> 
> kernel/trace/ftrace.c: In function 'ftrace_lookup_symbols':
> kernel/trace/ftrace.c:8316:52: error: passing argument 1 of 'module_kallsyms_on_each_symbol' from incompatible pointer type [-Werror=incompatible-pointer-types]
>  8316 |         found_all = module_kallsyms_on_each_symbol(kallsyms_callback, &args);
>       |                                                    ^~~~~~~~~~~~~~~~~
>       |                                                    |
>       |                                                    int (*)(void *, const char *, long unsigned int)
> In file included from include/linux/device/driver.h:21,
>                  from include/linux/device.h:32,
>                  from include/linux/node.h:18,
>                  from include/linux/cpu.h:17,
>                  from include/linux/stop_machine.h:5,
>                  from kernel/trace/ftrace.c:17:
> include/linux/module.h:882:48: note: expected 'const char *' but argument is of type 'int (*)(void *, const char *, long unsigned int)'
>   882 | int module_kallsyms_on_each_symbol(const char *modname,
>       |                                    ~~~~~~~~~~~~^~~~~~~
> kernel/trace/ftrace.c:8316:71: error: passing argument 2 of 'module_kallsyms_on_each_symbol' from incompatible pointer type [-Werror=incompatible-pointer-types]
>  8316 |         found_all = module_kallsyms_on_each_symbol(kallsyms_callback, &args);
>       |                                                                       ^~~~~
>       |                                                                       |
>       |                                                                       struct kallsyms_data *
> include/linux/module.h:883:42: note: expected 'int (*)(void *, const char *, long unsigned int)' but argument is of type 'struct kallsyms_data *'
>   883 |                                    int (*fn)(void *, const char *, unsigned long),
>       |                                    ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> kernel/trace/ftrace.c:8316:21: error: too few arguments to function 'module_kallsyms_on_each_symbol'
>  8316 |         found_all = module_kallsyms_on_each_symbol(kallsyms_callback, &args);
>       |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/linux/module.h:882:5: note: declared here
>   882 | int module_kallsyms_on_each_symbol(const char *modname,
>       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> Caused by commit
> 
>   90de88426f3c ("livepatch: Improve the search performance of module_kallsyms_on_each_symbol()")
> 
> from the modules tree interatcing with commit
> 
>   3640bf8584f4 ("ftrace: Add support to resolve module symbols in ftrace_lookup_symbols")
> 
> from the next-next tree.
> 
> I have no idea how to easily fix this up, so I have used the modules
> tree from next-20221111 for today in the hope someone will send me a fix.

hi,
there's no quick fix.. I sent follow up email to the original
change and cc-ed you

thanks,
jirka

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: linux-next: build failure after merge of the modules tree
  2022-11-14  8:01 ` Jiri Olsa
@ 2022-11-14  9:08   ` Leizhen (ThunderTown)
  0 siblings, 0 replies; 3+ messages in thread
From: Leizhen (ThunderTown) @ 2022-11-14  9:08 UTC (permalink / raw)
  To: Jiri Olsa, Stephen Rothwell
  Cc: Luis Chamberlain, David Miller, Networking, Alexei Starovoitov,
	Linux Kernel Mailing List, Linux Next Mailing List



On 2022/11/14 16:01, Jiri Olsa wrote:
> On Mon, Nov 14, 2022 at 11:13:50AM +1100, Stephen Rothwell wrote:
>> Hi all,
>>
>> After merging the modules tree, today's linux-next build (powerpc
>> ppc64_defconfig) failed like this:
>>
>> kernel/trace/ftrace.c: In function 'ftrace_lookup_symbols':
>> kernel/trace/ftrace.c:8316:52: error: passing argument 1 of 'module_kallsyms_on_each_symbol' from incompatible pointer type [-Werror=incompatible-pointer-types]
>>  8316 |         found_all = module_kallsyms_on_each_symbol(kallsyms_callback, &args);
>>       |                                                    ^~~~~~~~~~~~~~~~~
>>       |                                                    |
>>       |                                                    int (*)(void *, const char *, long unsigned int)
>> In file included from include/linux/device/driver.h:21,
>>                  from include/linux/device.h:32,
>>                  from include/linux/node.h:18,
>>                  from include/linux/cpu.h:17,
>>                  from include/linux/stop_machine.h:5,
>>                  from kernel/trace/ftrace.c:17:
>> include/linux/module.h:882:48: note: expected 'const char *' but argument is of type 'int (*)(void *, const char *, long unsigned int)'
>>   882 | int module_kallsyms_on_each_symbol(const char *modname,
>>       |                                    ~~~~~~~~~~~~^~~~~~~
>> kernel/trace/ftrace.c:8316:71: error: passing argument 2 of 'module_kallsyms_on_each_symbol' from incompatible pointer type [-Werror=incompatible-pointer-types]
>>  8316 |         found_all = module_kallsyms_on_each_symbol(kallsyms_callback, &args);
>>       |                                                                       ^~~~~
>>       |                                                                       |
>>       |                                                                       struct kallsyms_data *
>> include/linux/module.h:883:42: note: expected 'int (*)(void *, const char *, long unsigned int)' but argument is of type 'struct kallsyms_data *'
>>   883 |                                    int (*fn)(void *, const char *, unsigned long),
>>       |                                    ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> kernel/trace/ftrace.c:8316:21: error: too few arguments to function 'module_kallsyms_on_each_symbol'
>>  8316 |         found_all = module_kallsyms_on_each_symbol(kallsyms_callback, &args);
>>       |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/module.h:882:5: note: declared here
>>   882 | int module_kallsyms_on_each_symbol(const char *modname,
>>       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>
>> Caused by commit
>>
>>   90de88426f3c ("livepatch: Improve the search performance of module_kallsyms_on_each_symbol()")
>>
>> from the modules tree interatcing with commit
>>
>>   3640bf8584f4 ("ftrace: Add support to resolve module symbols in ftrace_lookup_symbols")
>>
>> from the next-next tree.
>>
>> I have no idea how to easily fix this up, so I have used the modules
>> tree from next-20221111 for today in the hope someone will send me a fix.
> 
> hi,
> there's no quick fix.. I sent follow up email to the original
> change and cc-ed you

The fastest fix is drop my patch 7/9, 8/9, they depend on the interface change
of patch 6/9,but other patches don't rely on either of them.. And I can repost
them after v6.2-rc1.

Otherwise, you'll need to modify your patch, take the module reference before
invoking callback and put it after it is called, without passing modname.


> 
> thanks,
> jirka
> .
> 

-- 
Regards,
  Zhen Lei

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-11-14  9:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-14  0:13 linux-next: build failure after merge of the modules tree Stephen Rothwell
2022-11-14  8:01 ` Jiri Olsa
2022-11-14  9:08   ` Leizhen (ThunderTown)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).