From nobody Fri Oct 3 20:56:10 2025 Received: from out30-132.freemail.mail.aliyun.com (out30-132.freemail.mail.aliyun.com [115.124.30.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1CEE81CEAB2 for ; Mon, 25 Aug 2025 02:57:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.132 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756090629; cv=none; b=c1IHQini+UW2zs9VP6ug59y7Yx15276cfwg5XlNQNwxcmSPTozXyRzIk9KIpDwgLXnxaM+kYk4n35DQOvi0YaTN3R8DvBBc8rwU1lQksr2RfQ1My9dHOrh9g8hJjWyNg+LR0jZeCoxCoDoE/Lkl6ldtUOg60smQqA65/7mpgGks= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756090629; c=relaxed/simple; bh=sWtz293OE9gB9N7nNIRvDMxDhE6lkzjEHk8Qi/o9CaA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=oIDbyi1s9ODy8ymNnM5h9Vvw+00Zktl8HDzUZw+0CyN/5V5SsRj3cAdWKonKBmoad6K1W2PTsAoKjC0BQOnC6RCJZrLWd9PKgt6+ot4fjDCTVkyMhv83iwEyMEaMjFRBZPkLTLtJrcb1mmTufgec6/lDmKflTcK0BF4EIjgravM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com; spf=pass smtp.mailfrom=linux.alibaba.com; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b=RQMicdhS; arc=none smtp.client-ip=115.124.30.132 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b="RQMicdhS" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1756090623; h=From:To:Subject:Date:Message-Id:MIME-Version; bh=7MAm6Z3riqm4IE81SV3duGhwX7ltTmUSPeAsxYMHI/M=; b=RQMicdhSY+9kP89v+5aNWH67mvJl3n3RkflfGvKYMQL18AdPaEpYp8hsgP5wtVEZq5QjisE6o/MRYlHiw0eKGNFZEMjhu6Dvw1DP0kGFVu0ArHo2PXqT3e5ZuScLQxAmdT1udTe8uCyknw82rGxz/SdZfLx11/FGRptvsuGZQBA= Received: from localhost(mailfrom:feng.tang@linux.alibaba.com fp:SMTPD_---0WmPuXGT_1756090622 cluster:ay36) by smtp.aliyun-inc.com; Mon, 25 Aug 2025 10:57:03 +0800 From: Feng Tang To: Andrew Morton , Petr Mladek , Steven Rostedt , Lance Yang , Jonathan Corbet , linux-kernel@vger.kernel.org Cc: Askar Safin , paulmck@kernel.org, john.ogness@linutronix.de, Feng Tang Subject: [PATCH v2 1/4] lib/sys_info: handle sys_info_mask==0 case Date: Mon, 25 Aug 2025 10:56:58 +0800 Message-Id: <20250825025701.81921-2-feng.tang@linux.alibaba.com> X-Mailer: git-send-email 2.39.5 (Apple Git-154) In-Reply-To: <20250825025701.81921-1-feng.tang@linux.alibaba.com> References: <20250825025701.81921-1-feng.tang@linux.alibaba.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" It is a normal case that bitmask parameter is 0, so pre-initialize the names[] to null string to cover this case. Also remove the superfluous "+1" in names[sizeof(sys_info_avail) + 1], which is needed for 'strlen()', but not for 'sizeof()'. Suggested-by: Petr Mladek Signed-off-by: Feng Tang Reviewed-by: Petr Mladek --- lib/sys_info.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/sys_info.c b/lib/sys_info.c index 5bf503fd7ec1..496f9151c9b6 100644 --- a/lib/sys_info.c +++ b/lib/sys_info.c @@ -55,7 +55,7 @@ int sysctl_sys_info_handler(const struct ctl_table *ro_ta= ble, int write, void *buffer, size_t *lenp, loff_t *ppos) { - char names[sizeof(sys_info_avail) + 1]; + char names[sizeof(sys_info_avail)]; struct ctl_table table; unsigned long *si_bits_global; =20 @@ -81,6 +81,7 @@ int sysctl_sys_info_handler(const struct ctl_table *ro_ta= ble, int write, char *delim =3D ""; int i, len =3D 0; =20 + names[0] =3D '\0'; for (i =3D 0; i < ARRAY_SIZE(si_names); i++) { if (*si_bits_global & si_names[i].bit) { len +=3D scnprintf(names + len, sizeof(names) - len, --=20 2.39.5 (Apple Git-154) From nobody Fri Oct 3 20:56:10 2025 Received: from out30-113.freemail.mail.aliyun.com (out30-113.freemail.mail.aliyun.com [115.124.30.113]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 851C1393DCC for ; Mon, 25 Aug 2025 03:02:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.113 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756090951; cv=none; b=Fnb/gVzlwon2pdAZkFD6yaz9gQoPP4ioViLba4f1Pawu52xELKssyAkSaFaPOLu2f51CMnq5RPE554rHx7VBvdHIWk67r8RlaLLIYqso7C9iHFR6CMoJWSLV7l76vhaYGQNFVwC/zTctVfdX9MwkQrlaXF4fA+j0GWyQkbv5tCE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756090951; c=relaxed/simple; bh=R6KmWkGVXNO5WRrr5YpP2XcZK6tqzKdp71H2IrZyk6U=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=QFhPFl4Si/OpwiBhGmggH3tfluDQB5I1iLFZJoYoL8z5LPF0z5QfKuzH8Q/Nf3pBxRAA7QoY8YwCCePrcgXh52YcpAjv/OAmCR4Kqr2Ci4qGvHIBpxC3y4LbGIsJZP8caDCaTRl7UlMS7qa82BwrR2plaA1jmcnhhil2jHNcgUA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com; spf=pass smtp.mailfrom=linux.alibaba.com; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b=QjGdK763; arc=none smtp.client-ip=115.124.30.113 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b="QjGdK763" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1756090941; h=From:To:Subject:Date:Message-Id:MIME-Version; bh=tUn2iYdBZOhBQjTOKqXwBVKONJFvUr1wfQQXdvlwzF8=; b=QjGdK7638HtUuh2Hhrt1rvHGTWodfGBJx53dLFjVZ1HIcyeiLO5iZdQe6bhOOg1vdH28xk50j2ht3fQxnn+YFw+fEyx0D40A/njYHWq3tZ/0VQIs0ZWwnvum7aG7EF16HwaclQbdlSQytxQQZmARvFX1Do4jivhz3YerCcUUitY= Received: from localhost(mailfrom:feng.tang@linux.alibaba.com fp:SMTPD_---0WmPuXGx_1756090623 cluster:ay36) by smtp.aliyun-inc.com; Mon, 25 Aug 2025 10:57:04 +0800 From: Feng Tang To: Andrew Morton , Petr Mladek , Steven Rostedt , Lance Yang , Jonathan Corbet , linux-kernel@vger.kernel.org Cc: Askar Safin , paulmck@kernel.org, john.ogness@linutronix.de, Feng Tang Subject: [PATCH v2 2/4] panic: refine the document for 'panic_print' Date: Mon, 25 Aug 2025 10:56:59 +0800 Message-Id: <20250825025701.81921-3-feng.tang@linux.alibaba.com> X-Mailer: git-send-email 2.39.5 (Apple Git-154) In-Reply-To: <20250825025701.81921-1-feng.tang@linux.alibaba.com> References: <20250825025701.81921-1-feng.tang@linux.alibaba.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" User reported current document about SYS_INFO_PANIC_CONSOLE_REPLAY is confusing, that people could expect all user space console messages to be replayed. Specify that only 'kernel' messages will be replayed to solve the confusion. Reported-by: Askar Safin Signed-off-by: Feng Tang Reviewed-by: Petr Mladek --- Documentation/admin-guide/kernel-parameters.txt | 2 +- Documentation/admin-guide/sysctl/kernel.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentatio= n/admin-guide/kernel-parameters.txt index 747a55abf494..86f395f2933b 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -4589,7 +4589,7 @@ bit 2: print timer info bit 3: print locks info if CONFIG_LOCKDEP is on bit 4: print ftrace buffer - bit 5: replay all messages on consoles at the end of panic + bit 5: replay all kernel messages on consoles at the end of panic bit 6: print all CPUs backtrace (if available in the arch) bit 7: print only tasks in uninterruptible (blocked) state *Be aware* that this option may print a _lot_ of lines, diff --git a/Documentation/admin-guide/sysctl/kernel.rst b/Documentation/ad= min-guide/sysctl/kernel.rst index 8b49eab937d0..f3ee807b5d8b 100644 --- a/Documentation/admin-guide/sysctl/kernel.rst +++ b/Documentation/admin-guide/sysctl/kernel.rst @@ -890,7 +890,7 @@ bit 1 print system memory info bit 2 print timer info bit 3 print locks info if ``CONFIG_LOCKDEP`` is on bit 4 print ftrace buffer -bit 5 replay all messages on consoles at the end of panic +bit 5 replay all kernel messages on consoles at the end of panic bit 6 print all CPUs backtrace (if available in the arch) bit 7 print only tasks in uninterruptible (blocked) state =3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --=20 2.39.5 (Apple Git-154) From nobody Fri Oct 3 20:56:10 2025 Received: from out30-97.freemail.mail.aliyun.com (out30-97.freemail.mail.aliyun.com [115.124.30.97]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1D48823A994 for ; Mon, 25 Aug 2025 02:57:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.97 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756090635; cv=none; b=JYxEXWLnRj7jSnXHVTmueVQzWjtuvYzPmTPRDkI1cbVhp6C2nmjMdEwi40Jr0BFkbByYxHNsn4sVlrLyjcYJnXAiIMUrbIhynT4kK6/t6NozmV2bGjX7e9h+vsm2iCKAdYgDWfuH9uPQvTwVs7/1DVCq9M4oYWpuosgLcFzMcvc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756090635; c=relaxed/simple; bh=XLv/LusOLW5sOpqiU7vxP4m9mYXRHcn/jRt2bvgYKHc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=u4ZWaqNNaDwRKiuymCHPchSgY05cQ7z6loEgRPTKAfDJcFiU46DM3maBMVsCcK0fnMxfhp3VBfbAcdIQ5R+DL7YQlJyK2oW1BSPU7c7AmdKaq3Zi/TU090TxwqpDb8CQm60Yeg29KhZ3NFAwwuPT5j4QW3rMaVjKeYd/hSqm4S8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com; spf=pass smtp.mailfrom=linux.alibaba.com; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b=OjW7fCoG; arc=none smtp.client-ip=115.124.30.97 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b="OjW7fCoG" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1756090625; h=From:To:Subject:Date:Message-Id:MIME-Version; bh=qbg4wU7MeI3SPqJLbIfhWaVkJGVKqRVkvI2mSAMCJQ8=; b=OjW7fCoGGODaPw5C72OOKb30HuyLPoOYIIddxPLHBbNmvTK6JgeZmdXmaeHbWwGpTHnrDzbRXt1/4+VayVCWXjbIRax5VR9LqQtGHpvkanRjuSipAJ4cs7Bbo17gtF/fHjiuEv0MO16/9n8uF/dTAVCWMGx21uKNNhcdxMV8YW4= Received: from localhost(mailfrom:feng.tang@linux.alibaba.com fp:SMTPD_---0WmPuXHH_1756090624 cluster:ay36) by smtp.aliyun-inc.com; Mon, 25 Aug 2025 10:57:05 +0800 From: Feng Tang To: Andrew Morton , Petr Mladek , Steven Rostedt , Lance Yang , Jonathan Corbet , linux-kernel@vger.kernel.org Cc: Askar Safin , paulmck@kernel.org, john.ogness@linutronix.de, Feng Tang Subject: [PATCH v2 3/4] panic: add note that 'panic_print' parameter is deprecated Date: Mon, 25 Aug 2025 10:57:00 +0800 Message-Id: <20250825025701.81921-4-feng.tang@linux.alibaba.com> X-Mailer: git-send-email 2.39.5 (Apple Git-154) In-Reply-To: <20250825025701.81921-1-feng.tang@linux.alibaba.com> References: <20250825025701.81921-1-feng.tang@linux.alibaba.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Just like for 'panic_print's systcl interface, add similar note for setup of kernel cmdline parameter and parameter under /sys/module/kernel/. Also add __core_param_cb() macro, which enables to add special get/set operation for a kernel parameter. Suggested-by: Petr Mladek Signed-off-by: Feng Tang Reviewed-by: Petr Mladek --- include/linux/moduleparam.h | 13 +++++++++++++ kernel/panic.c | 19 ++++++++++++++++++- 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h index 3a25122d83e2..6907aedc4f74 100644 --- a/include/linux/moduleparam.h +++ b/include/linux/moduleparam.h @@ -349,6 +349,19 @@ static inline void kernel_param_unlock(struct module *= mod) __module_param_call("", name, ¶m_ops_##type, &var, perm, \ -1, KERNEL_PARAM_FL_UNSAFE) =20 +/** + * __core_param_cb - similar like core_param, with a set/get ops instead o= f type. + * @name: the name of the cmdline and sysfs parameter (often the same as v= ar) + * @var: the variable + * @ops: the set & get operations for this parameter. + * @perm: visibility in sysfs + * + * Ideally this should be called 'core_param_cb', but the name has been + * used for module core parameter, so add the '__' prefix + */ +#define __core_param_cb(name, ops, arg, perm) \ + __module_param_call("", name, ops, arg, perm, -1, 0) + #endif /* !MODULE */ =20 /** diff --git a/kernel/panic.c b/kernel/panic.c index 72fcbb5a071b..12a10e17ab4a 100644 --- a/kernel/panic.c +++ b/kernel/panic.c @@ -937,12 +937,29 @@ EXPORT_SYMBOL(__stack_chk_fail); #endif =20 core_param(panic, panic_timeout, int, 0644); -core_param(panic_print, panic_print, ulong, 0644); core_param(pause_on_oops, pause_on_oops, int, 0644); core_param(panic_on_warn, panic_on_warn, int, 0644); core_param(crash_kexec_post_notifiers, crash_kexec_post_notifiers, bool, 0= 644); core_param(panic_console_replay, panic_console_replay, bool, 0644); =20 +static int panic_print_set(const char *val, const struct kernel_param *kp) +{ + pr_info_once("Kernel: 'panic_print' parameter will be obsoleted by both '= panic_sys_info' and 'panic_console_replay'\n"); + return param_set_ulong(val, kp); +} + +static int panic_print_get(char *val, const struct kernel_param *kp) +{ + pr_info_once("Kernel: 'panic_print' parameter will be obsoleted by both '= panic_sys_info' and 'panic_console_replay'\n"); + return param_get_ulong(val, kp); +} + +static const struct kernel_param_ops panic_print_ops =3D { + .set =3D panic_print_set, + .get =3D panic_print_get, +}; +__core_param_cb(panic_print, &panic_print_ops, &panic_print, 0644); + static int __init oops_setup(char *s) { if (!s) --=20 2.39.5 (Apple Git-154) From nobody Fri Oct 3 20:56:10 2025 Received: from out30-97.freemail.mail.aliyun.com (out30-97.freemail.mail.aliyun.com [115.124.30.97]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C937923D2B4 for ; Mon, 25 Aug 2025 02:57:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.97 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756090637; cv=none; b=MfKyNBjGWU6eN8b2shgnSXBtjIfX+pmbBPy+CWrR63IwOhaGI/V30V+XxE5kzPRHYg+5/mc0c7L+4pEeJhWUGGY8Pj63rXQ3gQw2eiWqeooT1SQORzkwzsDjihmWziIN7K8R1FFgvzy+9X4yiSdxkvmpfSwqtJfcBx4CTlYvpuc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756090637; c=relaxed/simple; bh=ASaRrsEZDmTiDHm3s3OqKEAQ9kFl7xznm8dXYNqoV0k=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=q8hlwpbPItWRWHC/54R4djcmqYGvbPCIPG6l7t+aftwByYQEEVGXvEIcfTeZjnesolJE2msMy1aEYHIVu5lz5EaC7fI9hvft2GUpEpNTfVKB01xV63zPR5dmuhjMiY4LPJc8eO03q2IPwe6SY3ywXVl0R56chGupoTShrCJn0TE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com; spf=pass smtp.mailfrom=linux.alibaba.com; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b=lHAaF1hH; arc=none smtp.client-ip=115.124.30.97 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b="lHAaF1hH" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1756090626; h=From:To:Subject:Date:Message-Id:MIME-Version; bh=c7gDWnFsSTjlPtD6qhOWDCIYup4GCna1Prrr83zPfO8=; b=lHAaF1hHjFvCQX9YayFBpx3b6N8fh3n4tH5N04MToSb0Yjt0oMZ0j8SJ97KojjO/x3u3uZTbnbZRl5Km+inw0GQ2Af4/Ia0gaCjb7kp2JGwJr9kvMqsfd1FeTko31zj3B8V89WvBILxjdAY8uV5sBO7KNFJGGHRaaEYqVqSA4dU= Received: from localhost(mailfrom:feng.tang@linux.alibaba.com fp:SMTPD_---0WmPseIX_1756090625 cluster:ay36) by smtp.aliyun-inc.com; Mon, 25 Aug 2025 10:57:05 +0800 From: Feng Tang To: Andrew Morton , Petr Mladek , Steven Rostedt , Lance Yang , Jonathan Corbet , linux-kernel@vger.kernel.org Cc: Askar Safin , paulmck@kernel.org, john.ogness@linutronix.de, Feng Tang Subject: [PATCH v2 4/4] panic: Clean up message about deprecated 'panic_print' parameter Date: Mon, 25 Aug 2025 10:57:01 +0800 Message-Id: <20250825025701.81921-5-feng.tang@linux.alibaba.com> X-Mailer: git-send-email 2.39.5 (Apple Git-154) In-Reply-To: <20250825025701.81921-1-feng.tang@linux.alibaba.com> References: <20250825025701.81921-1-feng.tang@linux.alibaba.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Petr Mladek Remove duplication of the message about deprecated 'panic_print' parameter. Also make the wording more direct. Make it clear that the new parameters already exist and should be used instead. Signed-off-by: Petr Mladek Reviewed-by: Lance Yang Tested-by: Lance Yang Reviewed-by: Feng Tang --- kernel/panic.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/kernel/panic.c b/kernel/panic.c index 12a10e17ab4a..24bca263f896 100644 --- a/kernel/panic.c +++ b/kernel/panic.c @@ -77,6 +77,11 @@ ATOMIC_NOTIFIER_HEAD(panic_notifier_list); =20 EXPORT_SYMBOL(panic_notifier_list); =20 +static void panic_print_deprecated(void) +{ + pr_info_once("Kernel: The 'panic_print' parameter is now deprecated. Plea= se use 'panic_sys_info' and 'panic_console_replay' instead.\n"); +} + #ifdef CONFIG_SYSCTL =20 /* @@ -125,7 +130,7 @@ static int proc_taint(const struct ctl_table *table, in= t write, static int sysctl_panic_print_handler(const struct ctl_table *table, int w= rite, void *buffer, size_t *lenp, loff_t *ppos) { - pr_info_once("Kernel: 'panic_print' sysctl interface will be obsoleted by= both 'panic_sys_info' and 'panic_console_replay'\n"); + panic_print_deprecated(); return proc_doulongvec_minmax(table, write, buffer, lenp, ppos); } =20 @@ -944,13 +949,13 @@ core_param(panic_console_replay, panic_console_replay= , bool, 0644); =20 static int panic_print_set(const char *val, const struct kernel_param *kp) { - pr_info_once("Kernel: 'panic_print' parameter will be obsoleted by both '= panic_sys_info' and 'panic_console_replay'\n"); + panic_print_deprecated(); return param_set_ulong(val, kp); } =20 static int panic_print_get(char *val, const struct kernel_param *kp) { - pr_info_once("Kernel: 'panic_print' parameter will be obsoleted by both '= panic_sys_info' and 'panic_console_replay'\n"); + panic_print_deprecated(); return param_get_ulong(val, kp); } =20 --=20 2.39.5 (Apple Git-154)