From owner-svn-soc-all@FreeBSD.ORG Sat Jul 13 18:02:07 2013 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 70BF12A5 for ; Sat, 13 Jul 2013 18:02:07 +0000 (UTC) (envelope-from def@FreeBSD.org) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) by mx1.freebsd.org (Postfix) with ESMTP id 4A1211B25 for ; Sat, 13 Jul 2013 18:02:07 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6DI274Z003352 for ; Sat, 13 Jul 2013 18:02:07 GMT (envelope-from def@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.7/8.14.6/Submit) id r6DI2756003341 for svn-soc-all@FreeBSD.org; Sat, 13 Jul 2013 18:02:07 GMT (envelope-from def@FreeBSD.org) Date: Sat, 13 Jul 2013 18:02:07 GMT Message-Id: <201307131802.r6DI2756003341@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: r254761 - in soc2013/def/crashdump-head: sbin/savecore sys/sys 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.14 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: Sat, 13 Jul 2013 18:02:07 -0000 Author: def Date: Sat Jul 13 18:02:07 2013 New Revision: 254761 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=254761 Log: Fix savecore's Makefile. Change savecore to display sizes of a key and a tweak. Don't compile savecore with the key and the tweak. Modified: soc2013/def/crashdump-head/sbin/savecore/Makefile soc2013/def/crashdump-head/sbin/savecore/savecore.c soc2013/def/crashdump-head/sys/sys/kerneldump.h Modified: soc2013/def/crashdump-head/sbin/savecore/Makefile ============================================================================== --- soc2013/def/crashdump-head/sbin/savecore/Makefile Sat Jul 13 17:48:29 2013 (r254760) +++ soc2013/def/crashdump-head/sbin/savecore/Makefile Sat Jul 13 18:02:07 2013 (r254761) @@ -4,6 +4,5 @@ DPADD= ${LIBZ} LDADD= -lz MAN= savecore.8 -CFLAGS+=-I/home/def/soc13/vm/usr/include .include Modified: soc2013/def/crashdump-head/sbin/savecore/savecore.c ============================================================================== --- soc2013/def/crashdump-head/sbin/savecore/savecore.c Sat Jul 13 17:48:29 2013 (r254760) +++ soc2013/def/crashdump-head/sbin/savecore/savecore.c Sat Jul 13 18:02:07 2013 (r254761) @@ -121,7 +121,8 @@ fprintf(f, " Panic String: %s\n", h->panicstring); fprintf(f, " Dump Parity: %u\n", h->parity); fprintf(f, " Bounds: %d\n", bounds); - fprintf(f, " Key length: %d bits\n", h->keyLen); + fprintf(f, " Key length: %d bits\n", h->keysize << 3); + fprintf(f, " Tweak length: %d bits\n", h->tweaksize << 3); switch(status) { case STATUS_BAD: Modified: soc2013/def/crashdump-head/sys/sys/kerneldump.h ============================================================================== --- soc2013/def/crashdump-head/sys/sys/kerneldump.h Sat Jul 13 17:48:29 2013 (r254760) +++ soc2013/def/crashdump-head/sys/sys/kerneldump.h Sat Jul 13 18:02:07 2013 (r254761) @@ -91,17 +91,6 @@ }; /* - * Constant key for kernel crash dumps. - */ -static const char kerneldumpkey[32] = { - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41 -}; - -static char kerneldumptweak[KERNELDUMP_TWEAK_SIZE]; - -/* * Parity calculation is endian insensitive. */ static __inline u_int32_t @@ -118,6 +107,17 @@ } #ifdef _KERNEL +/* + * Constant key for kernel crash dumps. + */ +static const char kerneldumpkey[32] = { + 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, + 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, + 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41 +}; + +static char kerneldumptweak[KERNELDUMP_TWEAK_SIZE]; + void kerneldump_crypto_init(struct dumperinfo *di); void mkdumpheader(struct kerneldumpheader *kdh, char *magic, uint32_t archver,