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:	Wed, 10 Jun 2015 16:36:21 +0600
From:	Alexander Kuleshov <kuleshovmail@...il.com>
To:	Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc:	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>,
	"H. Peter Anvin" <hpa@...or.com>,
	LKML <linux-kernel@...r.kernel.org>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Borislav Petkov <bp@...e.de>,
	Mark Rustad <mark.d.rustad@...el.com>,
	Yinghai Lu <yinghai@...nel.org>
Subject: Re: [PATCH v11 4/5] x86/earlyprintk: setup earlyprintk as early as possible

2015-06-10 15:44 GMT+06:00 Andy Shevchenko <andriy.shevchenko@...ux.intel.com>:
> You do parsing twice (still original code and your piece here), and
> honestly I don't like your approach in this form.

I just researched earlyprintk and we can use not only serial, but
vga and pciserial. What if I'll rename setup_early_serial_console
to the setup_earlyprintk_console, will add variable, something like
this

static unsigned int early = 1;

to the arch/x86/kernel/earlyprintk.c and refactor the
setup_early_serial_console as:

int __init setup_earlyprintk_console(void)
{
    char *arg;

    arg = strstr(boot_command_line, "earlyprintk=");
    if (!arg)
        return -1;

    early = 0;
    return setup_early_printk(arg);
}

After this we can check in the setup_earlyprintk
is it early to set other consoles or not,

while (*buf != '\0') {
    ....

    #ifdef CONFIG_EARLY_PRINTK_EFI
            if (!strncmp(buf, "efi", 3) && early)
                early_console_register(&early_efi_console, keep);
    #endif
    ....
}
early = 1;

So, when we will call setup_earlyprintk_console from the
arch/x86/kernel/head{32,64}.c, early variable will be 0 and
it allows us to setup only  'real early' consoles and when
setup_earlyprintk will be called by the do_early_param
early variable will be one and we will be able to setup
efi console and etc....

What do you think about it?
--
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