Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp5392071ybl; Tue, 27 Aug 2019 04:05:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqwbADoC6t72hJtIGL3pm05WqrqEUXiAZq7ToXHAypDfWOucCNduvO4UC4H030Kru6CfF9yw X-Received: by 2002:aa7:8f29:: with SMTP id y9mr26556927pfr.27.1566903903277; Tue, 27 Aug 2019 04:05:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566903903; cv=none; d=google.com; s=arc-20160816; b=Rv5evINyOSz/oR+iRO4lKQGIdpcDl5eeWorgoksilUABffYoNHyBuI5Cn5/ut5Y0nJ R6FQdXYmlYdFmXH49V4ONSI9VWnYRIUdziVN7Bng4+FzzPbesE9gv0O9PwOSv0IHdvXP 4Z0L4DP62cV1Ha9P3O7QaTomD2ULj9KJb6L8Ro3L8tF3X3gBRvBKg9+Y0Z3ZKdYKiM2Q WPnIzXDPAzo5XY+TyFqzXlNQORzGzE+6/2Oue5gZxYNQhvWa0BdccLL3n8mr1cHnQyrj XzNNU1ifJTWqJWhrxZ7Dt1LDSttCulC5KfDUFbUA8WJRFsJL5pHzhgk3jShZAUSn6eBH AGng== 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=mStHHPRi701GC5N0j5RQaAbFczhxrXS96tfA79ltUks=; b=qcwHXLRSySzPlAWPIT6OJCRIgel7i+aYF3BctWLspvhNsbv65tzJVeOWU5ddv0ll8c 16Lychle1azp/mXdSZ6fpBe/qEyarCzEE8Ozcg+nBwU6Ab+W8fYyDJeElSjNVNZKaPSa +nxCVqwchEecLNidP5tMA7YgQKjkmX3L2ux9Fg2z/Z/VlzVZipAQWKcm0GfEvt0bi2Ly dSu9FI9ZGf7flh/UHpIPVzJW1/7WtwzXuzgO+u8LR5JVkb1exrtksVEi5eUXprJ5wKEX 2GYSzbNu6duK9F3sa4GFUR1C5PyrrRY+aEbglU1Dwpaj1vDrivMrVV350c0X939NNRT0 mvVg== 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 u2si11453594pgm.242.2019.08.27.04.04.47; Tue, 27 Aug 2019 04:05:03 -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 S1728948AbfH0LDt (ORCPT + 99 others); Tue, 27 Aug 2019 07:03:49 -0400 Received: from mga03.intel.com ([134.134.136.65]:7587 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726190AbfH0LDt (ORCPT ); Tue, 27 Aug 2019 07:03:49 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Aug 2019 04:03:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,436,1559545200"; d="scan'208";a="180194738" Received: from jsakkine-mobl1.fi.intel.com (HELO localhost) ([10.237.66.169]) by fmsmga008.fm.intel.com with ESMTP; 27 Aug 2019 04:03:45 -0700 Date: Tue, 27 Aug 2019 14:03:44 +0300 From: Jarkko Sakkinen To: Matthew Garrett Cc: Peter Jones , Ard Biesheuvel , Roberto Sassu , Bartosz Szczepanek , Lyude Paul , linux-efi , Linux Kernel Mailing List Subject: Re: [PATCH 1/2] efi+tpm: Don't access event->count when it isn't mapped. Message-ID: <20190827110344.4uvjppmkkaeex3mk@linux.intel.com> References: <20190826153028.32639-1-pjones@redhat.com> <20190826162823.4mxkwhd7mbtro3zy@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: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 26, 2019 at 10:44:31AM -0700, Matthew Garrett wrote: > On Mon, Aug 26, 2019 at 9:28 AM Jarkko Sakkinen > wrote: > > > > On Mon, Aug 26, 2019 at 11:30:27AM -0400, Peter Jones wrote: > > > 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. > > > > > > Signed-off-by: Peter Jones > > > Tested-by: Lyude Paul > > > > Reviewed-by: Jarkko Sakkinen > Acked-by: Matthew Garrett > > Jarkko, these two should probably go to 5.3 if possible - I > independently had a report of a system hitting this issue last week > (Intel apparently put a surprising amount of data in the event logs on > the NUCs). OK, I can try to push them. I'll do PR today. /Jarkko