From owner-soc-status@FreeBSD.ORG Tue Jun 25 05:18:48 2013 Return-Path: Delivered-To: soc-status@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 0C4E468B for ; Tue, 25 Jun 2013 05:18:48 +0000 (UTC) (envelope-from def@freebsd.org) Received: from mail1.uj.edu.pl (mail1.uj.edu.pl [149.156.89.193]) by mx1.freebsd.org (Postfix) with ESMTP id C5B5012DC for ; Tue, 25 Jun 2013 05:18:47 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII; format=flowed Received: from [10.0.0.33] ([90.184.203.55]) by mta.uoks.uj.edu.pl (Oracle Communications Messaging Server 7u4-27.01 (7.0.4.27.0) 64bit (built Aug 30 2012)) with ESMTPSA id <0MOX002UJNUQAS20@mta.uoks.uj.edu.pl> for soc-status@freebsd.org; Tue, 25 Jun 2013 07:13:39 +0200 (CEST) X-Antivirus: Dr.Web (R) for Unix mail servers drweb plugin ver.6.0.2.0 X-Antivirus-Code: 0x100000 Message-id: <51C92702.8090006@freebsd.org> Date: Tue, 25 Jun 2013 07:13:38 +0200 From: Konrad Witaszczyk Organization: FreeBSD User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130509 Thunderbird/17.0.6 To: soc-status@freebsd.org Subject: Report #1: Unattended encrypted kernel crash dumps X-BeenThere: soc-status@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Summer of Code Status Reports and Discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Jun 2013 05:18:48 -0000 During the last week I wanted to create a new format of kernel dump header and modify savecore to use it. This is the list of tasks that I finished: * Extend struct kerneldumpheader (sys/sys/kerneldump.h) to save data in crash dumps which are required to initialize keyInstance and cipherInstance for sys/crypto/rijndael. * Extend struct dumperinfo (sys/sys/conf.h) to encrypt data with sys/crypto/rijndael. * Try to read values from the new definition of struct kerneldumpheader in savecore. You can see examples in the repository (http://svnweb.freebsd.org/socsvn/soc2013/def/). Things worth remembering: * parity from struct kerneldumpheader should be the last element of the struct. Otherwise a dump device might stop saving a crash dump with parity and then savecore will think that the crash dump is correct. * If I change struct kerneldumpheader then I need to remember that it has to have TEXTDUMP_BLOCKSIZE-bytes (sys/ddb/ddb.h): sys/ddb/db_textdump.c 116 CTASSERT(sizeof(struct kerneldumpheader) == TEXTDUMP_BLOCKSIZE); 117 CTASSERT(sizeof(struct ustar_header) == TEXTDUMP_BLOCKSIZE); In order to follow this rule I had to change lengths of versionstring and panicstring. Is it the right way to do it or should I change somehow TEXTDUMP_BLOCKSIZE and struct ustar_header? This week I will try to import parts of pefs to encrypt data and modify struct kerneldumpheader to a proper format for pefs. My spring semester has just finished so there will be more time to work. More details about the project: https://wiki.freebsd.org/SummerOfCode2013/UnattendedEncryptedCrashDumps. Regards, Konrad Witaszczyk