lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <aG-_K-wauw1MPF_g@smile.fi.intel.com>
Date: Thu, 10 Jul 2025 16:24:59 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Feng Tang <feng.tang@...ux.alibaba.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1 1/1] panic: Fix compilation error (`make W=1`)

On Thu, Jul 10, 2025 at 04:21:39PM +0300, Andy Shevchenko wrote:
> I don't understand why this mail was sent with LKML being dropped...
> 
> On Thu, Jul 10, 2025 at 06:41:29PM +0800, Feng Tang wrote:
> > On Thu, Jul 10, 2025 at 12:48:16PM +0300, Andy Shevchenko wrote:
> > > Compiler is not happy about the recently added code:
> > > 
> > > lib/sys_info.c:52:19: error: variable 'sys_info_avail' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration]
> > >    52 | static const char sys_info_avail[] = "tasks,mem,timers,locks,ftrace,all_bt,blocked_tasks";
> > >       |                   ^~~~~~~~~~~~~~
> > > 
> > > Fix it in the same way how, for example, lib/vsprintf.c does in the similar
> > > cases, i.e. by using string literal directly as sizeof() parameter.
> > > 
> > > Fixes: 9b5072c04c46 ("panic: add 'panic_sys_info' sysctl to take human readable string parameter")
> > > Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
> > 
> > Thanks for the fix! The issue has been reported, and the linux-mm tree already carried fix:
> > https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git/commit/?h=mm-nonmm-unstable&id=0a080b90dc6fe0a1e7df954a0d8c7e486e83b189
> > 
> > which doesn't hit linux-next tree yet.
> 
> With all the respect to Nathan's fix, I prefer mine for a couple of reasons:
> 1) __maybe_unused is a linker time workaorund;
> 2) we still have unneeded variable dangling;

Should be...

"With my patch:"

> 3) less code to maintain;

1) ...

> 4) vsprintf.c has many similar cases and there the approach is different.

2) ...

> Note, the fix is still in unstable branch, hence can be pulled out.
> 
> Andrew, Nathan, what's your opinion?

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ