Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp1893865ybn; Thu, 26 Sep 2019 03:56:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqzysjTgUg3oxyOMJwLU7d9UTK4D6LBwQXTWZvF+q3EmHVMSOe49KN1ZP4dKj/G3/lFm+0o6 X-Received: by 2002:a05:6402:1501:: with SMTP id f1mr2856811edw.76.1569495387924; Thu, 26 Sep 2019 03:56:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569495387; cv=none; d=google.com; s=arc-20160816; b=ptU0tvCHahLn566ed7xhJsNU1vhUwYab3+r31/UBKsYVFiEueru3uS9z+udpECQRgC +KOaUN+NglfPaJJJOYjAZ/QRUOiqTsObgufM1rBHWlIiSVMhv+9uWLZ4jVFqP7iS6GXU yts67xM/VnojoDAdXf0ehRWkED+GJeN9HD7cbjfIrjB6L5oZlTrhO5+bKXbYW+zhuYFX ePL5SWKIVb4GhDkYlNESp6nT62y9wmWap+jOaUdQxnF5GILonUX520SIeTv3wZfKwsyt ePLcW6Y5UIkambxZvpg2lSfM7D/5iF3yKbLWCXqxEsdL0/tRchIERG5QinA9z6ao7XcN KRwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=06sN4BqiVVoTCV1DBh5BQU6NbBj+/wn5BGMp5YqSfMc=; b=L02vyE70WU4YaIxxjJ44SBwO8sYhq2b1GukXgyNlSWMDNcTMwUxGgItfV2fy1kNAhz BR8OVVZqaEU8ykZ7ghBV7+M2qtuX1b+rga07PesPiutQP3XfiGXEuNjnyc00dh7hYHUY Ac3GtqLmGuv8p1Ov6YVD+6Ikm8PysLJ5vInPeReVaneXjy0EC1335ZDWXkotFBANerdS RQ1tQA1t2cdDJ339OJWc+FrkL9/wOno7pdAoqPM7fKaVxWRGzCXvf3pYkYvCYHE4HD2n afYfhiJa3I8x/zuPKx80V7SBiddPOaMdlFp4gPscJdyyNAdKC60hMzm79+Y6h6NUYt4V PSfg== 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j38si1070575ede.374.2019.09.26.03.56.05; Thu, 26 Sep 2019 03:56:27 -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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2408059AbfIYOuU (ORCPT + 99 others); Wed, 25 Sep 2019 10:50:20 -0400 Received: from mga12.intel.com ([192.55.52.136]:55096 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726036AbfIYOuT (ORCPT ); Wed, 25 Sep 2019 10:50:19 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Sep 2019 07:50:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,548,1559545200"; d="scan'208";a="191360959" Received: from kmakows-mobl.ger.corp.intel.com (HELO localhost) ([10.249.39.225]) by orsmga003.jf.intel.com with ESMTP; 25 Sep 2019 07:50:12 -0700 Date: Wed, 25 Sep 2019 17:50:11 +0300 From: Jarkko Sakkinen To: Ard Biesheuvel Cc: 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: <20190925145011.GC23867@linux.intel.com> References: <20190925101622.31457-1-jarkko.sakkinen@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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