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>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <44x5syvqsqy4bfjdc5r5hfwhppz74vxa3p74diwmnlls26yox2@xccmzuov2afw>
Date: Wed, 17 Dec 2025 13:09:08 +0100
From: Joel Granados <joel.granados@...nel.org>
To: Petr Mladek <pmladek@...e.com>
Cc: Alexander Viro <viro@...iv.linux.org.uk>, 
	Christian Brauner <brauner@...nel.org>, Jan Kara <jack@...e.cz>, Muchun Song <muchun.song@...ux.dev>, 
	Oscar Salvador <osalvador@...e.de>, David Hildenbrand <david@...nel.org>, 
	Steven Rostedt <rostedt@...dmis.org>, John Ogness <john.ogness@...utronix.de>, 
	Sergey Senozhatsky <senozhatsky@...omium.org>, "David S. Miller" <davem@...emloft.net>, 
	Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, 
	Paolo Abeni <pabeni@...hat.com>, Simon Horman <horms@...nel.org>, linux-fsdevel@...r.kernel.org, 
	linux-kernel@...r.kernel.org, linux-mm@...ck.org, linux-hams@...r.kernel.org, 
	netdev@...r.kernel.org
Subject: Re: [PATCH] sysctl: Remove unused ctl_table forward declarations

On Tue, Dec 16, 2025 at 01:44:17PM +0100, Petr Mladek wrote:
> On Mon 2025-12-15 16:25:19, Joel Granados wrote:
> > Remove superfluous forward declarations of ctl_table from header files
> > where they are no longer needed. These declarations were left behind
> > after sysctl code refactoring and cleanup.
> > 
> > Signed-off-by: Joel Granados <joel.granados@...nel.org>
> 
> For the printk part:
> 
> Reviewed-by: Petr Mladek <pmladek@...e.com>
> 
> That said, I have found one more declaration in kernel/printk/internal.h.
> It is there because of devkmsg_sysctl_set_loglvl() declaration.
> But I think that a better solution would be:
> 
> diff --git a/kernel/printk/internal.h b/kernel/printk/internal.h
> index dff97321741a..27169fd33231 100644
> --- a/kernel/printk/internal.h
> +++ b/kernel/printk/internal.h
> @@ -4,9 +4,9 @@
>   */
>  #include <linux/console.h>
>  #include <linux/types.h>
> +#include <linux/sysctl.h>
>  
>  #if defined(CONFIG_PRINTK) && defined(CONFIG_SYSCTL)
> -struct ctl_table;
>  void __init printk_sysctl_init(void);
>  int devkmsg_sysctl_set_loglvl(const struct ctl_table *table, int write,
>  			      void *buffer, size_t *lenp, loff_t *ppos);
> diff --git a/kernel/printk/sysctl.c b/kernel/printk/sysctl.c
> index bb8fecb3fb05..512f0c692d6a 100644
> --- a/kernel/printk/sysctl.c
> +++ b/kernel/printk/sysctl.c
> @@ -3,7 +3,6 @@
>   * sysctl.c: General linux system control interface
>   */
>  
> -#include <linux/sysctl.h>
>  #include <linux/printk.h>
>  #include <linux/capability.h>
>  #include <linux/ratelimit.h>
> 
> Feel free to add this into v2. Or we could do this in a separate patch.
> 
> Best Regards,
> Petr

Very nice, thx. 

I believe it fits inside the current commit (no need to make two).
I'll add this and send a V2. You can then add co-developed-by &
Signed-off-by if you want.

Best

-- 

Joel Granados

Download attachment "signature.asc" of type "application/pgp-signature" (660 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ