From owner-svn-soc-all@freebsd.org Sat Nov 28 13:24:30 2015 Return-Path: Delivered-To: svn-soc-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6A946A3BA96 for ; Sat, 28 Nov 2015 13:24:30 +0000 (UTC) (envelope-from def@FreeBSD.org) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5B2511962 for ; Sat, 28 Nov 2015 13:24:30 +0000 (UTC) (envelope-from def@FreeBSD.org) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.15.2/8.15.2) with ESMTP id tASDOUBg081151 for ; Sat, 28 Nov 2015 13:24:30 GMT (envelope-from def@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.15.2/8.15.2/Submit) id tASDOTkv081149 for svn-soc-all@FreeBSD.org; Sat, 28 Nov 2015 13:24:29 GMT (envelope-from def@FreeBSD.org) Date: Sat, 28 Nov 2015 13:24:29 GMT Message-Id: <201511281324.tASDOTkv081149@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: r294505 - soc2013/def/crashdump-head/sys/kern 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.20 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, 28 Nov 2015 13:24:30 -0000 Author: def Date: Sat Nov 28 13:24:29 2015 New Revision: 294505 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=294505 Log: Reset offset when a crash dump was written. Modified: soc2013/def/crashdump-head/sys/kern/kern_shutdown.c Modified: soc2013/def/crashdump-head/sys/kern/kern_shutdown.c ============================================================================== --- soc2013/def/crashdump-head/sys/kern/kern_shutdown.c Sat Nov 28 12:12:28 2015 (r294504) +++ soc2013/def/crashdump-head/sys/kern/kern_shutdown.c Sat Nov 28 13:24:29 2015 (r294505) @@ -73,6 +73,7 @@ #include #include +#include #include @@ -874,7 +875,6 @@ kdc->kdc_encryptedkeysize = encryptedkeysize; bcopy(encryptedkey, kdc->kdc_encryptedkey, kdc->kdc_encryptedkeysize); - kdc->kdc_nextoffset = 0; kdc->kdc_dumpkeysize = (sizeof(kdc->kdc_algorithm) + sizeof(kdc->kdc_iv) + sizeof(kdc->kdc_encryptedkeysize) + kdc->kdc_encryptedkeysize + KERNELDUMP_BLOCK_SIZE - 1) / @@ -885,6 +885,13 @@ free(kdc, M_EKCD); return (NULL); } + +static void +kerneldumpcrypto_init(struct kerneldumpcrypto *kdc) +{ + + kdc->kdc_nextoffset = 0; +} #endif /* EKCD */ uint32_t @@ -926,6 +933,7 @@ encryptedkey); if (dumper.kdc == NULL) return (EINVAL); + kerneldumpcrypto_init(dumper.kdc); } #endif @@ -974,8 +982,10 @@ /* Signal completion. */ if (virtual == NULL && physical == 0 && offset == 0 && length == 0) { - return (di->dumper(di->priv, virtual, physical, offset, - length)); + error = di->dumper(di->priv, virtual, physical, offset, + length); + kerneldumpcrypto_init(kdc); + return (error); } /* Data have to be aligned to block size. */ From owner-svn-soc-all@freebsd.org Sat Nov 28 13:53:32 2015 Return-Path: Delivered-To: svn-soc-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F3D2EA3B031 for ; Sat, 28 Nov 2015 13:53:31 +0000 (UTC) (envelope-from def@FreeBSD.org) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DF8901364 for ; Sat, 28 Nov 2015 13:53:31 +0000 (UTC) (envelope-from def@FreeBSD.org) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.15.2/8.15.2) with ESMTP id tASDrVnH036320 for ; Sat, 28 Nov 2015 13:53:31 GMT (envelope-from def@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.15.2/8.15.2/Submit) id tASDrVdK036318 for svn-soc-all@FreeBSD.org; Sat, 28 Nov 2015 13:53:31 GMT (envelope-from def@FreeBSD.org) Date: Sat, 28 Nov 2015 13:53:31 GMT Message-Id: <201511281353.tASDrVdK036318@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: r294506 - soc2013/def/crashdump-head/sys/kern 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.20 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, 28 Nov 2015 13:53:32 -0000 Author: def Date: Sat Nov 28 13:53:30 2015 New Revision: 294506 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=294506 Log: Don't include unused header file. Modified: soc2013/def/crashdump-head/sys/kern/kern_shutdown.c Modified: soc2013/def/crashdump-head/sys/kern/kern_shutdown.c ============================================================================== --- soc2013/def/crashdump-head/sys/kern/kern_shutdown.c Sat Nov 28 13:24:29 2015 (r294505) +++ soc2013/def/crashdump-head/sys/kern/kern_shutdown.c Sat Nov 28 13:53:30 2015 (r294506) @@ -73,7 +73,6 @@ #include #include -#include #include