Date: Mon, 26 Oct 2015 21:00:42 GMT 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 Message-ID: <201510262100.t9QL0gLh018481@socsvn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201510262100.t9QL0gLh018481>