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: <20150407110931.GC14136@gmail.com>
Date:	Tue, 7 Apr 2015 13:09:31 +0200
From:	Ingo Molnar <mingo@...nel.org>
To:	Alexander Kuleshov <kuleshovmail@...il.com>
Cc:	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>,
	"H. Peter Anvin" <hpa@...or.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2 v2] x86_64/earlyprintk: setup earlyprintk as early as
 possible


* Alexander Kuleshov <kuleshovmail@...il.com> wrote:

> As setup_early_printk passed to the early_param, it will be usable only after
> 'parse_early_param' function will be called from the 'setup_arch'. So we have
> earlyprintk during early boot and decompression. Next point after decompression
> of the kernel where we can use early_printk is after call of the
> 'parse_early_param'.
> 
> This patch removes 'earlyprintk' from the early_param and setup it right after
> boot data copying. So 'early_printk' function will be usabable after
> decompression of the kernel and before parse_early_param will be called.
> 
> Tested it with qemu, so early_printk() is usable and prints to serial console
> right after setup_early_printk function called from arch/x86/kerne/head64.c
> 
> Changes v1->v2:
> 
> * Comment added before the setup_early_printk call;
> * Added information about testing to the commit message.
> 
> Signed-off-by: Alexander Kuleshov <kuleshovmail@...il.com>
> ---
>  arch/x86/kernel/early_printk.c | 4 +---
>  arch/x86/kernel/head64.c       | 3 +++
>  include/linux/printk.h         | 1 +
>  3 files changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/x86/kernel/early_printk.c b/arch/x86/kernel/early_printk.c
> index a62536a..4b0577b 100644
> --- a/arch/x86/kernel/early_printk.c
> +++ b/arch/x86/kernel/early_printk.c
> @@ -329,7 +329,7 @@ static inline void early_console_register(struct console *con, int keep_early)
>  	register_console(early_console);
>  }
>  
> -static int __init setup_early_printk(char *buf)
> +int __init setup_early_printk(char *buf)
>  {
>  	int keep;
>  
> @@ -390,5 +390,3 @@ static int __init setup_early_printk(char *buf)
>  	}
>  	return 0;
>  }
> -
> -early_param("earlyprintk", setup_early_printk);
> diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c
> index c4f8d46..4034ea6 100644
> --- a/arch/x86/kernel/head64.c
> +++ b/arch/x86/kernel/head64.c
> @@ -172,6 +172,9 @@ asmlinkage __visible void __init x86_64_start_kernel(char * real_mode_data)
>  
>  	copy_bootdata(__va(real_mode_data));
>  
> +	/* setup earlyprintk as early as possible */
> +	setup_early_printk(boot_command_line);
> +

So does this work with CONFIG_CMDLINE_BOOL + CONFIG_CMDLINE_OVERRIDE?

Thanks,

	Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ