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: <aSwQiCHQw-UDSpum@kernel.org>
Date: Sun, 30 Nov 2025 11:38:16 +0200
From: Mike Rapoport <rppt@...nel.org>
To: Sameeksha Sankpal <sameekshasankpal@...il.com>
Cc: akpm@...ux-foundation.org, tglx@...utronix.de, chenhuacai@...nel.org,
	mhiramat@...nel.org, mingo@...nel.org, francesco@...la.it,
	link@...o.com, brauner@...nel.org, lillian@...r-ark.net,
	guoweikang.kernel@...il.com, alexander.shishkin@...ux.intel.com,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] init: mark envp_init as static

On Sat, Nov 29, 2025 at 12:46:50AM +0530, Sameeksha Sankpal wrote:
> Sparse reports a warning that 'envp_init' has no prior
> declaration:
> 
>   warning: symbol 'envp_init' was not declared. Should it be static?
> 
> The variable is only used within init/main.c and does not
> need external linkage. Mark it as static to limit its scope
> and fix the sparse warning.

It's used in do_mounts_initrd::handle_initrd()

> 
> Signed-off-by: Sameeksha Sankpal <sameekshasankpal@...il.com>
> ---
>  init/main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/init/main.c b/init/main.c
> index 07a3116811c5..792ab00e62e6 100644
> --- a/init/main.c
> +++ b/init/main.c
> @@ -191,7 +191,7 @@ static int __init set_reset_devices(char *str)
>  __setup("reset_devices", set_reset_devices);
>  
>  static const char *argv_init[MAX_INIT_ARGS+2] = { "init", NULL, };
> -const char *envp_init[MAX_INIT_ENVS+2] = { "HOME=/", "TERM=linux", NULL, };
> +static const char *envp_init[MAX_INIT_ENVS+2] = { "HOME=/", "TERM=linux", NULL, };
>  static const char *panic_later, *panic_param;
>  
>  static bool __init obsolete_checksetup(char *line)
> -- 
> 2.43.0
> 

-- 
Sincerely yours,
Mike.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ