Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1764351ybt; Mon, 15 Jun 2020 08:50:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyQuakRp6uGhLTitI4nSWhrKMDnOwuXdocYgmPCjvhmRPaP7gc2nfZ5nLMT+M1bTeMAXM3F X-Received: by 2002:a50:98c1:: with SMTP id j59mr25166596edb.120.1592236221104; Mon, 15 Jun 2020 08:50:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592236221; cv=none; d=google.com; s=arc-20160816; b=owKGvPii3lcQfyE2tZ45L40U88jK46MeSSZBFBG49qeaj0OYv0Whh6mr+TptuG7HaJ jN/6FbeoF4BXAGI4SRP7FDTxABKwmYDL3dBbXkrUINKY1ultTB8LKdday+yfQ8qi+J++ dJYFgXIM8Z3TaS7j0ushTb1ZzLkAQlRqwe3rCZluQ9oUNGNy6EBQF1aHkYa8Sf5UUrC2 kOLgS/mGJgJJd5aPB69TllShMD4tbl3+QkD5z99vUGTBEm7q6TfwY6gIL0DTHcHCOjVT 5/a5daUEGlKvLZqXgJFVL8kUy6guUE4BoWopqt6yjR628V593VHbOYvZXs9bB8Gg/vrj ZtcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=4ylGNwumtH93sk6ap1x6lmEE198yuK1dm1zAaklJl8g=; b=z5UkI1x1876AZyf2GDNOOFNxdg9UlwiwXiIFwneJ83Hr0bdUIGjQ7nJP84a1171W6j U1zG2JIbRBUnIm802IOol8aajnCoedRHK4PnIy971gsHtU0ciags1nNE0dPAJx3Qen0W Je7DnAwbbiQXnbT2Tx8RXuRhi2eS4Lx1w1m+F7VF6picw5QVW0nfFNs6Gc+YAhi0LXeb spAB4cvKGuOClw/KwVQJWxmPylSX5YpoyZqxu7CWdIJ+UBguOx2VJdrE/U0XzRLl9mO5 wQboAkcarWeR4TWPFFTlLgl+nkTQwKcX9FD2gv82veyGBwL8ReIeBmMDZWFNxNEqgJ7T WSng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=jVghkgRp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o4si9013989eje.269.2020.06.15.08.49.58; Mon, 15 Jun 2020 08:50:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=jVghkgRp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730489AbgFOPru (ORCPT + 99 others); Mon, 15 Jun 2020 11:47:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50182 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730356AbgFOPru (ORCPT ); Mon, 15 Jun 2020 11:47:50 -0400 Received: from mail-oi1-x241.google.com (mail-oi1-x241.google.com [IPv6:2607:f8b0:4864:20::241]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2D50CC061A0E; Mon, 15 Jun 2020 08:47:49 -0700 (PDT) Received: by mail-oi1-x241.google.com with SMTP id 25so16258067oiy.13; Mon, 15 Jun 2020 08:47:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=4ylGNwumtH93sk6ap1x6lmEE198yuK1dm1zAaklJl8g=; b=jVghkgRp7hdCYHS8KXn7SZaSC/jlmZ79a/kvSQjohVUBd9++iecOfILVZYG0ToEFhu EHKv+4HyTiQfFmvXrvDEoEchH7dnwJSoCcKE7lH1e8orud1FKo1m4DlEoDCZqAh3BvSf 1SC7+Lg0nynjxJ1hj8JopzoDLH9WFpug1Sll65n/zbAgAepcub06FI8fNHwmhBRPw2Id bokYp6rDR/caWB1NUJxZR5zxopPtL2WRW4sA7ddlGVllErbkB+57mxQeog/hlDTZtlS6 IZVOsZj42fpwZTDhXQ9D8fM1CYQA9z4LhHPwiULVnkd8Nal7ovcPTe+9qxtiTZplsw8P ux1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=4ylGNwumtH93sk6ap1x6lmEE198yuK1dm1zAaklJl8g=; b=b6YPBADJRR8WgDM5v2rCfxmwI4hv49+O+kXrFIkIQWctToEhiuHWHKGc4AG8+W59VD yxIJaE3h4DJJDPZOQ45ukuDBugqpi7+mArbx/GlWTDhgR8GyrXwOHquh6bm/d+FBHPc3 wioutkb5uhFF92veKipNcdhttXwA/I2KLUjQT6wdP7vLkeKJcp65CGbHxdGCK6esV4S6 kvdn2gMAPZxDi4GrHHHv1KWt2bhmhaK5zBwvweosHizLo6SlbGw+ujlLjmIxvvHARL8/ GUlYSVcn/wIvJe39jqzPoDMO8cN7d2RiXFIPlE2/0C7kBznWzp6sLBwyxuMjvRBt+FKO kmwg== X-Gm-Message-State: AOAM530I1ohmJzptIYq/O3Z/1vp1wN3A0fylLO7TosgKqik0kGkBretz wthBzt9LAj5wTRJl9MPt+AmtXOSoXcptCao+jkBj7OCN X-Received: by 2002:aca:55c1:: with SMTP id j184mr8900951oib.160.1592236068457; Mon, 15 Jun 2020 08:47:48 -0700 (PDT) MIME-Version: 1.0 References: <20200613024130.3356-1-nramas@linux.microsoft.com> <20200613024130.3356-6-nramas@linux.microsoft.com> <1592233145.11061.129.camel@linux.ibm.com> In-Reply-To: <1592233145.11061.129.camel@linux.ibm.com> From: Stephen Smalley Date: Mon, 15 Jun 2020 11:47:37 -0400 Message-ID: Subject: Re: [PATCH 5/5] LSM: Define workqueue for measuring security module state To: Mimi Zohar Cc: Lakshmi Ramasubramanian , Stephen Smalley , Casey Schaufler , James Morris , linux-integrity@vger.kernel.org, LSM List , linux-kernel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 15, 2020 at 10:59 AM Mimi Zohar wrote: > > On Mon, 2020-06-15 at 09:33 -0400, Stephen Smalley wrote: > > On Fri, Jun 12, 2020 at 10:42 PM Lakshmi Ramasubramanian > > wrote: > > > > > > The data maintained by the security modules could be tampered with by > > > malware. The LSM needs to periodically query the state of > > > the security modules and measure the data when the state is changed. > > > > > > Define a workqueue for handling this periodic query and measurement. > > > > Won't this make it difficult/impossible to predict the IMA PCR value? > > Unless I missed it, you are going to end up measuring every N minutes > > even if there was no change and therefore constantly be extending the > > PCR. That will break attestation or sealing against the IMA PCR. > > Even if it attempts to add the same measurement to the list multiple > times, unless something changed, there should only be one measurement > in the list. Is the PCR only extended once?