From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out30-130.freemail.mail.aliyun.com (out30-130.freemail.mail.aliyun.com [115.124.30.130]) (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 58C0322FE11 for ; Wed, 7 Jan 2026 07:20:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.130 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767770458; cv=none; b=Gy7m3OiACoP1XDTibeyKTvKrKuDoznNqLNfJkwLHPXIzanWazTt8xSo5ZTen3lpkiirzAatKFmoEQRT/32dros1qgCVyZuuPGhEYqz693fWaLj4yMDE7bhz9xojJULZj0CyZXwPEujByy9nt8w6FgbzRUVjncXZt32jzUtptto0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767770458; c=relaxed/simple; bh=JoppqXgMd6UjXG/jCdrFwQslQybOc1e9XmF3DC0L7Po=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=UUBh+OwrekF+HjIcLZT6VMsZyBQQqGXSbt8veoZHXgGM7GuLkm8/zGE7+YIIrGBl3FICQ/SBxoeypK5HgFWTHmcYxFWWZ6eNeiOwgsjGSwC2PbWqb2HNiAZnMHCu4DX4ICUNyq3t8uvbkqcpMmw1RMglt81BzlarD4q2PPfgaaw= 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=yT3frC4T; arc=none smtp.client-ip=115.124.30.130 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="yT3frC4T" DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1767770446; h=Date:From:To:Subject:Message-ID:MIME-Version:Content-Type; bh=M/4Mljwy85YLmaEvCs26If3au/WqsB96+DnetV57Svg=; b=yT3frC4T7kzJVSkQ58KpBRsEocQHK+D6rLCFIV46j/R9dBc5v6bbKCjhqj2U4WVtgbQqPxZ8dot9llMj+DwhqvIESCpuq+3DILKulRvuU+HeXDR3wFSuODBd9jzbeXaN9+17ZZa9CTtBl2gOKkcSSaTb7T2oYSirEZprvyPnR2s= Received: from localhost(mailfrom:feng.tang@linux.alibaba.com fp:SMTPD_---0WwXvSbR_1767770445 cluster:ay36) by smtp.aliyun-inc.com; Wed, 07 Jan 2026 15:20:45 +0800 Date: Wed, 7 Jan 2026 15:20:44 +0800 From: Feng Tang To: Gal Pressman Cc: Andrew Morton , Petr Mladek , linux-kernel@vger.kernel.org, Mark Bloch , Nimrod Oren Subject: Re: [PATCH] panic: only warn about deprecated panic_print on write access Message-ID: References: <20260106163321.83586-1-gal@nvidia.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: On Wed, Jan 07, 2026 at 08:41:22AM +0200, Gal Pressman wrote: > On 07/01/2026 5:00, Feng Tang wrote: > >> @@ -1014,7 +1015,6 @@ static int panic_print_set(const char *val, const struct kernel_param *kp) > >> > >> static int panic_print_get(char *val, const struct kernel_param *kp) > >> { > >> - panic_print_deprecated(); > > > > Actually this was intentional, in one of the patch version, this > > panic_print_get() was not there but reusing the param_get_ulong(). > > > > It was added later as sometimes developer do want to runtime check > > the current 'panic_print' setting through /sys/module/kernel/parameters/ > > interface, and I thought it may be better to give the warning. > > I figured it would make sense to keep the behaviors consistent. When people run 'sysctl -a', in 99.9% cases, the users don't care 'panic_print' or even don't know what 'panic_print' is, that's why I think removing it makes sense. But for a user running 'cat /sys/module/kernel/parameters/panic_rint', giving a warning is meaningful. If you insist so, the cleaner way would be diff --git a/kernel/panic.c b/kernel/panic.c index 0d52210a9e2b..86b927a695a0 100644 --- a/kernel/panic.c +++ b/kernel/panic.c @@ -1012,15 +1012,9 @@ static int panic_print_set(const char *val, const struct kernel_param *kp) return param_set_ulong(val, kp); } -static int panic_print_get(char *val, const struct kernel_param *kp) -{ - panic_print_deprecated(); - return param_get_ulong(val, kp); -} - static const struct kernel_param_ops panic_print_ops = { .set = panic_print_set, - .get = panic_print_get, + .get = param_get_ulong, }; __core_param_cb(panic_print, &panic_print_ops, &panic_print, 0644);