From: Hari Bathini <hbathini@linux.ibm.com>
To: Josh Poimboeuf <jpoimboe@kernel.org>
Cc: Petr Mladek <pmladek@suse.com>,
Venkat Rao Bagalkote <venkat88@linux.ibm.com>,
LKML <linux-kernel@vger.kernel.org>,
linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
Stephen Rothwell <sfr@canb.auug.org.au>,
Madhavan Srinivasan <maddy@linux.ibm.com>,
joe.lawrence@redhat.com, Naveen N Rao <naveen@kernel.org>,
Masahiro Yamada <masahiroy@kernel.org>
Subject: Re: [next-20251022] Kernel Boot Warnings at arch/powerpc/kernel/trace/ftrace.c:234
Date: Thu, 30 Oct 2025 18:09:54 +0530 [thread overview]
Message-ID: <7f461974-7fdd-422f-b4fe-e65af50b0728@linux.ibm.com> (raw)
In-Reply-To: <wxqithrj3vvgbefr7d7afv5vcnuu2ssuzrw6fqtmdjtq3ete3j@pfsgyacqjama>
Hi Josh,
On 30/10/25 7:36 am, Josh Poimboeuf wrote:
> On Wed, Oct 29, 2025 at 11:42:54PM +0530, Hari Bathini wrote:
>> Hi Petr,
>> On 23/10/25 2:42 pm, Petr Mladek wrote:
>>> On Wed 2025-10-22 19:56:45, Venkat Rao Bagalkote wrote:
>>>>
>>>> On 22/10/25 6:36 pm, Petr Mladek wrote:
>>>>> On Wed 2025-10-22 17:36:18, Venkat Rao Bagalkote wrote:
>>>>>> On 22/10/25 1:52 pm, Venkat Rao Bagalkote wrote:
>>>>>>> Greetings!!!
>>>>>>>
>>>>>>>
>>>>>>> IBM CI has reported kernel boot warnings with next-20251022 kernel. I
>>>>>>> see there are couple of warnings hit and eventually system boots to
>>>>>>> emergency mode.
>>>>>>>
>>>>>>>
>>>>>> With the identified first bad commit, is casuing the kernel to boot to
>>>>>> emergency mode. I reverted the bad commit and built the kernel, then kernel
>>>>>> is booting fine, but with boot warnings.
>>>>> I guess that it is the same problem which should get fixed by the patch
>>>>> https://lore.kernel.org/r/e52ee3edf32874da645a9e037a7d77c69893a22a.1760982784.git.jpoimboe@kernel.org
>>>>
>>>>
>>>> Thank you Petr, for pointing to the fix patch. It fixes the kernel booting
>>>> to emergency mode.
>>>
>>> Great.
>>>
>>>> But boot warning still persists.
>>>
>>> I looks like another problem. I would expect that it is in
>>> the ftrace code, either in the generic or arch-specific part.
>> Yeah. This is part of arch-specific code that does init of ftrace
>> out line stubs. The problem seems to be since commit 1ba9f8979426
>> ("vmlinux.lds: Unify TEXT_MAIN, DATA_MAIN, and related macros").
>> Before this commit, .text.startup section was featured in INIT_TEXT
>> but now it seems to feature in TEXT. Is this change right/intentional?
>> If yes, I can post a fix patch in ftrace arch-specific code accordingly.
>
> Ah, I wasn't aware of .text.startup. Apparently it's used by KASAN,
> KCSCAN and GCOV for a significant amount of constructor code, which is
> only called during boot. So we should try to keep it in .init.text.
>
> Venkat, does this fix it?
I tried the patch along with
https://lore.kernel.org/r/e52ee3edf32874da645a9e037a7d77c69893a22a.1760982784.git.jpoimboe@kernel.org
It fixes the problems reported. Thanks!
>
> diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
> index 5facbc9946344..9de1d900fa154 100644
> --- a/include/asm-generic/vmlinux.lds.h
> +++ b/include/asm-generic/vmlinux.lds.h
> @@ -88,13 +88,29 @@
>
> /*
> * Support -ffunction-sections by matching .text and .text.*,
> - * but exclude '.text..*'.
> + * but exclude '.text..*', .text.startup[.*], and .text.exit[.*].
> *
> - * Special .text.* sections that are typically grouped separately, such as
> + * .text.startup and .text.startup.* are matched later by INIT_TEXT.
> + * .text.exit and .text.exit.* are matched later by EXIT_TEXT.
> + *
> + * Other .text.* sections that are typically grouped separately, such as
> * .text.unlikely or .text.hot, must be matched explicitly before using
> * TEXT_MAIN.
> */
> -#define TEXT_MAIN .text .text.[0-9a-zA-Z_]*
> +#define TEXT_MAIN \
> + .text \
> + .text.[_0-9A-Za-df-rt-z]* \
> + .text.s[_0-9A-Za-su-z]* \
> + .text.st[_0-9A-Zb-z]* \
> + .text.sta[_0-9A-Za-qs-z]* \
> + .text.star[_0-9A-Za-su-z]* \
> + .text.start[_0-9A-Za-tv-z]* \
> + .text.startu[_0-9A-Za-oq-z]* \
> + .text.startup[_0-9A-Za-z]* \
> + .text.e[_0-9A-Za-wy-z]* \
> + .text.ex[_0-9A-Za-hj-z]* \
> + .text.exi[_0-9A-Za-su-z]* \
> + .text.exit[_0-9A-Za-z]*
>
> /*
> * Support -fdata-sections by matching .data, .data.*, and others,
> @@ -713,16 +729,16 @@
>
> #define INIT_TEXT \
> *(.init.text .init.text.*) \
> - *(.text.startup)
> + *(.text.startup .text.startup.*)
>
> #define EXIT_DATA \
> *(.exit.data .exit.data.*) \
> *(.fini_array .fini_array.*) \
> - *(.dtors .dtors.*) \
> + *(.dtors .dtors.*)
>
> #define EXIT_TEXT \
> *(.exit.text) \
> - *(.text.exit) \
> + *(.text.exit .text.exit.*)
>
> #define EXIT_CALL \
> *(.exitcall.exit)
>
next prev parent reply other threads:[~2025-10-30 12:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-22 8:22 [next-20251022] Kernel Boot Warnings at arch/powerpc/kernel/trace/ftrace.c:234 Venkat Rao Bagalkote
2025-10-22 8:26 ` Venkat Rao Bagalkote
2025-10-22 12:06 ` Venkat Rao Bagalkote
2025-10-22 13:06 ` Petr Mladek
2025-10-22 14:26 ` Venkat Rao Bagalkote
2025-10-23 9:12 ` Petr Mladek
2025-10-29 18:12 ` Hari Bathini
2025-10-30 2:06 ` Josh Poimboeuf
2025-10-30 12:39 ` Hari Bathini [this message]
2025-10-31 1:07 ` Josh Poimboeuf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7f461974-7fdd-422f-b4fe-e65af50b0728@linux.ibm.com \
--to=hbathini@linux.ibm.com \
--cc=joe.lawrence@redhat.com \
--cc=jpoimboe@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=masahiroy@kernel.org \
--cc=naveen@kernel.org \
--cc=pmladek@suse.com \
--cc=sfr@canb.auug.org.au \
--cc=venkat88@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.