Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp1461234ybp; Wed, 9 Oct 2019 14:38:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqxCUugLaW2iKZaw8qNhBvZKDpD6T75ZY30bZQYOJCm9d7NxHnR/4ETF8aTsedcugn+4DraN X-Received: by 2002:a50:af22:: with SMTP id g31mr4983507edd.199.1570657112020; Wed, 09 Oct 2019 14:38:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570657112; cv=none; d=google.com; s=arc-20160816; b=O/gZG4coqFL8KsqWhDIdfFDnw73Wj+Xi3KWiKgcyc6Hr6zfYVC/6sYRICzDj6YTxmC dHVJQLmEeXdDf2Pa0f0bUAotHejUs+GNdNvZSLk3JAwOGH46fDgsyypWEnBzkTA7SwuI VfZgBlvdLE+KfgSTYZrreLDAaqD1YWmPW7GhYKDGKZ/xNbdE02aVR35vnbCafb2kPCKo xUN668wQyW4chgYMsLD6sRA+Axq54DO3mq+YU0HK57nEr7h7LhIxzqtTS8ZaIAHNW3yy ntVvhqbTvJskZQhLa5Wbu8RHXP+zFYJSmrkustSNCkkvI3X3JGkMo0xyUACdWqpflvfu 75DQ== 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=klVgRvWYot0WrttVT8Sv3A95y5M6pjVVwi6RBu3Fht8=; b=jk7f10YSu7yfIwLvJGIG5HoYttwkuSLFFKXwWrQN+/VumyfyZY9oUBw/hfN7J6qpGo vD+I3y6H/4zPHez+U0N2VbxVLuvJb8AD4G69Kuo2ExPvETXGF2z/9bIgnFjj+XISmv2F LExfzHQkn7eTJhanmw2hqU5CP2XGnufxWMvz5dgmOUaEgJXPtBERfHDNQAnBURiYpVx0 npiizU08pwjfC+si89hHaVeJY7069VT/B4/QPdFUnvz0/HJb8KbzrJXjV2gARgI0C/uZ g0/bRmmgppNG/nBbjANBbZPuqX5U/rydE+b2l4ZZu6rTxtPyILdi6fOFkA3CieDCetN1 LaSw== 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 v2si2248537edm.80.2019.10.09.14.38.08; Wed, 09 Oct 2019 14:38:32 -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 S1731936AbfJIVgP (ORCPT + 99 others); Wed, 9 Oct 2019 17:36:15 -0400 Received: from mga11.intel.com ([192.55.52.93]:10309 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730490AbfJIVgP (ORCPT ); Wed, 9 Oct 2019 17:36:15 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Oct 2019 14:36:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,277,1566889200"; d="scan'208";a="200262511" Received: from thomaske-mobl.ger.corp.intel.com (HELO localhost) ([10.252.3.55]) by FMSMGA003.fm.intel.com with ESMTP; 09 Oct 2019 14:36:12 -0700 Date: Thu, 10 Oct 2019 00:36:10 +0300 From: Jarkko Sakkinen To: James Bottomley Cc: linux-integrity@vger.kernel.org, Peter Huewe , Jason Gunthorpe , Arnd Bergmann , Greg Kroah-Hartman , open list Subject: Re: [PATCH v3 1/2] tpm: Use GFP_KERNEL for allocating struct tpm_buf Message-ID: <20191009213559.GA30044@linux.intel.com> References: <20191003185103.26347-1-jarkko.sakkinen@linux.intel.com> <20191003185103.26347-2-jarkko.sakkinen@linux.intel.com> <1570148716.10818.19.camel@linux.ibm.com> <20191006095005.GA7660@linux.intel.com> <1570475528.4242.2.camel@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1570475528.4242.2.camel@linux.ibm.com> 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 Mon, Oct 07, 2019 at 12:12:08PM -0700, James Bottomley wrote: > From: James Bottomley > Subject: [PATCH] tpm: use GFP kernel for tpm_buf allocations > > The current code uses GFP_HIGHMEM, which is wrong because GFP_HIGHMEM > (on 32 bit systems) is memory ordinarily inaccessible to the kernel > and should only be used for allocations affecting userspace. In order > to make highmem visible to the kernel on 32 bit it has to be kmapped, > which consumes valuable entries in the kmap region. Since the tpm_buf > is only ever used in the kernel, switch to using a GFP_KERNEL > allocation so as not to waste kmap space on 32 bits. > > Fixes: a74f8b36352e (tpm: introduce tpm_buf) > Signed-off-by: James Bottomley Pushed to master branch. /Jarkko