Re: [trace:trace/core 16/16] WARNING: modpost: vmlinux: section mismatch in reference: trace_printk_init_buffers.part.0+0xc8 (section: .text.unlikely) -> initcall_level_names (section: .init.data)

Woradorn Laodhanadhaworn <[email protected]> Thu, 30 Jul 2026 14:04:20 +0700
Newsgroups dev.linux.lists.oe-kbuild-all
Message-ID <[email protected]>
On 29/7/2569 BE 22:36, Steven Rostedt wrote:
> On Wed, 29 Jul 2026 13:14:23 +0800
> kernel test robot <[email protected]> wrote:
> 
>> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace trace/core
>> head:   c33330b2ec170dd38b3284a72bc6a07a49cc9a65
>> commit: c33330b2ec170dd38b3284a72bc6a07a49cc9a65 [16/16] tracing: Use seq_buf for string concatenation
>> config: xtensa-randconfig-001-20260729 (https://download.01.org/0day-ci/archive/20260729/[email protected]/config)
>> compiler: xtensa-linux-gcc (GCC) 12.5.0
>> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260729/[email protected]/reproduce)
>>
>> If you fix the issue in a separate patch/commit (i.e. not just a new version of
>> the same patch/commit), kindly add following tags
>> | Reported-by: kernel test robot <[email protected]>
>> | Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
>>
>> All warnings (new ones prefixed by >>, old ones prefixed by <<):
>>
>>>> WARNING: modpost: vmlinux: section mismatch in reference: trace_printk_init_buffers.part.0+0xc8 (section: .text.unlikely) -> initcall_level_names (section: .init.data)  
>>
>> --
>> 0-DAY CI Kernel Test Service
>> https://github.com/intel/lkp-tests/wiki
> 
> This looks to be a false positive. I have no idea how the above commit
> could cause that warning.
> 
> -- Steve

Hi Steven,

I reproduced this locally with commit
`c33330b2ec170dd38b3284a72bc6a07a49cc9a65`, and it also reports:

WARNING: modpost: vmlinux: section mismatch in reference:
trace_printk_init_buffers.part.0+0xc8 (section: .text.unlikely) ->
initcall_level_names (section: .init.data)

Then I tried the same configuration and reproduction steps with the parent
commit, `b6ccdca8d11c28338776811f0b9024d92c4bedb4`. It doesn't report anything
related to `modpost: vmlinux: section mismatch in reference:
trace_printk_init_buffers.part`.

So it looks like this commit introduced the warning. I'm not sure where to look
yet, but I'll dig into `modpost.c` to understand the root cause. If you have any 
suggestions on where I should start looking, I'd really appreciate them.

Also, I'd like to ask how urgent this issue is. It might take me some time to
find the root cause.

Thanks,
Woradorn