Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp5175609pxj; Wed, 9 Jun 2021 10:52:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw/nlDfhQ9E9pmxqnNpo6e8LH/GkyNzv9/8bB/jgwWpW4/DgeyibVRQ92awf0FMMzH/47yt X-Received: by 2002:a17:907:7201:: with SMTP id dr1mr978415ejc.19.1623261156963; Wed, 09 Jun 2021 10:52:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623261156; cv=none; d=google.com; s=arc-20160816; b=qOU0fApmYj/dY4LTQC9eW2WtrexMHI3sSE0YgjGGsBDwkHVQjpZfohGueITtK2RPKZ Difk1vYrDsQbXlyon1j/GB5xEceZ02O8Rp1tJ4L2/2PemE3cxX/JN+MEh4qnH5sRjERN aE2j+1Y0eNgR6nPoLrJMOkv3Z3fnIrMcJfwydgtUH2gY85Vq3N0ioGmjY0ra0BQuyEU6 YFj9XYZkRYjU/Us6n+qerTTlnffTWNnqevv5BwnKpblBlAzD1Q9JSCQMlCnx0+HFvd+U DKgj8jZUpfeHtmH34Y1tKjK4LWyugYBp9NU013CUGNbOlAq/i2BF8d63Ggtt4HIudEEO 6EiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-filter; bh=HhHhUu3sZTkLyr/eSUx74slyUT3vr66VzrX8x+epWEY=; b=qtiQyaY2JLahxKfOP8+DiDCm5/+Yq1Pp3TgDqZZX4gzBX8sSkFHUuWI4/utCU7SnCO wPCHXcu946nkPiIaOjOup5+kKeslHD6WuvF6dTfy0xCNEXR1dU0hpmIVXpgIjXCTRWp+ QfKSLUlgq/A+aeMa8dMOAt0uCfAPB2v+fsUa7yXP3Lzi7j20Gkorfngzz+8jF9NwjB6u dMpejQNdPuHRzdwKtYorLkPyLkFV+8LYRm5lZ9A1SEQz9OmbN6U3MyUJQDN5RqAH9niu jfS32O77KFOCQ7cDRKPwEbMBLWGibebFjevwU20Dr9Q42DGR/ur7k8FmdRHH92HpCSIF 2lgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=E5kQa+Il; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k22si354985ejc.469.2021.06.09.10.52.12; Wed, 09 Jun 2021 10:52:36 -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; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=E5kQa+Il; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238315AbhFIOy6 (ORCPT + 99 others); Wed, 9 Jun 2021 10:54:58 -0400 Received: from linux.microsoft.com ([13.77.154.182]:54270 "EHLO linux.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234853AbhFIOy5 (ORCPT ); Wed, 9 Jun 2021 10:54:57 -0400 Received: from sequoia (162-237-133-238.lightspeed.rcsntx.sbcglobal.net [162.237.133.238]) by linux.microsoft.com (Postfix) with ESMTPSA id 183BC20B7188; Wed, 9 Jun 2021 07:53:02 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 183BC20B7188 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1623250382; bh=HhHhUu3sZTkLyr/eSUx74slyUT3vr66VzrX8x+epWEY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=E5kQa+Il+On6I1y9Wgum53+A9ZGdTcxYpqSuu291t9sRCFn2ieEbCB55BmaUC3sr3 H7FaJoQV5WAOlKevvJxjBawEddDe1lNWFmOIyjOOd/rLRbCFlGSsKj4enkgfFrK4Cf X6mMc3IqGYmaAYJZ0ple1o9EUe7ThL/nbsFO10k0= Date: Wed, 9 Jun 2021 09:53:00 -0500 From: Tyler Hicks To: Jens Wiklander Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, op-tee@lists.trustedfirmware.org, Sumit Garg , Herbert Xu , Sakkinen , Sasha Levin , Thirupathaiah Annapureddy , Vikas Gupta , "David S . Miller" Subject: Re: [PATCH 5/7] tpm_ftpm_tee: use tee_shm_alloc_kernel_buf() Message-ID: <20210609145300.GI4910@sequoia> References: <20210609102324.2222332-1-jens.wiklander@linaro.org> <20210609102324.2222332-6-jens.wiklander@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210609102324.2222332-6-jens.wiklander@linaro.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021-06-09 12:23:22, Jens Wiklander wrote: > Uses the new simplified tee_shm_alloc_kernel_buf() function instead of > the old deprecated tee_shm_alloc() function which required specific > TEE_SHM-flags. > > Signed-off-by: Jens Wiklander Reviewed-by: Tyler Hicks Tyler > --- > drivers/char/tpm/tpm_ftpm_tee.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/char/tpm/tpm_ftpm_tee.c b/drivers/char/tpm/tpm_ftpm_tee.c > index 2ccdf8ac6994..6e3235565a4d 100644 > --- a/drivers/char/tpm/tpm_ftpm_tee.c > +++ b/drivers/char/tpm/tpm_ftpm_tee.c > @@ -254,11 +254,11 @@ static int ftpm_tee_probe(struct device *dev) > pvt_data->session = sess_arg.session; > > /* Allocate dynamic shared memory with fTPM TA */ > - pvt_data->shm = tee_shm_alloc(pvt_data->ctx, > - MAX_COMMAND_SIZE + MAX_RESPONSE_SIZE, > - TEE_SHM_MAPPED | TEE_SHM_DMA_BUF); > + pvt_data->shm = tee_shm_alloc_kernel_buf(pvt_data->ctx, > + MAX_COMMAND_SIZE + > + MAX_RESPONSE_SIZE); > if (IS_ERR(pvt_data->shm)) { > - dev_err(dev, "%s: tee_shm_alloc failed\n", __func__); > + dev_err(dev, "%s: tee_shm_alloc_kernel_buf failed\n", __func__); > rc = -ENOMEM; > goto out_shm_alloc; > } > -- > 2.31.1 >