Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp1109780ybp; Fri, 11 Oct 2019 09:05:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqwJF3J9dSTCIzQE62OHrmgbCR4L7vSuYaYumi4N1JA77GQARXEXZxNimLnYCI7R5FzkgkNu X-Received: by 2002:a05:6402:1514:: with SMTP id f20mr14431319edw.35.1570809950614; Fri, 11 Oct 2019 09:05:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570809950; cv=none; d=google.com; s=arc-20160816; b=FUXCei1cin7b5r7CAeq0f0dRBqXkTN7bciB0/e4GZ19pT0QHMz5+barcolRXiz5KvS i4GsvKYDopXuwoxjLzNbf1XDhxQj/09g/B9ZaNPl12zkcYGhhAPaylv8sgw8A30BwXJN ab/Dp7c+v2TaaJTONDjP04cQPrZxeJC5tkZDOlKgQ48dkLbL/HyRgxIUDeCjhLJS8n8z cqkmvc041zDBxWN7GnWC0TsAm2vQGO7hsfXk4+s23uKC8vR9sqoZxNwB8fUw5bHi0pd1 Oz//q2jyMO46IeUu3IwpwaIJNbeIcdfGnZh1cVVt3bcpA/JxPh40w18f2oCZl0mFJ+07 /6CA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id; bh=NZAG0m0OKo5DGCzv0/9zyuZ2mt0Vm0rTqFEeF/I6IDw=; b=Bx6gyfmUUIg/afjaJNjsiquqH5+SPdM+9X60XMyjVhkZ/0QtPNA8vDM1F1rM4vR0cP OW4MUOF7cgivcZXzMdbHIMS1uk0IUhlEsFotuzEjHnjOYekFxpj20ylLsaCBVLe3s773 ycYAgREhnCIDmYYgQ2gvFZ6da1jG+tk1G6lB0uCoF3fxB1KpPaofilO2WMEKo3YCbg0u 1a/Mb/hh1S5LZ9W8mzgFlIfZI8mldcDaga7r2EY8rAzVl9TnTru0TjP026VUu9kt3Qul XuhtZ+2r/T7hGcu0I7Wkv2ZJDHPtWl4GO3nvXMmHGol17tLbCpyuWa6mfWDEdeyaWB4C OS1A== 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=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h26si6357113edb.141.2019.10.11.09.05.26; Fri, 11 Oct 2019 09:05:50 -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=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728378AbfJKQEC (ORCPT + 99 others); Fri, 11 Oct 2019 12:04:02 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:19368 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727970AbfJKQEC (ORCPT ); Fri, 11 Oct 2019 12:04:02 -0400 Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x9BG2ZCh111730; Fri, 11 Oct 2019 12:03:56 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 2vjtbx77bm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 11 Oct 2019 12:03:56 -0400 Received: from m0098393.ppops.net (m0098393.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.27/8.16.0.27) with SMTP id x9BG3tNG116134; Fri, 11 Oct 2019 12:03:55 -0400 Received: from ppma01wdc.us.ibm.com (fd.55.37a9.ip4.static.sl-reverse.com [169.55.85.253]) by mx0a-001b2d01.pphosted.com with ESMTP id 2vjtbx77av-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 11 Oct 2019 12:03:55 -0400 Received: from pps.filterd (ppma01wdc.us.ibm.com [127.0.0.1]) by ppma01wdc.us.ibm.com (8.16.0.27/8.16.0.27) with SMTP id x9BG1Ysf005873; Fri, 11 Oct 2019 16:03:56 GMT Received: from b03cxnp08028.gho.boulder.ibm.com (b03cxnp08028.gho.boulder.ibm.com [9.17.130.20]) by ppma01wdc.us.ibm.com with ESMTP id 2vejt7msfy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 11 Oct 2019 16:03:56 +0000 Received: from b03ledav006.gho.boulder.ibm.com (b03ledav006.gho.boulder.ibm.com [9.17.130.237]) by b03cxnp08028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x9BG3rF339387416 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 11 Oct 2019 16:03:53 GMT Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 79425C605F; Fri, 11 Oct 2019 16:03:53 +0000 (GMT) Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B6AFCC6057; Fri, 11 Oct 2019 16:03:51 +0000 (GMT) Received: from jarvis.ext.hansenpartnership.com (unknown [9.85.184.117]) by b03ledav006.gho.boulder.ibm.com (Postfix) with ESMTP; Fri, 11 Oct 2019 16:03:51 +0000 (GMT) Message-ID: <1570809830.24157.2.camel@linux.ibm.com> Subject: Re: [PATCH v3 1/2] tpm: Use GFP_KERNEL for allocating struct tpm_buf From: James Bottomley To: Jarkko Sakkinen Cc: linux-integrity@vger.kernel.org, Peter Huewe , Jason Gunthorpe , Arnd Bergmann , Greg Kroah-Hartman , open list Date: Fri, 11 Oct 2019 09:03:50 -0700 In-Reply-To: <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> <20191009213559.GA30044@linux.intel.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.26.6 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-10-11_09:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=2 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=727 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-1910110145 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2019-10-10 at 00:36 +0300, Jarkko Sakkinen wrote: > 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 > om> > > Pushed to master branch. Thanks. 0day spotted a problem with the use of free_page() so I've sent a v2. James