socsvn commit: r254758 - soc2013/def/crashdump-head/sys/sys
def at FreeBSD.org
def at FreeBSD.org
Sat Jul 13 17:42:52 UTC 2013
Author: def
Date: Sat Jul 13 17:42:51 2013
New Revision: 254758
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=254758
Log:
Change the kernel dump header format to store a key, a tweak and their sizes. Define a constant AES key for encryption.
Modified:
soc2013/def/crashdump-head/sys/sys/kerneldump.h
Modified: soc2013/def/crashdump-head/sys/sys/kerneldump.h
==============================================================================
--- soc2013/def/crashdump-head/sys/sys/kerneldump.h Sat Jul 13 17:38:58 2013 (r254757)
+++ soc2013/def/crashdump-head/sys/sys/kerneldump.h Sat Jul 13 17:42:51 2013 (r254758)
@@ -75,22 +75,33 @@
#define KERNELDUMP_POWERPC_VERSION 1
#define KERNELDUMP_SPARC64_VERSION 1
#define KERNELDUMP_TEXT_VERSION 1
-#define KERNELDUMP_MAX_KEY_SIZE 256
-#define KERNELDUMP_MAX_IV_SIZE 128
+#define KERNELDUMP_KEY_SIZE 32
+#define KERNELDUMP_TWEAK_SIZE 8
uint64_t dumplength; /* excl headers */
uint64_t dumptime;
uint32_t blocksize;
char hostname[64];
- char versionstring[164];
- char panicstring[164];
- int keyLen;
- char keyMaterial[KERNELDUMP_MAX_KEY_SIZE >> 3];
- u_int8_t mode;
- u_int8_t IV[KERNELDUMP_MAX_IV_SIZE >> 3];
+ char versionstring[168];
+ char panicstring[168];
+ int keysize;
+ char key[KERNELDUMP_KEY_SIZE];
+ int tweaksize;
+ char tweak[KERNELDUMP_TWEAK_SIZE];
uint32_t parity;
};
/*
+ * 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
More information about the svn-soc-all
mailing list