Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp361480ybt; Mon, 6 Jul 2020 11:06:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy9tTPpDKgLL+c+MBD4v8ffcUT26FJy0MbRD0p+HVv7gZCg3tPFJgt+BAkqN9XCFbdusyVK X-Received: by 2002:a05:6402:1a54:: with SMTP id bf20mr56597801edb.69.1594058810035; Mon, 06 Jul 2020 11:06:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594058810; cv=none; d=google.com; s=arc-20160816; b=cVjLX+7NL1jn+fvCeQ98goxUEw+/EnV6qTKgsWaqOcTGODEZmHdm3Mg3z70xhs5hD8 Al3+ah0atBjB3npCRwF7s/1prx5Hhaz1ItoZBViSR3TM5Lhzz3s3NwYonUvzKWfB21Dm 308m9EmVOkBCn3smU6A2nKMtcLOrPW99SSoFGxXDbZKGWKx6ZOEfL2PdOmXuuyd1bVgV fTQI3dPvssSl5e9I1jtEEZHo1glqn7ZOeP5wpNyXMmTgQcWfrOqQfvQ020MObe86SpT4 Jpiyi+gJQ7EF8P5mbGs9nyR2REMX9SuaqfK0yJPuUomKfqLAMJUZ9BBUNuysJ7hoEfxC VHpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject; bh=HS5CYjEgWj6T2CFbJSQ5Gw3mdASTQo7esPxvxC9hMDo=; b=F5l0eo5Gym29MUvhSU33EB6xUevqtfMxeIVHFabw33bXqK9aTARUY0KElWUg48pH5x 2wAOLXXLG0IdcEdCrggLUgQNAZvYdbQlnfbhNWEzfpGcnI6mL6tcgVZylC+TkMqAHD8d 43TFedv8dJRm02pyP9DsrhekgEN1/fA8tvYZSYdd8jy+L46fRpv0OecWNvemcW6ypVUP jB3LyQonJCK6Ua2+NRBOFqDONDsKCMKU9uWBS7J0DnzSj7JHBPc8OCAu7Bza8FIp0lNg o/0/cROy0ZhXzrWWi/A8yz+LoO7zh0YS+HXBY007HBE9Dk56+F3CM2Y9TkIq1FD+uZWk Qftg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id d2si13129119ejb.118.2020.07.06.11.06.27; Mon, 06 Jul 2020 11:06:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1729711AbgGFSGS (ORCPT + 99 others); Mon, 6 Jul 2020 14:06:18 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:53794 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729589AbgGFSGR (ORCPT ); Mon, 6 Jul 2020 14:06:17 -0400 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 066I2R9g134638; Mon, 6 Jul 2020 14:06:14 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 32482k1nce-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 06 Jul 2020 14:06:14 -0400 Received: from m0098399.ppops.net (m0098399.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 066I45H8142786; Mon, 6 Jul 2020 14:06:13 -0400 Received: from ppma05wdc.us.ibm.com (1b.90.2fa9.ip4.static.sl-reverse.com [169.47.144.27]) by mx0a-001b2d01.pphosted.com with ESMTP id 32482k1nbs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 06 Jul 2020 14:06:13 -0400 Received: from pps.filterd (ppma05wdc.us.ibm.com [127.0.0.1]) by ppma05wdc.us.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 066I4ciB002848; Mon, 6 Jul 2020 18:06:12 GMT Received: from b03cxnp08028.gho.boulder.ibm.com (b03cxnp08028.gho.boulder.ibm.com [9.17.130.20]) by ppma05wdc.us.ibm.com with ESMTP id 322hd8se4f-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 06 Jul 2020 18:06:12 +0000 Received: from b03ledav004.gho.boulder.ibm.com (b03ledav004.gho.boulder.ibm.com [9.17.130.235]) by b03cxnp08028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 066I6Bgq18547158 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 6 Jul 2020 18:06:11 GMT Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 367CF78063; Mon, 6 Jul 2020 18:06:11 +0000 (GMT) Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4976978064; Mon, 6 Jul 2020 18:06:10 +0000 (GMT) Received: from sbct-3.pok.ibm.com (unknown [9.47.158.153]) by b03ledav004.gho.boulder.ibm.com (Postfix) with ESMTP; Mon, 6 Jul 2020 18:06:10 +0000 (GMT) Subject: Re: [PATCH] tpm: Define TPM2_SPACE_BUFFER_SIZE to replace the use of PAGE_SIZE To: Jarkko Sakkinen , linux-integrity@vger.kernel.org, stable@vger.kernel.org, Peter Huewe , Jason Gunthorpe , Arnd Bergmann , Greg Kroah-Hartman , Sumit Garg , Alexey Klimov , James Bottomley , open list References: <20200702225603.293122-1-jarkko.sakkinen@linux.intel.com> <20200702235544.4o7dbgvlq3br2x7e@cantor> <20200704035615.GA157149@linux.intel.com> From: Stefan Berger Message-ID: <4f93bca3-e5c2-1074-f273-628ed603c139@linux.ibm.com> Date: Mon, 6 Jul 2020 14:06:09 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <20200704035615.GA157149@linux.intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.687 definitions=2020-07-06_15:2020-07-06,2020-07-06 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 spamscore=0 clxscore=1015 phishscore=0 suspectscore=0 cotscore=-2147483648 mlxlogscore=820 adultscore=0 malwarescore=0 bulkscore=0 priorityscore=1501 mlxscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2007060123 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/3/20 11:56 PM, Jarkko Sakkinen wrote: > On Thu, Jul 02, 2020 at 04:55:44PM -0700, Jerry Snitselaar wrote: >> On Fri Jul 03 20, Jarkko Sakkinen wrote: >>> The size of the buffers for storing context's and sessions can vary from >>> arch to arch as PAGE_SIZE can be anything between 4 kB and 256 kB (the >>> maximum for PPC64). Define a fixed buffer size set to 16 kB. This should be >>> enough for most use with three handles (that is how many we allow at the >>> moment). Parametrize the buffer size while doing this, so that it is easier >>> to revisit this later on if required. >>> >>> Reported-by: Stefan Berger >>> Cc: stable@vger.kernel.org >>> Fixes: 745b361e989a ("tpm: infrastructure for TPM spaces") >>> Signed-off-by: Jarkko Sakkinen >> Reviewed-by: Jerry Snitselaar > Thank you. > > Now only needs tested-by from Stefan. Tested-by: Stefan Berger > > /Jarkko