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:	Thu, 12 Jun 2008 15:54:45 -0700
From:	Mike Travis <travis@....com>
To:	"H. Peter Anvin" <hpa@...or.com>
CC:	Ingo Molnar <mingo@...e.hu>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/1] x86: Add config option to setup early serial console

H. Peter Anvin wrote:
> Mike Travis wrote:
>>  * Add config option EARLY_SERIAL_CONSOLE to enable early
>>    printk's to be directed to the serial console.
>>
>> Based on linux-next
>>
>> Signed-off-by: Mike Travis <travis@....com>
> 
> Is there any reason this can't be done dynamically, via a command-line
> option instead?
> 
> We can get to the command line extremely early if need be.
> 
>     -hpa

We could.  My current debugging is in x86_64_start_kernel() almost at
the start of the function (before the "Kernel alive" message).  The
code is below.  (cut and pasted so no tabs)

One benefit of a startup option instead of a config option  is we rely
on the standard distribution for the kernel and unless they set this
option it won't do us much good.

(Maybe the failed attempts was trying to tell me something? ;-)

Thanks,
Mike

        /* Cleanup the over mapped high alias */
        cleanup_highmap();

... my debugging is here ...

        for (i = 0; i < NUM_EXCEPTION_VECTORS; i++) {
#ifdef CONFIG_EARLY_PRINTK
                set_intr_gate(i, &early_idt_handlers[i]);
#else
                set_intr_gate(i, early_idt_handler);
#endif
        }
        load_idt((const struct desc_ptr *)&idt_descr);

        early_printk("Kernel alive\n");

        for (i = 0; i < NR_CPUS; i++)
                cpu_pda(i) = &boot_cpu_pda[i];

        pda_init(0);
        copy_bootdata(__va(real_mode_data));

... startup params available here ...

        reserve_early(__pa_symbol(&_text), __pa_symbol(&_end), "TEXT DATA BSS");

#ifdef CONFIG_BLK_DEV_INITRD
        /* Reserve INITRD */
        if (boot_params.hdr.type_of_loader && boot_params.hdr.ramdisk_image) {
                unsigned long ramdisk_image = boot_params.hdr.ramdisk_image;
                unsigned long ramdisk_size  = boot_params.hdr.ramdisk_size;
                unsigned long ramdisk_end   = ramdisk_image + ramdisk_size;
                reserve_early(ramdisk_image, ramdisk_end, "RAMDISK");
        }
#endif





--
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