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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aG3hjKg81xrDHjZc@U-2FWC9VHC-2323.local>
Date: Wed, 9 Jul 2025 11:27:08 +0800
From: Feng Tang <feng.tang@...ux.alibaba.com>
To: Sergey Senozhatsky <senozhatsky@...omium.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>, linux-kernel@...r.kernel.org,
	Nathan Chancellor <nathan@...nel.org>
Subject: Re: [PATCH 3/5] panic: add 'panic_sys_info' sysctl to take human
 readable string parameter

Hi Sergey,

On Wed, Jul 09, 2025 at 11:29:37AM +0900, Sergey Senozhatsky wrote:
> Hi,
> 
> [..]
> >+#ifdef CONFIG_SYSCTL
> > +
> > +static const char sys_info_avail[] = "tasks,mem,timers,locks,ftrace,all_bt,blocked_tasks";
> > +
> > +int sysctl_sys_info_handler(const struct ctl_table *ro_table, int write,
> > +                                         void *buffer, size_t *lenp,
> > +                                         loff_t *ppos)
> > +{
> > +       char names[sizeof(sys_info_avail) + 1];
> > +       struct ctl_table table;
> > +       unsigned long *si_bits_global;
> > +
> > +       si_bits_global = ro_table->data;
> [..]
> 
> Somehow this breaks the build with:
> 
> 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";
>       |                   ^~~~~~~~~~~~~~
> 
> Moving sys_info_avail[] inside sysctl_sys_info_handler() seems to help.

Sorry for the trouble. I assume this is clang?  I locally used gcc v10.2.1

Nathan Chancellor has helped to post a fix here https://lore.kernel.org/lkml/20250708-fix-clang-sys_info_avail-warning-v1-1-60d239eacd64@kernel.org/

Thanks,
Feng



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ