From owner-svn-soc-all@FreeBSD.ORG Thu Jun 26 22:53:47 2014 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 143F163D for ; Thu, 26 Jun 2014 22:53:47 +0000 (UTC) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F1D6721E4 for ; Thu, 26 Jun 2014 22:53:46 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5QMrkoH052142 for ; Thu, 26 Jun 2014 22:53:46 GMT (envelope-from def@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.8/8.14.8/Submit) id s5QMrgKq052090 for svn-soc-all@FreeBSD.org; Thu, 26 Jun 2014 22:53:42 GMT (envelope-from def@FreeBSD.org) Date: Thu, 26 Jun 2014 22:53:42 GMT Message-Id: <201406262253.s5QMrgKq052090@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to def@FreeBSD.org using -f From: def@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r270106 - in soc2013/def/crashdump-head: sbin/savecore sys/amd64/amd64 sys/arm/arm sys/ddb sys/i386/i386 sys/ia64/ia64 sys/mips/mips sys/powerpc/powerpc sys/sparc64/sparc64 sys/sys s... MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Jun 2014 22:53:47 -0000 Author: def Date: Thu Jun 26 22:53:42 2014 New Revision: 270106 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=270106 Log: Double the size of kerneldumpheader in order to include ciphertext and keep the rest of fields unmodified. Modified: soc2013/def/crashdump-head/sbin/savecore/savecore.c soc2013/def/crashdump-head/sys/amd64/amd64/minidump_machdep.c soc2013/def/crashdump-head/sys/arm/arm/dump_machdep.c soc2013/def/crashdump-head/sys/arm/arm/minidump_machdep.c soc2013/def/crashdump-head/sys/ddb/db_textdump.c soc2013/def/crashdump-head/sys/i386/i386/minidump_machdep.c soc2013/def/crashdump-head/sys/ia64/ia64/dump_machdep.c soc2013/def/crashdump-head/sys/mips/mips/dump_machdep.c soc2013/def/crashdump-head/sys/mips/mips/minidump_machdep.c soc2013/def/crashdump-head/sys/powerpc/powerpc/dump_machdep.c soc2013/def/crashdump-head/sys/sparc64/sparc64/dump_machdep.c soc2013/def/crashdump-head/sys/sys/kerneldump.h soc2013/def/crashdump-head/sys/x86/x86/dump_machdep.c Modified: soc2013/def/crashdump-head/sbin/savecore/savecore.c ============================================================================== --- soc2013/def/crashdump-head/sbin/savecore/savecore.c Thu Jun 26 21:49:27 2014 (r270105) +++ soc2013/def/crashdump-head/sbin/savecore/savecore.c Thu Jun 26 22:53:42 2014 (r270106) @@ -484,7 +484,7 @@ printf("sectorsize = %u\n", sectorsize); } - lasthd = mediasize - sectorsize; + lasthd = mediasize - 2 * sectorsize; lseek(fd, lasthd, SEEK_SET); error = read(fd, &kdhl, sizeof kdhl); if (error != sizeof kdhl) { Modified: soc2013/def/crashdump-head/sys/amd64/amd64/minidump_machdep.c ============================================================================== --- soc2013/def/crashdump-head/sys/amd64/amd64/minidump_machdep.c Thu Jun 26 21:49:27 2014 (r270105) +++ soc2013/def/crashdump-head/sys/amd64/amd64/minidump_machdep.c Thu Jun 26 22:53:42 2014 (r270106) @@ -49,7 +49,7 @@ #include #include -CTASSERT(sizeof(struct kerneldumpheader) == 512); +CTASSERT(sizeof(struct kerneldumpheader) % 512 == 0); /* * Don't touch the first SIZEOF_METADATA bytes on the dump device. This Modified: soc2013/def/crashdump-head/sys/arm/arm/dump_machdep.c ============================================================================== --- soc2013/def/crashdump-head/sys/arm/arm/dump_machdep.c Thu Jun 26 21:49:27 2014 (r270105) +++ soc2013/def/crashdump-head/sys/arm/arm/dump_machdep.c Thu Jun 26 22:53:42 2014 (r270106) @@ -47,7 +47,7 @@ #include #include -CTASSERT(sizeof(struct kerneldumpheader) == 512); +CTASSERT(sizeof(struct kerneldumpheader) % 512 == 0); int do_minidump = 1; TUNABLE_INT("debug.minidump", &do_minidump); Modified: soc2013/def/crashdump-head/sys/arm/arm/minidump_machdep.c ============================================================================== --- soc2013/def/crashdump-head/sys/arm/arm/minidump_machdep.c Thu Jun 26 21:49:27 2014 (r270105) +++ soc2013/def/crashdump-head/sys/arm/arm/minidump_machdep.c Thu Jun 26 22:53:42 2014 (r270106) @@ -50,7 +50,7 @@ #include #include -CTASSERT(sizeof(struct kerneldumpheader) == 512); +CTASSERT(sizeof(struct kerneldumpheader) % 512 == 0); /* * Don't touch the first SIZEOF_METADATA bytes on the dump device. This Modified: soc2013/def/crashdump-head/sys/ddb/db_textdump.c ============================================================================== --- soc2013/def/crashdump-head/sys/ddb/db_textdump.c Thu Jun 26 21:49:27 2014 (r270105) +++ soc2013/def/crashdump-head/sys/ddb/db_textdump.c Thu Jun 26 22:53:42 2014 (r270106) @@ -113,7 +113,7 @@ * Various size assertions -- pretty much everything must be one block in * size. */ -CTASSERT(sizeof(struct kerneldumpheader) == TEXTDUMP_BLOCKSIZE); +CTASSERT(sizeof(struct kerneldumpheader) % TEXTDUMP_BLOCKSIZE == 0); CTASSERT(sizeof(struct ustar_header) == TEXTDUMP_BLOCKSIZE); /* Modified: soc2013/def/crashdump-head/sys/i386/i386/minidump_machdep.c ============================================================================== --- soc2013/def/crashdump-head/sys/i386/i386/minidump_machdep.c Thu Jun 26 21:49:27 2014 (r270105) +++ soc2013/def/crashdump-head/sys/i386/i386/minidump_machdep.c Thu Jun 26 22:53:42 2014 (r270106) @@ -45,7 +45,7 @@ #include #include -CTASSERT(sizeof(struct kerneldumpheader) == 512); +CTASSERT(sizeof(struct kerneldumpheader) % 512 == 0); /* * Don't touch the first SIZEOF_METADATA bytes on the dump device. This Modified: soc2013/def/crashdump-head/sys/ia64/ia64/dump_machdep.c ============================================================================== --- soc2013/def/crashdump-head/sys/ia64/ia64/dump_machdep.c Thu Jun 26 21:49:27 2014 (r270105) +++ soc2013/def/crashdump-head/sys/ia64/ia64/dump_machdep.c Thu Jun 26 22:53:42 2014 (r270106) @@ -45,7 +45,7 @@ #include #include -CTASSERT(sizeof(struct kerneldumpheader) == 512); +CTASSERT(sizeof(struct kerneldumpheader) % 512 == 0); /* * Don't touch the first SIZEOF_METADATA bytes on the dump device. This Modified: soc2013/def/crashdump-head/sys/mips/mips/dump_machdep.c ============================================================================== --- soc2013/def/crashdump-head/sys/mips/mips/dump_machdep.c Thu Jun 26 21:49:27 2014 (r270105) +++ soc2013/def/crashdump-head/sys/mips/mips/dump_machdep.c Thu Jun 26 22:53:42 2014 (r270106) @@ -47,7 +47,7 @@ #include #include -CTASSERT(sizeof(struct kerneldumpheader) == 512); +CTASSERT(sizeof(struct kerneldumpheader) % 512 == 0); int do_minidump = 1; TUNABLE_INT("debug.minidump", &do_minidump); Modified: soc2013/def/crashdump-head/sys/mips/mips/minidump_machdep.c ============================================================================== --- soc2013/def/crashdump-head/sys/mips/mips/minidump_machdep.c Thu Jun 26 21:49:27 2014 (r270105) +++ soc2013/def/crashdump-head/sys/mips/mips/minidump_machdep.c Thu Jun 26 22:53:42 2014 (r270106) @@ -47,7 +47,7 @@ #include #include -CTASSERT(sizeof(struct kerneldumpheader) == 512); +CTASSERT(sizeof(struct kerneldumpheader) % 512 == 0); /* * Don't touch the first SIZEOF_METADATA bytes on the dump device. This Modified: soc2013/def/crashdump-head/sys/powerpc/powerpc/dump_machdep.c ============================================================================== --- soc2013/def/crashdump-head/sys/powerpc/powerpc/dump_machdep.c Thu Jun 26 21:49:27 2014 (r270105) +++ soc2013/def/crashdump-head/sys/powerpc/powerpc/dump_machdep.c Thu Jun 26 22:53:42 2014 (r270106) @@ -44,7 +44,7 @@ #include #include -CTASSERT(sizeof(struct kerneldumpheader) == 512); +CTASSERT(sizeof(struct kerneldumpheader) % 512 == 0); /* * Don't touch the first SIZEOF_METADATA bytes on the dump device. This Modified: soc2013/def/crashdump-head/sys/sparc64/sparc64/dump_machdep.c ============================================================================== --- soc2013/def/crashdump-head/sys/sparc64/sparc64/dump_machdep.c Thu Jun 26 21:49:27 2014 (r270105) +++ soc2013/def/crashdump-head/sys/sparc64/sparc64/dump_machdep.c Thu Jun 26 22:53:42 2014 (r270106) @@ -45,7 +45,7 @@ #include #include -CTASSERT(sizeof(struct kerneldumpheader) == DEV_BSIZE); +CTASSERT(sizeof(struct kerneldumpheader) % DEV_BSIZE == 0); static struct kerneldumpheader kdh; static off_t dumplo, dumppos; Modified: soc2013/def/crashdump-head/sys/sys/kerneldump.h ============================================================================== --- soc2013/def/crashdump-head/sys/sys/kerneldump.h Thu Jun 26 21:49:27 2014 (r270105) +++ soc2013/def/crashdump-head/sys/sys/kerneldump.h Thu Jun 26 22:53:42 2014 (r270106) @@ -78,14 +78,14 @@ #define KERNELDUMP_TEXT_VERSION 1 #define KERNELDUMP_KEY_SIZE 32 #define KERNELDUMP_IV_SIZE 16 -#define KERNELDUMP_CIPHERTEXT_SIZE 256 +#define KERNELDUMP_CIPHERTEXT_SIZE 512 #define KERNELDUMP_BUFFER_SIZE 512 uint64_t dumplength; /* excl headers */ uint64_t dumptime; uint32_t blocksize; char hostname[64]; - char versionstring[64]; - char panicstring[64]; + char versionstring[192]; + char panicstring[192]; char ciphertext[KERNELDUMP_CIPHERTEXT_SIZE]; uint32_t parity; }; Modified: soc2013/def/crashdump-head/sys/x86/x86/dump_machdep.c ============================================================================== --- soc2013/def/crashdump-head/sys/x86/x86/dump_machdep.c Thu Jun 26 21:49:27 2014 (r270105) +++ soc2013/def/crashdump-head/sys/x86/x86/dump_machdep.c Thu Jun 26 22:53:42 2014 (r270106) @@ -50,7 +50,7 @@ #define EM_VALUE EM_386 #endif -CTASSERT(sizeof(struct kerneldumpheader) == 512); +CTASSERT(sizeof(struct kerneldumpheader) % 512 == 0); int do_minidump = 1; TUNABLE_INT("debug.minidump", &do_minidump);