Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp131325ybl; Thu, 12 Dec 2019 15:20:07 -0800 (PST) X-Google-Smtp-Source: APXvYqzNKAiDGwtOWTQvleoxk576zDEhF6WP7AGBM4P/RTTovPYI3crQSElqLa8cS8JZErBgdzuZ X-Received: by 2002:a9d:65cf:: with SMTP id z15mr11513026oth.238.1576192807395; Thu, 12 Dec 2019 15:20:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576192807; cv=none; d=google.com; s=arc-20160816; b=Hc/PjDcCJ/aHYfIa1GFrB451PCyZeNkWDeNQpUQAya0dOWvQOMwAAw1E/kjy/s0CAe Mtf2eB5X87hgOBGgaNkg8on+4UvX9lBSqQnAQHc501AF9lJ80TbDzyNHN7PdX8c/tl/k OyNFdVsbi/Q5HOxuGOcNmSqsx8ZeGO2Ev3g/eV++YhByS+H2wvjelgdTURroN9piZjDJ ihw3kKibO94M0I/MLXB8ES4VvKvC9dhMRglMSyQUKPBTwyU8+Wjbnwk7o9l+ak0DnUcM 7GG7DaTtp+CJ6tb0Fk+odCjC052TvqTuSP1DjbBulO16BZ/9RZvAC1ADbgveJF56D/jl f1RA== 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:dkim-signature:dkim-filter; bh=IaY9QfPYlGX8LBGy1XQmQtegmcwNOQejtgEwB7A4BKM=; b=Bb1fC7GJt2gwkzFuxZZ50abHEgJVPbjJwCwIRrcbf5Weuj9l9EpLRNAVCQ0JaoHssU xpQ7v3t9V/YfqUAblhBYyJ62B93HcPnEfr2FRpw9ujzeJv7ccTt/u52mSSgWGUpPkTfB ZXnvslfS8+kR7iOeeuzsYIFPMpKkVnGZous+xgXsEva7/G69lLkW/Og9vkRjbsO8mstj FvWPGVcyITX1ls0h7XEoCUgPxmHA0KMScxA7QUitdWTg4jOufwiCMqFnPnvFt7LtzyFo T4ctF9X427giopHalJZiJyERb+GRIZiZqv+exN81hiBbMN/YTmV17UKeL/R+SadcDz2F /BUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=ZK2aaBtq; 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 q12si4008322otm.261.2019.12.12.15.19.40; Thu, 12 Dec 2019 15:20:07 -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=ZK2aaBtq; 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 S1731267AbfLLW57 (ORCPT + 99 others); Thu, 12 Dec 2019 17:57:59 -0500 Received: from linux.microsoft.com ([13.77.154.182]:40726 "EHLO linux.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731131AbfLLW57 (ORCPT ); Thu, 12 Dec 2019 17:57:59 -0500 Received: from [10.137.112.111] (unknown [131.107.147.111]) by linux.microsoft.com (Postfix) with ESMTPSA id 7F3D020B7187; Thu, 12 Dec 2019 14:57:58 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 7F3D020B7187 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1576191478; bh=IaY9QfPYlGX8LBGy1XQmQtegmcwNOQejtgEwB7A4BKM=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=ZK2aaBtqm/DdZi7fhP+jIagujLRcrIzUhHkusgPASPWi+e45zhO4QcV4EsrQnGWgG cEVGInMrEE2PBMHOKGGNS/Hm6PfK2zTv6ao/pNu89hUpnw2783+PXhtB2SnSf+jXlV FsTlSGsPyE0ttPj7kLXTEPBqZyXR+usBEscHngN0= Subject: Re: [PATCH v2 1/2] IMA: Define workqueue for early boot "key" measurements To: Mimi Zohar , linux-integrity@vger.kernel.org Cc: eric.snowberg@oracle.com, dhowells@redhat.com, mathew.j.martineau@linux.intel.com, matthewgarrett@google.com, sashal@kernel.org, jamorris@linux.microsoft.com, linux-kernel@vger.kernel.org, keyrings@vger.kernel.org References: <20191211185116.2740-1-nramas@linux.microsoft.com> <20191211185116.2740-2-nramas@linux.microsoft.com> <1576138743.4579.147.camel@linux.ibm.com> <0cc15a43-8e1b-9819-33fe-8325068f8df2@linux.microsoft.com> <1576185189.4579.165.camel@linux.ibm.com> <1576191258.4579.181.camel@linux.ibm.com> From: Lakshmi Ramasubramanian Message-ID: Date: Thu, 12 Dec 2019 14:58:22 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.3.0 MIME-Version: 1.0 In-Reply-To: <1576191258.4579.181.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 12/12/2019 2:54 PM, Mimi Zohar wrote: >> >> I can also move the setting of ima_process_key flag inside the lock >> along with the above change. > > My concern is with the last sentence "Since ima_process_keys is set to > true above, any new key will be processed immediately and not queued." >   It's unlikely, but possible, that a second process will wait for the > ima_keys_mutex.  Either we remove this sentence or move setting > ima_process_keys to after taking the lock. > > Mimi Sure - i'll move the setting of ima_process_keys flag inside the lock and define the flag as static. Will keep the comment as is. thanks, -lakshmi