Re: [PATCH 1/1] sched.h: always_inline alloc_tag_{save|restore} to fix modpost warnings

From: Andrew Morton
Date: Wed Jul 03 2024 - 18:51:37 EST


On Wed, 3 Jul 2024 15:15:20 -0700 Suren Baghdasaryan <surenb@xxxxxxxxxx> wrote:

> Mark alloc_tag_{save|restore} as always_inline to fix the following
> modpost warnings:
>
> WARNING: modpost: vmlinux: section mismatch in reference: alloc_tag_save+0x1c (section: .text.unlikely) -> initcall_level_names (section: .init.data)
> WARNING: modpost: vmlinux: section mismatch in reference: alloc_tag_restore+0x3c (section: .text.unlikely) -> initcall_level_names (section: .init.data)

Well, is it only about fixing warnings? If the warning is correct then
this might be fixing kernel crashes.

Do you know where these references are coming from?

I'm curious about the .text.unlikely. Makes me wonder if we should
also have .init.unlikely for unlikely() calls which happen from __init
code. Maybe we already handle that.

> Reported-by: kernel test robot <lkp@xxxxxxxxx>
> Closes: https://lore.kernel.org/oe-kbuild-all/202407032306.gi9nZsBi-lkp@xxxxxxxxx/
> Signed-off-by: Suren Baghdasaryan <surenb@xxxxxxxxxx>
> Cc: Kent Overstreet <kent.overstreet@xxxxxxxxx>

Fixes: 22d407b164ff ("lib: add allocation tagging support for memory allocation profiling")
Cc: stable

yes?