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:	Tue,  7 Jul 2015 13:20:07 -0700
From:	Yinghai Lu <yinghai@...nel.org>
To:	Kees Cook <keescook@...omium.org>,
	"H. Peter Anvin" <hpa@...or.com>, Baoquan He <bhe@...hat.com>
Cc:	linux-kernel@...r.kernel.org, Yinghai Lu <yinghai@...nel.org>
Subject: [PATCH 21/42] x86, boot: Add more debug printout in compressed/misc.c

with support that use printf.c in x86 setup code.
print out more info for debug info.

Signed-off-by: Yinghai Lu <yinghai@...nel.org>
---
 arch/x86/boot/compressed/misc.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/arch/x86/boot/compressed/misc.c b/arch/x86/boot/compressed/misc.c
index ee73b7b..a428c03 100644
--- a/arch/x86/boot/compressed/misc.c
+++ b/arch/x86/boot/compressed/misc.c
@@ -344,7 +344,7 @@ static void parse_elf(void *output)
 		return;
 	}
 
-	debug_putstr("Parsing ELF... ");
+	debug_putstr("Parsing ELF...\n");
 
 	phdrs = malloc(sizeof(*phdrs) * ehdr.e_phnum);
 	if (!phdrs)
@@ -369,6 +369,11 @@ static void parse_elf(void *output)
 			 * Here dest is smaller than src always.
 			 */
 			memcpy(dest, output + phdr->p_offset, phdr->p_filesz);
+			debug_printf("   parse_elf: [0x%010lx-0x%010lx] <=== [0x%010lx-0x%010lx]\n",
+				(unsigned long)dest,
+				(unsigned long)dest + phdr->p_filesz - 1,
+				(unsigned long)output + phdr->p_offset,
+				(unsigned long)output + phdr->p_offset + phdr->p_filesz - 1);
 			break;
 		default: /* Ignore other PT_* */ break;
 		}
@@ -475,6 +480,11 @@ asmlinkage __visible void *decompress_kernel(void *rmode, memptr heap,
 		error("Wrong destination address");
 #endif
 
+	debug_printf("  decompress: [0x%010lx-0x%010lx] <=== [0x%010lx-0x%010lx]\n",
+		(unsigned long)output,
+		(unsigned long)output + output_len - 1,
+		(unsigned long)input_data,
+		(unsigned long)input_data + input_len - 1);
 	debug_putstr("\nDecompressing Linux... ");
 	decompress(input_data, input_len, NULL, NULL, output, NULL, error);
 	parse_elf(output);
-- 
1.8.4.5

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