From owner-svn-soc-all@freebsd.org Mon Oct 26 21:00:44 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 17536A1EFF5 for ; Mon, 26 Oct 2015 21:00:44 +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 070DA1D01 for ; Mon, 26 Oct 2015 21:00:44 +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 t9QL0hmP020698 for ; Mon, 26 Oct 2015 21:00:43 GMT (envelope-from def@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.15.2/8.15.2/Submit) id t9QL0gLh018481 for svn-soc-all@FreeBSD.org; Mon, 26 Oct 2015 21:00:42 GMT (envelope-from def@FreeBSD.org) Date: Mon, 26 Oct 2015 21:00:42 GMT Message-Id: <201510262100.t9QL0gLh018481@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: r293099 - in soc2013/def/crashdump-head/sys: arm/arm i386/i386 mips/mips sparc64/sparc64 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: Mon, 26 Oct 2015 21:00:44 -0000 Author: def Date: Mon Oct 26 21:00:41 2015 New Revision: 293099 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=293099 Log: Adjust all architectures to the new kernel dump crypto interface. Modified: soc2013/def/crashdump-head/sys/arm/arm/minidump_machdep.c soc2013/def/crashdump-head/sys/i386/i386/minidump_machdep.c soc2013/def/crashdump-head/sys/mips/mips/minidump_machdep.c soc2013/def/crashdump-head/sys/sparc64/sparc64/dump_machdep.c Modified: soc2013/def/crashdump-head/sys/arm/arm/minidump_machdep.c ============================================================================== --- soc2013/def/crashdump-head/sys/arm/arm/minidump_machdep.c Mon Oct 26 20:40:29 2015 (r293098) +++ soc2013/def/crashdump-head/sys/arm/arm/minidump_machdep.c Mon Oct 26 21:00:41 2015 (r293099) @@ -296,14 +296,14 @@ /* Determine dump offset on device. */ if (di->mediasize < SIZEOF_METADATA + dumpsize + sizeof(kdh) * 2 + - kerneldumpkey_size(di->kdk)) { + kerneldumpcrypto_dumpkeysize(di->kdc)) { error = ENOSPC; goto fail; } dumplo = di->mediaoffset + di->mediasize - dumpsize; dumplo -= sizeof(kdh) * 2; - dumplo -= kerneldumpkey_size(di->kdk); + dumplo -= kerneldumpcrypto_dumpkeysize(di->kdc); progress = dumpsize; /* Initialize mdhdr */ @@ -316,7 +316,7 @@ mdhdr.kernbase = KERNBASE; mkdumpheader(&kdh, KERNELDUMPMAGIC, KERNELDUMP_ARM_VERSION, dumpsize, - kerneldumpkey_size(di->kdk), di->blocksize); + kerneldumpcrypto_dumpkeysize(di->kdc), di->blocksize); printf("Physical memory: %u MB\n", ptoa((uintmax_t)physmem) / 1048576); printf("Dumping %llu MB:", (long long)dumpsize >> 20); @@ -328,10 +328,10 @@ dumplo += sizeof(kdh); /* Dump key */ - error = dump_write_key(di, di->kdk, 0, dumplo); + error = dump_write_key(di, 0, dumplo); if (error) goto fail; - dumplo += kerneldumpkey_size(di->kdk); + dumplo += kerneldumpcrypto_dumpkeysize(di->kdc); /* Dump my header */ bzero(&fakept, sizeof(fakept)); Modified: soc2013/def/crashdump-head/sys/i386/i386/minidump_machdep.c ============================================================================== --- soc2013/def/crashdump-head/sys/i386/i386/minidump_machdep.c Mon Oct 26 20:40:29 2015 (r293098) +++ soc2013/def/crashdump-head/sys/i386/i386/minidump_machdep.c Mon Oct 26 21:00:41 2015 (r293099) @@ -250,13 +250,13 @@ /* Determine dump offset on device. */ if (di->mediasize < SIZEOF_METADATA + dumpsize + sizeof(kdh) * 2 + - kerneldumpkey_size(di->kdk)) { + kerneldumpcrypto_dumpkeysize(di->kdc)) { error = ENOSPC; goto fail; } dumplo = di->mediaoffset + di->mediasize - dumpsize; dumplo -= sizeof(kdh) * 2; - dumplo -= kerneldumpkey_size(di->kdk); + dumplo -= kerneldumpcrypto_dumpkeysize(di->kdc); progress = dumpsize; /* Initialize mdhdr */ @@ -272,7 +272,7 @@ #endif mkdumpheader(&kdh, KERNELDUMPMAGIC, KERNELDUMP_I386_VERSION, dumpsize, - kerneldumpkey_size(di->kdk), di->blocksize); + kerneldumpcrypto_dumpkeysize(di->kdc), di->blocksize); printf("Physical memory: %ju MB\n", ptoa((uintmax_t)physmem) / 1048576); printf("Dumping %llu MB:", (long long)dumpsize >> 20); @@ -284,10 +284,10 @@ dumplo += sizeof(kdh); /* Dump key */ - error = dump_write_key(di, di->kdk, 0, dumplo); + error = dump_write_key(di, 0, dumplo); if (error) goto fail; - dumplo += kerneldumpkey_size(di->kdk); + dumplo += kerneldumpcrypto_dumpkeysize(di->kdc); /* Dump my header */ bzero(&fakept, sizeof(fakept)); Modified: soc2013/def/crashdump-head/sys/mips/mips/minidump_machdep.c ============================================================================== --- soc2013/def/crashdump-head/sys/mips/mips/minidump_machdep.c Mon Oct 26 20:40:29 2015 (r293098) +++ soc2013/def/crashdump-head/sys/mips/mips/minidump_machdep.c Mon Oct 26 21:00:41 2015 (r293099) @@ -220,14 +220,15 @@ dumpsize += PAGE_SIZE; /* Determine dump offset on device. */ - if (di->mediasize < SIZEOF_METADATA + dumpsize + sizeof(kdh) * 2) { + if (di->mediasize < SIZEOF_METADATA + dumpsize + sizeof(kdh) * 2 + + kerneldumpcrypto_dumpkeysize(di->kdc)) { error = ENOSPC; goto fail; } origdumplo = dumplo = di->mediaoffset + di->mediasize - dumpsize; dumplo -= sizeof(kdh) * 2; - dumplo -= kerneldumpkey_size(di->kdk); + dumplo -= kerneldumpcrypto_dumpkeysize(di->kdc); progress = dumpsize; /* Initialize mdhdr */ @@ -240,7 +241,7 @@ mdhdr.kernbase = VM_MIN_KERNEL_ADDRESS; mkdumpheader(&kdh, KERNELDUMPMAGIC, KERNELDUMP_MIPS_VERSION, dumpsize, - kerneldumpkey_size(di->kdk), di->blocksize); + kerneldumpcrypto_dumpkeysize(di->kdc), di->blocksize); printf("Physical memory: %ju MB\n", (uintmax_t)ptoa((uintmax_t)physmem) / 1048576); @@ -253,10 +254,10 @@ dumplo += sizeof(kdh); /* Dump key */ - error = dump_write_key(di, di->kdk, 0, dumplo); + error = dump_write_key(di, 0, dumplo); if (error) goto fail; - dumplo += kerneldumpkey_size(di->kdk); + dumplo += kerneldumpcrypto_dumpkeysize(di->kdc); /* Dump my header */ bzero(tmpbuffer, sizeof(tmpbuffer)); Modified: soc2013/def/crashdump-head/sys/sparc64/sparc64/dump_machdep.c ============================================================================== --- soc2013/def/crashdump-head/sys/sparc64/sparc64/dump_machdep.c Mon Oct 26 20:40:29 2015 (r293098) +++ soc2013/def/crashdump-head/sys/sparc64/sparc64/dump_machdep.c Mon Oct 26 21:00:41 2015 (r293099) @@ -104,7 +104,8 @@ DEV_BSIZE); size += hdrsize; - totsize = size + 2 * sizeof(kdh) + kerneldumpkey_size(di->kdk); + totsize = size + 2 * sizeof(kdh) + + kerneldumpcrypto_dumpkeysize(di->kdc); if (totsize > di->mediasize) { printf("Insufficient space on device (need %ld, have %ld), " "refusing to dump.\n", (long)totsize, @@ -117,7 +118,7 @@ dumplo = di->mediaoffset + di->mediasize - totsize; mkdumpheader(&kdh, KERNELDUMPMAGIC, KERNELDUMP_SPARC64_VERSION, size, - kerneldumpkey_size(di->kdk), di->blocksize); + kerneldumpcrypto_dumpkeysize(di->kdc), di->blocksize); printf("Dumping %lu MB (%d chunks)\n", (u_long)(size >> 20), nreg); @@ -128,10 +129,10 @@ dumplo += sizeof(kdh); /* Dump key */ - error = dump_write_key(di, di->kdk, 0, dumplo); + error = dump_write_key(di, 0, dumplo); if (error) goto fail; - dumplo += kerneldumpkey_size(di->kdk); + dumplo += kerneldumpcrypto_dumpkeysize(di->kdc); /* Dump the private header. */ hdr.dh_hdr_size = hdrsize;