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] [thread-next>] [day] [month] [year] [list]
Message-Id: <20260114184747.f08a7b4fcac9ace8a330fdde@linux-foundation.org>
Date: Wed, 14 Jan 2026 18:47:47 -0800
From: Andrew Morton <akpm@...ux-foundation.org>
To: Harry Austen <hpausten@...tonmail.com>
Cc: Huacai Chen <chenhuacai@...nel.org>, linux-kernel@...r.kernel.org,
 Lillian Berry <lillian@...r-ark.net>
Subject: Re: [PATCH] init/main.c: prevent warning on lack of default
 implicit rdinit

On Wed, 14 Jan 2026 22:02:27 +0000 Harry Austen <hpausten@...tonmail.com> wrote:

> If rdinit was not explicitly provided on cmdline, and default /init does
> not exist, no warning should be printed.
> 
> Fixes: 98aa4d5d242d ("init/main.c: add warning when file specified in rdinit is inaccessible")

Details, please?  What was wrong about the above commit?

> --- a/init/main.c
> +++ b/init/main.c
> @@ -162,6 +162,7 @@ static size_t initargs_offs;
>  
>  static char *execute_command;
>  static char *ramdisk_execute_command = "/init";
> +static bool __initdata ramdisk_execute_command_provided = false;
>  
>  /*
>   * Used to generate warnings if static_key manipulation functions are used
> @@ -623,6 +624,7 @@ static int __init rdinit_setup(char *str)
>  	unsigned int i;
>  
>  	ramdisk_execute_command = str;
> +	ramdisk_execute_command_provided = true;
>  	/* See "auto" comment in init_setup */
>  	for (i = 1; i < MAX_INIT_ARGS; i++)
>  		argv_init[i] = NULL;
> @@ -1699,8 +1701,9 @@ static noinline void __init kernel_init_freeable(void)
>  	int ramdisk_command_access;
>  	ramdisk_command_access = init_eaccess(ramdisk_execute_command);
>  	if (ramdisk_command_access != 0) {
> -		pr_warn("check access for rdinit=%s failed: %i, ignoring\n",
> -			ramdisk_execute_command, ramdisk_command_access);
> +		if (ramdisk_execute_command_provided || ramdisk_command_access != -ENOENT)
> +			pr_warn("check access for rdinit=%s failed: %i, ignoring\n",
> +				ramdisk_execute_command, ramdisk_command_access);

Replacing the !=0 check with !=ENOENT appears to be off-topic.  What's
happening here?


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ