Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp826127ybc; Tue, 12 Nov 2019 09:45:57 -0800 (PST) X-Google-Smtp-Source: APXvYqwXHujDrmWwCsfaNLfJEaMTdd/gQm4T4wULztwAZ8xZaxFmVMU1SMV4PZW6v1E/jPnMGHYR X-Received: by 2002:a50:875e:: with SMTP id 30mr34847903edv.45.1573580757518; Tue, 12 Nov 2019 09:45:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573580757; cv=none; d=google.com; s=arc-20160816; b=SjU9p4ngEgWrFU0eodFprFs52nt4Er80E+2OhKAegjsDSF4Y31pXoyI+Dw+cNaJpj8 df0Zq/AJ1zRUdNbqWOoniubU+ecVKe++S/Srj4WqvwAYdBslbgORPown0AhpdK9zjkYf cybU7/odY5ppwLtWX3uDGxiO7b0a0DD6AV3EfJYLlXcLwioecVPB3dVQMezopdacQO/d U2FVyjlcuqswVOog09Ecv9kBY8JQFf/dEqvMAceqt2q+Vt+HRz84MyMhupSe9EMQlZ/H 6aBo2ehux9c5XlTnqpaiCh/d0a+FlBXHNtgb73zZOgVdqsuJWioSkbzA+8yNCHIKBUaZ lYjA== 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:to:subject:dkim-signature:dkim-filter; bh=gL4GwRpk0PWlTJzGrB0LKNSqKfDDLY5JhTDv2wWXNMA=; b=jP0FB143LJMwqQbJ/vesDd+0CKtLd6Tq8XFINa7bkmgUovhJajkWQytk9k1vzyjlmb pd2Yw0Xing8W9B2qk0xrDiL1F2s5KCGGJDzRvP9/lrHBrOK2rMJSB4zpLrLe+G3cxN1J IU8PObz79uZzmH8NGbrW14dSAIgwvskXKWZfaMPY4B+KSpZ98S/TNuivu51sQJr+gCts +kRzmAYt/vKdACAyu9ctURui3QXb2hD6OnE8wl8rahqtP+HQUI0vMZj9IvVb7yqGz8rv EJWaKysph0JpUMLyYVm0m2aO5SVhk7JBte7YvMc0xtchvQrupbzNYM6E/KR3oVXZ/nWY WrJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=AuhgNldH; 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=pass (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 j44si16118263eda.345.2019.11.12.09.45.33; Tue, 12 Nov 2019 09:45:57 -0800 (PST) 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; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=AuhgNldH; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727161AbfKLRnh (ORCPT + 99 others); Tue, 12 Nov 2019 12:43:37 -0500 Received: from linux.microsoft.com ([13.77.154.182]:58426 "EHLO linux.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726912AbfKLRnh (ORCPT ); Tue, 12 Nov 2019 12:43:37 -0500 Received: from [10.137.112.111] (unknown [131.107.147.111]) by linux.microsoft.com (Postfix) with ESMTPSA id 840AA20B7192; Tue, 12 Nov 2019 09:43:36 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 840AA20B7192 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1573580616; bh=gL4GwRpk0PWlTJzGrB0LKNSqKfDDLY5JhTDv2wWXNMA=; h=Subject:To:References:From:Date:In-Reply-To:From; b=AuhgNldHUcVqizdampYRLQUgbO6DPog4DHUBXWaX0gH+eRJQ99Qj4d49IqQ2RzHAi e1xFa4p0QttxJ6T8q6E04jo/vkXCVCLPSUpYMm2MnE0cNrGZHyvfZtpI2J0ofXStZJ CIftdHy5V2cIeqjLpdfRBEKky7AJoxxmt5qTc6oU= Subject: Re: [PATCH v5 02/10] IMA: Added keyrings= option in IMA policy to only measure keys added to the specified keyrings. To: Mimi Zohar , dhowells@redhat.com, matthewgarrett@google.com, sashal@kernel.org, jamorris@linux.microsoft.com, linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org, keyrings@vger.kernel.org, linux-kernel@vger.kernel.org References: <20191111193303.12781-1-nramas@linux.microsoft.com> <20191111193303.12781-3-nramas@linux.microsoft.com> <1573578305.17949.42.camel@linux.ibm.com> From: Lakshmi Ramasubramanian Message-ID: <1f940f9d-fb1b-a0a4-b5f4-3f3532dbc041@linux.microsoft.com> Date: Tue, 12 Nov 2019 09:43:57 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: <1573578305.17949.42.camel@linux.ibm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/12/2019 9:05 AM, Mimi Zohar wrote: > The C maximum line length is 80 characters.  The subject line is even > less than that (~50).  The Subject line here could be "ima: add > support to limit measuring keys". I'll update the subject line for the patches - limit to max 50 chars. > > On Mon, 2019-11-11 at 11:32 -0800, Lakshmi Ramasubramanian wrote: >> IMA policy needs to support measuring only those keys linked to >> a specific set of keyrings. > > Patch descriptions should be written in the imperative.  For example, > "Limit measuring keys to those keys being loaded onto a specific > keyring." Will update. > >> >> This patch defines a new IMA policy option namely "keyrings=" that >> can be used to specify a set of keyrings. If this option is specified >> in the policy for func=KEYRING_CHECK then only the keys linked to >> the keyrings given in "keyrings=" option are measured. > > This description does not seem to match the code, which for some > reason isn't included in this patch, nor in 3/10.  Please > combine/squash patches 2 & 3.  Missing from the combined patch is the > keyring matching code in ima_match_rules(). This patch defines "keyrings=" option in the IMA policy and adds the related field in ima_rule_entry struct. The code for updating the new field in ima_rule_entry is in patch #4 [PATCH v5 04/10] IMA: Updated IMA policy functions to return keyrings option read from the policy I'll update the description for this patch (#2). -lakshmi