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=-5.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham 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 388FCC433E1 for ; Mon, 18 May 2020 20:34:37 +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 070EC20829 for ; Mon, 18 May 2020 20:34:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="sV9cLvfb"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b="LW4xKvNP" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 070EC20829 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-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=f2NnhyWQUBS0aLmvf6IFnJz8QJldHFkUc/qtUUrJ/aE=; b=sV9cLvfb8FP9Zqz0JVOJisOPo cuFkkW6xC9Egwpa/B6pn8htV8R4xVYs7wv5KJuaXGOw1gPBDtjrCSjfD0P0DSTj3zEGz97pLSweKI A3KBRSJ8J2u50C2Sc8fAKKKti38lW5Tugl3DYKCqwUL3VEac1ovoRCkhKR7wBCKh7x9bFE8ZzTdWb eCEn/BhUK2v1fbtKv6tegS/K582dIdpff79PwtnnASePX1mYKHmdg5p5aHyHj9OmEbsqk0uOBT5oi Rshfmboz+3+eqAmUAzeWB6zBvWUV96OdcjctRiPx6haCFhlfHWUxZCq7ZjmWZt4HFOVseJJUC/tw/ NjC0eGp2Q==; 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 1jamT5-00078V-50; Mon, 18 May 2020 20:34:35 +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 1jamT1-00077l-T4 for linux-arm-kernel@lists.infradead.org; Mon, 18 May 2020 20:34:33 +0000 Received: from [10.0.0.249] (c-24-19-135-168.hsd1.wa.comcast.net [24.19.135.168]) by linux.microsoft.com (Postfix) with ESMTPSA id 57B3620B717B; Mon, 18 May 2020 13:34:29 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 57B3620B717B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1589834070; bh=6GRSvZ+sGLVcKGDOcmVDyb0gXRdx/T0QTMk1YgrIXo0=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=LW4xKvNPjvTQHNTCPc5dw87VMVrDKT0UTsZNlxXJSb2DhjQsGt1aArwi+2Pq25xMN S4zSHJ+EQn4yAg/KghG/RYbBFjia5QNFJZWhHHgsJ+dbDFHzqYrmxyRfw7yrJDSiU3 PE4kQbDFbQkwN9xGgKO718cCWGbRNXaZolR1rV5E= Subject: Re: [RFC][PATCH 1/2] Add a layer of abstraction to use the memory reserved by device tree for ima buffer pass. To: Rob Herring References: <20200504203829.6330-1-prsriva@linux.microsoft.com> <20200504203829.6330-2-prsriva@linux.microsoft.com> <20200512230954.GB2654@bogus> From: Prakhar Srivastava Message-ID: <8b8bb74b-a3ac-1eb8-4b21-d00402a2bf62@linux.microsoft.com> Date: Mon, 18 May 2020 13:34:28 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <20200512230954.GB2654@bogus> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200518_133431_962814_316B54F8 X-CRM114-Status: GOOD ( 17.63 ) 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, gregkh@linuxfoundation.org, benh@kernel.crashing.org, bhsharma@redhat.com, tao.li@vivo.com, zohar@linux.ibm.com, paulus@samba.org, vincenzo.frascino@arm.com, will@kernel.org, nramas@linux.microsoft.com, frowand.list@gmail.com, masahiroy@kernel.org, jmorris@namei.org, takahiro.akashi@linaro.org, linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, serge@hallyn.com, devicetree@vger.kernel.org, pasha.tatashin@soleen.com, 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, linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org, james.morse@arm.com, mpe@ellerman.id.au, linux-integrity@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 5/12/20 4:09 PM, Rob Herring wrote: > On Mon, May 04, 2020 at 01:38:28PM -0700, Prakhar Srivastava wrote: >> Introduce a device tree layer for to read and store ima buffer >> from the reserved memory section of a device tree. > > But why do I need 'a layer of abstraction'? I don't like them. > This is a common path for the all architectures to carry over the IMA measurement logs. A single layer will avoid any code duplication. >> Signed-off-by: Prakhar Srivastava >> --- >> drivers/of/Kconfig | 6 ++ >> drivers/of/Makefile | 1 + >> drivers/of/of_ima.c | 165 ++++++++++++++++++++++++++++++++++++++++++++ > > Who are the users of this code and why does it need to be here? Most > code for specific bindings are not in drivers/of/ but with the user. It > doesn't sound like there's more than 1 user. > Currently the path is exercised by arm64 kexec_file_load path. A slight restructuring is needed on the powerpc side to use the same code path and other architectures can follow to add carrying over IMA logs over kexec with just a few function calls. I have attempted to bring the code path down to the highest common layer, however please do suggest if i can move this some where else. Thanks, Prakhar >> include/linux/of.h | 34 +++++++++ >> 4 files changed, 206 insertions(+) >> create mode 100644 drivers/of/of_ima.c _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel