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]
Message-ID: <CAMuHMdVWoKqyX2Lnj7FbOyjY-PKtZ3WE+7dMyyTenrmjMSxbjQ@mail.gmail.com>
Date:	Sat, 23 Mar 2013 22:23:44 +0100
From:	Geert Uytterhoeven <geert@...ux-m68k.org>
To:	Paul Gortmaker <paul.gortmaker@...driver.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Mike Frysinger <vapier@...too.org>,
	Ingo Molnar <mingo@...nel.org>,
	Randy Dunlap <rdunlap@...radead.org>,
	linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
	Russell King <linux@....linux.org.uk>,
	Michal Simek <monstr@...str.eu>,
	Ralf Baechle <ralf@...ux-mips.org>,
	Benjamin Herrenschmidt <benh@...nel.crashing.org>,
	Paul Mundt <lethal@...ux-sh.org>,
	"David S. Miller" <davem@...emloft.net>,
	Chris Metcalf <cmetcalf@...era.com>,
	Richard Weinberger <richard@....at>
Subject: Re: [PATCH v3] early_printk: consolidate random copies of identical code

On Fri, Mar 8, 2013 at 5:11 PM, Paul Gortmaker
<paul.gortmaker@...driver.com> wrote:
> From: Thomas Gleixner <tglx@...utronix.de>
>
> The early console implementations are the same all over the place.  Move
> the print function to kernel/printk and get rid of the copies.
>
> Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
> Cc: Russell King <linux@....linux.org.uk>
> Acked-by: Mike Frysinger <vapier@...too.org>
> Cc: Michal Simek <monstr@...str.eu>
> Cc: Ralf Baechle <ralf@...ux-mips.org>
> Cc: Benjamin Herrenschmidt <benh@...nel.crashing.org>
> Cc: Paul Mundt <lethal@...ux-sh.org>
> Cc: "David S. Miller" <davem@...emloft.net>
> Cc: Chris Metcalf <cmetcalf@...era.com>
> Cc: Richard Weinberger <richard@....at>
> Reviewed-by: Ingo Molnar <mingo@...nel.org>
> Signed-off-by: Paul Gortmaker <paul.gortmaker@...driver.com>
> ---
>
> [v3: drop sparc bits as suggested by tglx, redo build tests on sparc
>  sparc32, Randy's randconfig, ppc, mips, arm...]
>
> [v2: essentially unchanged since v1, so I've left the acked/reviewed
>  tags.  There was a compile fail[1] for a randconfig with EARLY_PRINTK=y
>  and PRINTK=n, because the early_console struct and early_printk calls
>  were nested within an #ifdef CONFIG_PRINTK -- moving that whole block
>  exactly as-is to be outside the #ifdef CONFIG_PRINTK fixes the randconfig
>  and still works for everyday sane configs too.]
>  [1] http://marc.info/?l=linux-next&m=136219350914998&w=2

> --- a/arch/sh/kernel/sh_bios.c
> +++ b/arch/sh/kernel/sh_bios.c
> @@ -144,8 +144,6 @@ static struct console bios_console = {
>         .index          = -1,
>  };
>
> -static struct console *early_console;

This one wasn't protected by #ifdef CONFIG_EARLY_PRINTK...

> --- a/kernel/printk.c
> +++ b/kernel/printk.c
> @@ -1724,6 +1717,29 @@ static size_t cont_print_text(char *text, size_t size) { return 0; }
>
>  #endif /* CONFIG_PRINTK */
>
> +#ifdef CONFIG_EARLY_PRINTK
> +struct console *early_console;

... but this one is, causing

arch/sh/kernel/built-in.o: In function `setup_early_printk':
sh_bios.c:(.init.text+0xc80): undefined reference to `early_console'

Cfr. e.g. http://kisskb.ellerman.id.au/kisskb/buildresult/8433720/

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
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