Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp617313ybi; Fri, 24 May 2019 08:44:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqzkX568aRX7oZeLWIipPxoUYf9qulCJbpe9mV4cIJ9vWyW19jXqYu+Y3Nj938yBGaR1GYs9 X-Received: by 2002:a63:2b92:: with SMTP id r140mr19095787pgr.363.1558712654280; Fri, 24 May 2019 08:44:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558712654; cv=none; d=google.com; s=arc-20160816; b=mrqPN+EVZmbztYI13xuTe/8y/CVwWYU77c3BPodl2Ih1OLebaVT+ghpqFJdPz7W0PV fTLLqECxYKt9zYk0ZXmU23T3JtIh0b+Anl33+dXKILZG8fAgk52yvZOBSkLrf4dXB8hT ddhOxL1OiI2cjvIy4lv0EejAU1RPZXU/2awgugc8r/VNLUrsLnzLGKALUXDjUGseZK2z X4B9uYbciS60nyo9XK7HrNxwxm21UEA9HSvo9WhFeg2GagJ6hrEYc9DLDUgGQ4LU9JoK 21doi53jggRkaEt/2AqgA7FRZ16XB5Jr7c3mT3tI+kPlsoNM7e6w4vgIfH70PjYOvZ0g ZLKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=v0pglYTsK4bpb+HkG0yt5v0dF++2GirOZh7+/BXAHGU=; b=T42h3YcesM3mcfnwEkDr6DDHaBlcaF1wUX/94F7ELz5SQy09m0gBi4w3ICDNcbf2GP I8FBrEFBYoTmt4Z5viaNshSU2FeNuV6p3j8V/+MWJHya3geVhZG+uMuvHemW2Yc9vEOa QdmsHyStI9OoeV2DpfFmKY8x3ezpOam7SLns8QjO1tU0aTH/mhgzWowhCehY/53CaWG9 jinbmQLoBT1XHSKimovkiZNH0ko/chJbge0jtHyI0wICVyE2D8LgoKitDP/HPstYYXNe ru0W6KN5JNEFGrx1i3W4t55YwUqhg9JOEAWgmUdEerbXuDaLhrhF/iiH3TyicGKh0qd2 9rGQ== 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 c83si4906483pfc.246.2019.05.24.08.43.58; Fri, 24 May 2019 08:44:14 -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 S2390202AbfEXPmm (ORCPT + 99 others); Fri, 24 May 2019 11:42:42 -0400 Received: from lhrrgout.huawei.com ([185.176.76.210]:32968 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2389206AbfEXPml (ORCPT ); Fri, 24 May 2019 11:42:41 -0400 Received: from LHREML711-CAH.china.huawei.com (unknown [172.18.7.108]) by Forcepoint Email with ESMTP id 90E31FB144421F93551E; Fri, 24 May 2019 16:42:40 +0100 (IST) Received: from [10.204.65.201] (10.204.65.201) by smtpsuk.huawei.com (10.201.108.34) with Microsoft SMTP Server (TLS) id 14.3.408.0; Fri, 24 May 2019 16:42:39 +0100 Subject: Re: To: Mimi Zohar , Prakhar Srivastava , , , CC: , References: <20190521000645.16227-1-prsriva02@gmail.com> <20190521000645.16227-3-prsriva02@gmail.com> <1558710722.3977.68.camel@linux.ibm.com> From: Roberto Sassu Message-ID: Date: Fri, 24 May 2019 17:42:46 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0 MIME-Version: 1.0 In-Reply-To: <1558710722.3977.68.camel@linux.ibm.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Originating-IP: [10.204.65.201] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/24/2019 5:12 PM, Mimi Zohar wrote: > On Mon, 2019-05-20 at 17:06 -0700, Prakhar Srivastava wrote: >> A buffer(cmdline args) measured into ima cannot be appraised >> without already being aware of the buffer contents.Since we >> don't know what cmdline args will be passed (or need to validate >> what was passed) it is not possible to appraise it. >> >> Since hashs are non reversible the raw buffer is needed to >> recompute the hash. >> To regenrate the hash of the buffer and appraise the same >> the contents of the buffer need to be available. >> >> A new template field buf is added to the existing ima template >> fields, which can be used to store/read the buffer itself. >> Two new fields are added to the ima_event_data to carry the >> buf and buf_len whenever necessary. >> >> Updated the process_buffer_measurement call to add the buf >> to the ima_event_data. >> process_buffer_measurement added in "Add a new ima hook >> ima_kexec_cmdline to measure cmdline args" >> >> - Add a new template field 'buf' to be used to store/read >> the buffer data. >> - Added two new fields to ima_event_data to hold the buf and >> buf_len [Suggested by Roberto] >> -Updated process_buffer_meaurement to add the buffer to >> ima_event_data > > This patch description can be written more concisely. > > Patch 1/3 in this series introduces measuring the kexec boot command > line.  This patch defines a new template field for storing the kexec > boot command line in the measurement list in order for a remote > attestation server to verify. > > As mentioned, the first patch description should include a shell > command for verifying the digest in the kexec boot command line > measurement list record against /proc/cmdline.  This patch description > should include a shell command showing how to verify the digest based > on the new field.  Should the new field in the ascii measurement list > be displayed as a string, not hex? We should define a new type. If the type is DATA_FMT_STRING, spaces are replaced with '_'. Roberto -- HUAWEI TECHNOLOGIES Duesseldorf GmbH, HRB 56063 Managing Director: Bo PENG, Jian LI, Yanli SHI