Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2800537ybl; Thu, 29 Aug 2019 13:07:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqzvNP19//xQqFbNsZW1lgfv/C1+S17cGbzmlfI0+ylFFlHyHMbY/TWPRBewgF6QDTxRyqcF X-Received: by 2002:a17:90a:22f0:: with SMTP id s103mr12335327pjc.56.1567109227235; Thu, 29 Aug 2019 13:07:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567109227; cv=none; d=google.com; s=arc-20160816; b=Y9DHfv93GGpQB2d2h7RpgzWyR2lDatUAevxdGe0oo3q8ni8zVNYYB9rG9FJZe8dedw 9iIak8OfRjR4yYU8otvNpeBZFIKrJ26Yb+CybRSp9wDNOujbVvRHm0b9hbs+vcFRkFjB WZGJHkcj9GY1d+dzHHyHU4FgUlliGyY/4rtMFF/Sgrpo2G6IF8ptGUcuR0ZrbN6RE/Qd xpBVbydn92c4oZB1I/2017970ctcXIIQh1RFYrK6WKK8IgV0vNH71DO+8FmK4bsDP4TP H1NG6PACWjh247m/rUqhNUGKf4xnag43jBF0CAqNBNeeiJ53cPv/Dqhs2Z2F5VzCdt/D q5eA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-filter; bh=X+99cu4+6/7ZPqtbsvqPNcU+FKn8qHm8gvuJwwChkG8=; b=PL/XY7S83yhW8yOqoTHJ/CwYFkWnMqN6TzDgSat9Uh2aMZYQ08ydsuX9kK3EnUfvnz 1fEu1z/Q2oU2zf+xTC8XVMwFw/0XTHrjeInwZemfIZgTEmnudpHrCFZ6Hx/NrN8cEjX6 wZC15AHuipC1DZDAuMW4492Q1AouVY6c1s0Clok7VpXoMO4zHde+Xa+kg6Y+TLq0v9Jb 6IEF1vRVoWR9gc8plE8Te0YN7sl//ZnG2kiGmyqPCOu/tC/pBt1ZUfO6dlG6c6OlwwPe L1FFVZ82LIMk5oh1iZA8G+S2PbHnq9fm945OBptJ6KTBiKN2aG38r7jLnN3WyHozYOtt BGaw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 66si3902385pff.223.2019.08.29.13.06.51; Thu, 29 Aug 2019 13:07:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728085AbfH2UFk (ORCPT + 99 others); Thu, 29 Aug 2019 16:05:40 -0400 Received: from linux.microsoft.com ([13.77.154.182]:54408 "EHLO linux.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726512AbfH2UFk (ORCPT ); Thu, 29 Aug 2019 16:05:40 -0400 Received: from prsriva-Precision-Tower-5810.corp.microsoft.com (unknown [167.220.2.18]) by linux.microsoft.com (Postfix) with ESMTPSA id 89C9920B7186; Thu, 29 Aug 2019 13:05:39 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 89C9920B7186 From: Prakhar Srivastava To: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-integrity@vger.kernel.org Cc: jmorris@namei.org, zohar@linux.ibm.com, bauerman@linux.ibm.com Subject: [RFC][PATCH v1 0/1] Carry ima measurement log for arm64 via kexec_file_load Date: Thu, 29 Aug 2019 13:05:31 -0700 Message-Id: <20190829200532.13545-1-prsriva@linux.microsoft.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The patch adds support for arm64 to carry ima measurement log to the next soft boot session triggered via kexec_file_load. - Top of Linux 5.3-rc6 Currently during kexec the kernel file signatures are validated prior to actual load, the information(PE/ima signature) is not carried to the next session. This lead to loss of information. This patch addresses the same by carrying forward the ima measurement log to the next kexec'ed session. This just allows a verifying party to get the entire runtime event log since the last full reboot since that is when PCRs were last reset. The code is in most part same as powerpc, i want to get feedback as to how/correct way to refactor the code so that cross architecture partial helpers can be put in a common place. Prakhar Srivastava (1): Carry ima measurement log for arm64 via kexec_file_load arch/arm64/Kconfig | 7 + arch/arm64/include/asm/ima.h | 31 ++++ arch/arm64/include/asm/kexec.h | 4 + arch/arm64/kernel/Makefile | 1 + arch/arm64/kernel/ima_kexec.c | 219 +++++++++++++++++++++++++ arch/arm64/kernel/machine_kexec_file.c | 39 +++++ 6 files changed, 301 insertions(+) create mode 100644 arch/arm64/include/asm/ima.h create mode 100644 arch/arm64/kernel/ima_kexec.c -- 2.17.1