Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757401AbbGGXN6 (ORCPT ); Tue, 7 Jul 2015 19:13:58 -0400 Received: from mail-ig0-f177.google.com ([209.85.213.177]:37924 "EHLO mail-ig0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752614AbbGGXNt (ORCPT ); Tue, 7 Jul 2015 19:13:49 -0400 MIME-Version: 1.0 In-Reply-To: <1436300428-21163-26-git-send-email-yinghai@kernel.org> References: <1436300428-21163-1-git-send-email-yinghai@kernel.org> <1436300428-21163-26-git-send-email-yinghai@kernel.org> Date: Tue, 7 Jul 2015 16:13:48 -0700 X-Google-Sender-Auth: TrfGC0WnGQCubXSnZ0lmyMp0VtY Message-ID: Subject: Re: [PATCH 25/42] x86, boot: print compression suffix in decompress stage From: Kees Cook To: Yinghai Lu Cc: "H. Peter Anvin" , Baoquan He , LKML Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2389 Lines: 79 On Tue, Jul 7, 2015 at 1:20 PM, Yinghai Lu wrote: > Signed-off-by: Yinghai Lu > --- > arch/x86/boot/compressed/misc.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/arch/x86/boot/compressed/misc.c b/arch/x86/boot/compressed/misc.c > index a428c03..9266f78 100644 > --- a/arch/x86/boot/compressed/misc.c > +++ b/arch/x86/boot/compressed/misc.c > @@ -120,26 +120,32 @@ static int lines, cols; > > #ifdef CONFIG_KERNEL_GZIP > #include "../../../../lib/decompress_inflate.c" > +static char *suffix_str = "gz"; > #endif > > #ifdef CONFIG_KERNEL_BZIP2 > #include "../../../../lib/decompress_bunzip2.c" > +static char *suffix_str = "bz2"; > #endif > > #ifdef CONFIG_KERNEL_LZMA > #include "../../../../lib/decompress_unlzma.c" > +static char *suffix_str = "lzma"; > #endif > > #ifdef CONFIG_KERNEL_XZ > #include "../../../../lib/decompress_unxz.c" > +static char *suffix_str = "xz"; > #endif > > #ifdef CONFIG_KERNEL_LZO > #include "../../../../lib/decompress_unlzo.c" > +static char *suffix_str = "lzo"; > #endif > > #ifdef CONFIG_KERNEL_LZ4 > #include "../../../../lib/decompress_unlz4.c" > +static char *suffix_str = "lz4"; > #endif I like the idea! > > static void scroll(void) > @@ -486,6 +492,8 @@ asmlinkage __visible void *decompress_kernel(void *rmode, memptr heap, > (unsigned long)input_data, > (unsigned long)input_data + input_len - 1); > debug_putstr("\nDecompressing Linux... "); > + debug_putstr(suffix_str); > + debug_putstr("... "); I wouldn't repeat the "...". Maybe remove "..." from the Decompressing putstr? -Kees > decompress(input_data, input_len, NULL, NULL, output, NULL, error); > parse_elf(output); > handle_relocations(output, output_len, virt_offset); > -- > 1.8.4.5 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ -- Kees Cook Chrome OS Security -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/