Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp1815489ybn; Thu, 26 Sep 2019 02:38:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqx860zNKD8SHwUucJsFugDHfi1msGdr1E6emmMzSduGNAPrtM/XWdwyVoyY0IvE2VckT3bD X-Received: by 2002:aa7:d313:: with SMTP id p19mr2423134edq.197.1569490708114; Thu, 26 Sep 2019 02:38:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569490708; cv=none; d=google.com; s=arc-20160816; b=GsjRu5CTdU1UXrohFFUBj8MYUdOGlUynuiARNVWBiHpXEyhwWiAr1e/s7qOsb0rBvt fKG3p4R8vXaXCXJYbu1vBtC66Q0R0wbuynM7LuzI2PAOjRSTiwmMzy47cSqAIPYx/rrK 9yRTvwcjsQVit+BA9sevCtOI8JP8WnqJi1jNKkOlH5BB120c3gjt7De7qFyCUZnEhdVb QG4/aB82Gd9QnPhnc0zkwNcpfMRP+Wn8Npte0PcYF0aBqFUNsy9KUFsSjEeD6EZZZrKD 1W+b5nkHacBovWXZ1RKfmZWjb0E9M1CfNYreFdgYG/dwCBoN4N/L0DxMvhkCOFiGyFEt sXWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:mail-followup-to :reply-to:message-id:subject:cc:to:from:date; bh=WoZ3HLwN6X4dNm7Y0wAK5ji0bCw6LaTLIwuuJsi7KNE=; b=BA6afNw0Mptl981BEFVYprGs9xuFsCoUqDYRb8lFpWr6Pmk4Em/Kg6MACl/M8l4oO/ igOMq8i+MD8xmeJOdAnD+Aws28Jx85T1tNmr1SgIZTIVCKrDVjvO5vMcW+Y3Vi6PNfFo gRad/lzqvjAmpT8gU/flpr7Sa0oSzAHkLXEAc8g/xlJspJccktN53qva7zUdYTr7BGJF fMhkpZ8el4EoUVzJQLn2I/+uxdzfEB7mu7beEVRaxAeI8d8+DAJIQjsZWuaiKyVOnHaf ksJVVAgcNwFFP+ESlwstvNw1BkVTSnexk9r6BauvASSV/S6VSDFoNRr5kc2ULqBI/ctm Xbwg== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u14si855942edq.167.2019.09.26.02.38.04; Thu, 26 Sep 2019 02:38:28 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2439127AbfIYPQU (ORCPT + 99 others); Wed, 25 Sep 2019 11:16:20 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54372 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726496AbfIYPQT (ORCPT ); Wed, 25 Sep 2019 11:16:19 -0400 Received: from mail-io1-f70.google.com (mail-io1-f70.google.com [209.85.166.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 05B5285540 for ; Wed, 25 Sep 2019 15:16:19 +0000 (UTC) Received: by mail-io1-f70.google.com with SMTP id w16so10087666ioc.15 for ; Wed, 25 Sep 2019 08:16:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:reply-to :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=WoZ3HLwN6X4dNm7Y0wAK5ji0bCw6LaTLIwuuJsi7KNE=; b=dAgPUZqgi+B8w1gGMKBLdnOdIl3zSQzkGooV2pneC//poH9FyHOQKVoRaq+PzxvzO5 oVY5ndP2T9XI7ZuOcdDZ+8W41cwPd+ScW4akgQU+kBz5h9OpmwRQCir1ytPLFOig96N7 mqG+8EKFcRXa8fqp8U3eA1Fw8/ejZqCdXpJSVeRZ35JWguB3aIzhrK61Gusyfy0hX2BG e4BWm0QAGtt5Z/h9CBBcGYi5nXTTREtqxkJNhbkZu28fUCsp+tEYolk1f39VSENyM+Tk kQ7aCVsb/FciTYW0aLlMb4XFU7/5hW1m5s2bFzzl3fO6cQoZatmuNk+5oAG/n/UrMlQF 4ebw== X-Gm-Message-State: APjAAAVpt3nn3bSBwSrb2jkdGjYKtNZyuEuoK81bbqVf/rRJJCzwXI1L dQY6HTrlW33ftLHWcmkPn7hX58OznQAFBDGa6wdRblWR3IuG4byK60MpIpW2Fzkoh0bppQxi7Dq +3DISj0CBX79goZZP4L4i/jTA X-Received: by 2002:a6b:b593:: with SMTP id e141mr11215323iof.233.1569424578389; Wed, 25 Sep 2019 08:16:18 -0700 (PDT) X-Received: by 2002:a6b:b593:: with SMTP id e141mr11215286iof.233.1569424578099; Wed, 25 Sep 2019 08:16:18 -0700 (PDT) Received: from localhost (ip70-163-223-149.ph.ph.cox.net. [70.163.223.149]) by smtp.gmail.com with ESMTPSA id w16sm217154ilc.62.2019.09.25.08.16.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Sep 2019 08:16:17 -0700 (PDT) Date: Wed, 25 Sep 2019 08:16:16 -0700 From: Jerry Snitselaar To: Jarkko Sakkinen Cc: Ard Biesheuvel , linux-integrity , Peter Jones , linux-efi , stable , Lyude Paul , Matthew Garrett , Roberto Sassu , Bartosz Szczepanek , open list Subject: Re: [PATCH v2 1/2] efi+tpm: Don't access event->count when it isn't mapped. Message-ID: <20190925151616.3glkehdrmuwtosn3@cantor> Reply-To: Jerry Snitselaar Mail-Followup-To: Jarkko Sakkinen , Ard Biesheuvel , linux-integrity , Peter Jones , linux-efi , stable , Lyude Paul , Matthew Garrett , Roberto Sassu , Bartosz Szczepanek , open list References: <20190925101622.31457-1-jarkko.sakkinen@linux.intel.com> <20190925145011.GC23867@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20190925145011.GC23867@linux.intel.com> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed Sep 25 19, Jarkko Sakkinen wrote: >On Wed, Sep 25, 2019 at 12:25:05PM +0200, Ard Biesheuvel wrote: >> On Wed, 25 Sep 2019 at 12:16, Jarkko Sakkinen >> wrote: >> > >> > From: Peter Jones >> > >> > Some machines generate a lot of event log entries. When we're >> > iterating over them, the code removes the old mapping and adds a >> > new one, so once we cross the page boundary we're unmapping the page >> > with the count on it. Hilarity ensues. >> > >> > This patch keeps the info from the header in local variables so we don't >> > need to access that page again or keep track of if it's mapped. >> > >> > Fixes: 44038bc514a2 ("tpm: Abstract crypto agile event size calculations") >> > Cc: linux-efi@vger.kernel.org >> > Cc: linux-integrity@vger.kernel.org >> > Cc: stable@vger.kernel.org >> > Signed-off-by: Peter Jones >> > Tested-by: Lyude Paul >> > Reviewed-by: Jarkko Sakkinen >> > Acked-by: Matthew Garrett >> > Acked-by: Ard Biesheuvel >> > Signed-off-by: Jarkko Sakkinen >> >> Thanks Jarkko. >> >> Shall I take these through the EFI tree? > >Would be great, if you could because I already sent one PR with fixes for >v5.4-rc1 yesterday. > >/Jarkko My patch collides with this, so I will submit a v3 that applies on top of these once I've run a test with all 3 applied on this t480s.