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] [day] [month] [year] [list]
Date:	Mon, 20 Aug 2007 10:01:12 +0200
From:	Gerd Hoffmann <kraxel@...hat.com>
To:	Robin Getz <rgetz@...ckfin.uclinux.org>
CC:	Mike Frysinger <vapier.adi@...il.com>, linux-kernel@...r.kernel.org
Subject: Re: Early printk behaviour

Robin Getz wrote:

>> Hmm, yes, should be doable in generic code.  Check whenever the current
>> console has CON_BOOT set and if so unregister it.
> 
> Something like:
> 
> +++ kernel/printk.c     (working copy)
> +int __init disable_boot_consoles(void)
> +{
> +       struct console *con;
> +
> +       for (con = console_drivers; con; con = con->next) {
> +               if (con->flags & CON_BOOT) {
> +                       printk(KERN_INFO "Unregister BootConsole %s%d\n",
> +                               con->name, con->index);
> +                       unregister_console(con);
> +               }
> +       }
> +       return 0;
> +}
> +late_initcall(disable_boot_consoles);

Yep, that should work.  You can drop the loop though.  You can't
register a boot console if another console exists, and the first
non-boot console replaces the boot console, thus you never ever have
more than one console in case the boot console is still active.

The printk should be all lowercase like the other printk's in the file.

Other than that it loosk fine.

cheers,
  Gerd

-
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