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]
Date: Tue, 19 Dec 2023 12:21:51 -0800
From: Andrew Morton <akpm@...ux-foundation.org>
To: Yuntao Wang <ytcoode@...il.com>
Cc: bhe@...hat.com, bp@...en8.de, corbet@....net,
 dave.hansen@...ux.intel.com, ebiederm@...ssion.com, hpa@...or.com,
 kexec@...ts.infradead.org, linux-kernel@...r.kernel.org, mingo@...hat.com,
 tglx@...utronix.de, x86@...nel.org
Subject: Re: [PATCH] x86/kexec: use pr_err() instead of kexec_dprintk() when
 an error occurs

On Tue, 19 Dec 2023 15:29:01 +0800 Yuntao Wang <ytcoode@...il.com> wrote:

> When an error is detected, use pr_err() instead of kexec_dprintk() to
> output log message.
>
> In addition, remove the unnecessary return from set_page_address().

The above describes what the code does, which is already quite clear
from looking at the code.

Please write changelogs and code comments which describe *why* the code
does something, rather than *what* it does.

>
>
> --- a/arch/x86/kernel/kexec-bzimage64.c
> +++ b/arch/x86/kernel/kexec-bzimage64.c
> @@ -429,7 +429,7 @@ static void *bzImage64_load(struct kimage *image, char *kernel,
>  	 * command line. Make sure it does not overflow
>  	 */
>  	if (cmdline_len + MAX_ELFCOREHDR_STR_LEN > header->cmdline_size) {
> -		kexec_dprintk("Appending elfcorehdr=<addr> to command line exceeds maximum allowed length\n");
> +		pr_err("Appending elfcorehdr=<addr> to command line exceeds maximum allowed length\n");

ie, what are the reasons for this change?

>  		return ERR_PTR(-EINVAL);
>  	}
>  
> diff --git a/mm/highmem.c b/mm/highmem.c
> index e19269093a93..bd48ba445dd4 100644
> --- a/mm/highmem.c
> +++ b/mm/highmem.c
> @@ -799,8 +799,6 @@ void set_page_address(struct page *page, void *virtual)
>  		}
>  		spin_unlock_irqrestore(&pas->lock, flags);
>  	}
> -
> -	return;
>  }
>  
>  void __init page_address_init(void)
> -- 
> 2.43.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ