Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp96781ybi; Thu, 13 Jun 2019 12:16:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqxbpIE66c2z9y1Tsz7w2XyH5c8oljf+NapwbHJ8mDHczNIH3Nw+RZWijQOfTPdRJyLUghTw X-Received: by 2002:a17:90a:650c:: with SMTP id i12mr7222466pjj.44.1560453393678; Thu, 13 Jun 2019 12:16:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560453393; cv=none; d=google.com; s=arc-20160816; b=kVgByQEPptrZy9linySWJc/tYtCoZoCN9LKL2FYWI26HOABVZrD71NgflN7Vm6Mp8S gkyXswA6bniCbtH5YmLAjKq6Fsf6NCqXkjUGL6KoYgk19Cd0HPs9sbLiBVFa1uvQeRSM NAWaodLk1lqMROp+eM1KRoSkFi2fxmaFHSkWxOdTbYrAMqK7hhDgeXRHqq2o/AhRDb5p DQBwZwEKmjNwl3mm0yKHAESYB24uFslQjrlqGx4OacEdJwEyro6uBlNKN/XXsuI0vKEQ OVmIsIBYn01QF4Jv9v9G0UFT45OegrSekJgulDjllGDeEuBlqNCk8pwpp3v9vg6hGv04 d2vA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=nvUQaLXb3s/eZ4rUje2xlIfFVUdVh3c5QG/3TtJ99Es=; b=Z+ckDFTbG5s/vxLjRGRSDCyZA38GOuRmn4PVCYgV3gS9siKdIm7ilTvejBKR7CiC1d wJqgPdzp+uv1k3uIYuZxxoGmmVGCjQANiPP0MOp/CxcemvzzBX0yfO6X+g6Z+juuEdNU /kxItfLwfBPVAX30TxG5Sv3xXElcLycPtewc/tUja/Zf9X+1OIyzwFwNS1EnOXe0KDlC +E9hA0YPnafPcUycUt1luJ7IUiv1x/f8XO3j78ucpYjScWIP+BnOwLS78k0CYX2uaOIv n9Bh4R5tWJEQtIaaw4QYWT0DZL9s+J+QWsErX64e7nFkUx69cvWDD0FuZhsCAeKl5W4R zyzg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c1si312800pld.418.2019.06.13.12.16.18; Thu, 13 Jun 2019 12:16:33 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727963AbfFMTP4 (ORCPT + 99 others); Thu, 13 Jun 2019 15:15:56 -0400 Received: from namei.org ([65.99.196.166]:38994 "EHLO namei.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725842AbfFMTP4 (ORCPT ); Thu, 13 Jun 2019 15:15:56 -0400 Received: from localhost (localhost [127.0.0.1]) by namei.org (8.14.4/8.14.4) with ESMTP id x5DJFiQn022778; Thu, 13 Jun 2019 19:15:44 GMT Date: Fri, 14 Jun 2019 05:15:44 +1000 (AEST) From: James Morris To: Prakhar Srivastava cc: linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, zohar@linux.ibm.com, roberto.sassu@huawei.com, vgoyal@redhat.com Subject: Re: [PATCH V8 2/3] Define a new ima template field buf In-Reply-To: <20190612221549.28399-3-prsriva02@gmail.com> Message-ID: References: <20190612221549.28399-1-prsriva02@gmail.com> <20190612221549.28399-3-prsriva02@gmail.com> User-Agent: Alpine 2.21 (LRH 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 12 Jun 2019, Prakhar Srivastava wrote: > A buffer(kexec cmdline args) measured into ima cannot be > appraised without already being aware of the buffer contents. > Since hashes are non-reversible, raw buffer is needed for > validation or regenerating hash for appraisal/attestation. > > This patch adds support to ima to allow store/read the > buffer contents in HEX. > > - Add two new fields to ima_event_data to hold the buf and > buf_len [Suggested by Roberto] > - Add a new temaplte field 'buf' to be used to store/read > the buffer data.[Suggested by Mimi] > - Updated process_buffer_meaurement to add the buffer to > ima_event_data. process_buffer_measurement added in > "Define a new IMA hook to measure the boot command line > arguments" > - Add a new template policy name ima-buf to represent > 'd-ng|n-ng|buf' > > Signed-off-by: Prakhar Srivastava > Reviewed-by: Roberto Sassu Reviewed-by: James Morris -- James Morris