[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<BYAPR12MB32051119909383F5485DBD5AD5DE2@BYAPR12MB3205.namprd12.prod.outlook.com>
Date: Tue, 18 Mar 2025 12:36:59 +0000
From: Stephen Eta Zhou <stephen.eta.zhou@...look.com>
To: David Disseldorp <ddiss@...e.de>
CC: "jsperbeck@...gle.com" <jsperbeck@...gle.com>, "akpm@...ux-foundation.org"
<akpm@...ux-foundation.org>, "gregkh@...uxfoundation.org"
<gregkh@...uxfoundation.org>, "lukas@...ner.de" <lukas@...ner.de>,
"wufan@...ux.microsoft.com" <wufan@...ux.microsoft.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>
Subject: Re: [RFC PATCH] initramfs: Add size validation to prevent tmpfs
exhaustion
> Not always. The *built-in* initramfs unpack_to_rootfs() error path
> panics, but external initramfs unpack_to_rootfs() failure won't panic
> immediately...
You're right that the behavior differs between built-in and external initramfs handling. My concern is primarily about the built-in case, where unpack_to_rootfs() will lead to a panic if decompression fails.
> Are your console/serial drivers loaded as external modules? That sounds
> like a configuration problem.
My console and serial port drivers are built into the kernel. I found that if the built-in initramfs fails to be decompressed, it will enter a suspended state when panic is called, and no logs will be output (my test environment at this time does not have the early serial port). After debugging, I found that console_flush_all did not seem to find an available console. I will debug this problem in depth next.
Thanks,
Stephen
________________________________________
From: David Disseldorp <ddiss@...e.de>
Sent: Tuesday, March 18, 2025 17:51
To: Stephen Eta Zhou <stephen.eta.zhou@...look.com>
Cc: jsperbeck@...gle.com <jsperbeck@...gle.com>; akpm@...ux-foundation.org <akpm@...ux-foundation.org>; gregkh@...uxfoundation.org <gregkh@...uxfoundation.org>; lukas@...ner.de <lukas@...ner.de>; wufan@...ux.microsoft.com <wufan@...ux.microsoft.com>; linux-kernel@...r.kernel.org <linux-kernel@...r.kernel.org>; linux-fsdevel@...r.kernel.org <linux-fsdevel@...r.kernel.org>
Subject: Re: [RFC PATCH] initramfs: Add size validation to prevent tmpfs exhaustion
On Tue, 18 Mar 2025 06:28:53 +0000, Stephen Eta Zhou wrote:
> > There's room for improvement WRT how out-of-memory failures are reported
>
> I am currently trying to find a good optimization solution for this. Since initramfs is decompressed in the early stage of the kernel, if the decompression fails, it will call panic to put the kernel into a panic state.
Not always. The *built-in* initramfs unpack_to_rootfs() error path
panics, but external initramfs unpack_to_rootfs() failure won't panic
immediately...
> There is a contradiction: at this time, the console and serial port have not been initialized yet, which will cause the error message to fail to be output, resulting in a suspended state, and no valid output can be seen.
Are your console/serial drivers loaded as external modules? That sounds
like a configuration problem.
Powered by blists - more mailing lists