From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 47AABC47404 for ; Wed, 9 Oct 2019 21:36:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 21C5B2054F for ; Wed, 9 Oct 2019 21:36:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731134AbfJIVgP (ORCPT ); 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-integrity-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-integrity@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