From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6D35CC433DF for ; Sun, 7 Jun 2020 23:33:52 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 38AE3206C3 for ; Sun, 7 Jun 2020 23:33:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="BWJzpTjt"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b="jf58nVlw" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 38AE3206C3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.microsoft.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=QlvmDPPbNzte+H3VrK+qhEIvhreXy+rtsQZjlLDQJnY=; b=BWJzpTjtUTmFxb WDjwBCpgTWzzus+L5q11FBNDjqoJn48/QzKybgB+PO+k6BiiH13SPv5nbi/MSe9dXoxl+helUAU+T etj2mfAQ2n7APo7WpmgtMidX91akd1B3LcZXtUBDP+pIyoxqAF3+1Q+RMOaLuxPceFsoFKknUfKgI ws+A/8rROrw95AnUuDvYclDlGTbedSFYqqakp03PpxsdLgrruB3mj2yrvGIwe4cF9LbGNqQErg/5J VBFr5ybC+5I3PKE8V7dVsDu5bLPg5owxPhlxj3GsSFN5hP6J19nG2+7X6+mGpWBxuRNlmUyVBGtFV DfxtL/Ks8eLNtgU7VyJw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ji4nI-0003at-I2; Sun, 07 Jun 2020 23:33:36 +0000 Received: from linux.microsoft.com ([13.77.154.182]) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ji4nG-0003a6-7J for linux-arm-kernel@lists.infradead.org; Sun, 07 Jun 2020 23:33:35 +0000 Received: from prsriva-linux.hsd1.wa.comcast.net (c-24-19-135-168.hsd1.wa.comcast.net [24.19.135.168]) by linux.microsoft.com (Postfix) with ESMTPSA id C1D9520B717B; Sun, 7 Jun 2020 16:33:31 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com C1D9520B717B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1591572812; bh=DB6Cl6RHr8cekVcsDZkbuYBtSszswuXLUSqvQUhO2ps=; h=From:To:Cc:Subject:Date:From; b=jf58nVlwSpSms4FyBpvdpS5L/b68k74OADgHL6/JRsKRN65DEQGu08m5Y9vgZjXz7 UMgDudDCE1Jx4rfifAEkUog31G9m/W1iUpE4SjPKR7or5h81nOg9rOO66POwl4ho6b Q+6FdMlHCNX3RzSGQ7tuKYlzVzkT1RmxfjrADR0Y= From: Prakhar Srivastava To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, devicetree@vger.kernel.org, linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org Subject: [v1 PATCH 0/2] Adding support to carry IMA measurement logs Date: Sun, 7 Jun 2020 16:33:21 -0700 Message-Id: <20200607233323.22375-1-prsriva@linux.microsoft.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200607_163334_334386_4A0B2B44 X-CRM114-Status: GOOD ( 10.17 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kstewart@linuxfoundation.org, mark.rutland@arm.com, catalin.marinas@arm.com, bhsharma@redhat.com, tao.li@vivo.com, zohar@linux.ibm.com, paulus@samba.org, vincenzo.frascino@arm.com, frowand.list@gmail.com, nramas@linux.microsoft.com, mpe@ellerman.id.au, masahiroy@kernel.org, jmorris@namei.org, takahiro.akashi@linaro.org, benh@kernel.crashing.org, serge@hallyn.com, pasha.tatashin@soleen.com, will@kernel.org, prsriva@linux.microsoft.com, robh+dt@kernel.org, hsinyi@chromium.org, tusharsu@linux.microsoft.com, tglx@linutronix.de, allison@lohutok.net, christophe.leroy@c-s.fr, mbrugger@suse.com, balajib@linux.microsoft.com, dmitry.kasatkin@gmail.com, james.morse@arm.com, gregkh@linuxfoundation.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org IMA during kexec(kexec file load) verifies the kernel signature and measures the signature of the kernel. The signature in the logs can be used to verfiy the authenticity of the kernel. The logs don not get carried over kexec and thus remote attesation cannot verify the signature of the running kernel. Add a new chosen node entry linux,ima-kexec-buffer to hold the address and the size of the memory reserved to carry the IMA measurement log. Tested on: arm64 with Uboot Changelog: v1: Refactoring carrying over IMA measuremnet logs over Kexec. This patch moves the non-architecture specific code out of powerpc and adds to security/ima.(Suggested by Thiago) Add Documentation regarding the ima-kexec-buffer node in the chosen node documentation v0: Add a layer of abstraction to use the memory reserved by device tree for ima buffer pass. Add support for ima buffer pass using reserved memory for arm64 kexec. Update the arch sepcific code path in kexec file load to store the ima buffer in the reserved memory. The same reserved memory is read on kexec or cold boot. Documentation/devicetree/bindings/chosen.txt | 17 +++ arch/arm64/Kconfig | 1 + arch/arm64/include/asm/ima.h | 24 +++ arch/arm64/include/asm/kexec.h | 3 + arch/arm64/kernel/machine_kexec_file.c | 47 +++++- arch/powerpc/include/asm/ima.h | 9 -- arch/powerpc/kexec/ima.c | 117 +------------- security/integrity/ima/ima_kexec.c | 151 +++++++++++++++++++ 8 files changed, 236 insertions(+), 133 deletions(-) create mode 100644 arch/arm64/include/asm/ima.h -- 2.25.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel