Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp2095716lqb; Mon, 27 May 2024 07:45:11 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCURqjSSTlT7+yD/V4h2eszDFUAFefQIrxhsz7vN8xNAirDy7peO0DnEO4/rtpj7/Zvy9NuLgU+zoIVepWr4BKzTg/ff+b/bHuHN4XBDow== X-Google-Smtp-Source: AGHT+IHKRze5KodPuYFo8XNIefl0UKTMhnrF8m2wMn5Bo9mJinBkkScuK52y7CEBfGW81Dm2FxxG X-Received: by 2002:a05:6e02:12c1:b0:36d:b381:4852 with SMTP id e9e14a558f8ab-3737b31e049mr117417765ab.15.1716821111248; Mon, 27 May 2024 07:45:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716821111; cv=pass; d=google.com; s=arc-20160816; b=xvzNcYJYKY68KCrUZKLhOX1VGtkmn5I18hAZp8zDJr3Y+k2AawP5zw/3z+67R6GfkG 5Weyh/ENAAbzUYLCm7mBYZdLtI/sdZL55RdsDaygJdONxI1WvYcfkKrWL0m0iS99QmFc na7jdg2ERgCbmdE+EILVPdrf0go6rU0THwjOJRkMer5JorLv+P6slJWcqKNhTwAaw1Vq q7KIYqI+XcupMidddHMC5kIXaW+Mi2Q1EAmdvysWqwRyvk7MjlseAVCk17AEcBkQlLNN knE6WHQxx8abRXNV70e1VZMvre6LfcdV9y35ME/CNkFNIN8+mOr/u9/MaxH5ZrsluY1k vUcQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=n1BDsmlQwhdu8pSjqXWApM0rUAlRIrsJQgYV+C9j7cA=; fh=5EwMl04a9qVAEuFjG2LDBJQFhSMuNtGNSMvPsQEy2No=; b=mfevgKAbnrNNWxhPkKW67X4VwE9rdXE3h8DckkcD9EFQ1FNPGXC6gx4blIS7W7XEvg 7Dsb2pY4+PlPRzCMc/osM+Xhm2rzGG29wQFDnu90QHsaeE+riP3iusLuJSiLGrq9rr1P 5YMxIJuzm0xfhPl8USXUYY1pykZC8gGtEPJrV2f/uEF6vllArwjZqTiUAa2zRFtUQ3WF JMf95/V7pQAdAc2kidFlNCRYXBrOW/7jfKs0hSnyFj7yUBaZ6DAQTYuuyuag9QSYZEbO Bdn36S9Le/AzO53eYUSHLiQ0HYg5WOEoYlGoDAHl7XemvOMDlU4PoX7C90J5uUhlo+vs ZK4g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Ehx7Rqti; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-190798-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-190798-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 41be03b00d2f7-682278921b9si6444386a12.376.2024.05.27.07.45.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 07:45:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-190798-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Ehx7Rqti; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-190798-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-190798-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 2EBC7B2EC89 for ; Mon, 27 May 2024 14:09:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B5BAE15F417; Mon, 27 May 2024 14:07:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Ehx7Rqti" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CE21415EFAA; Mon, 27 May 2024 14:07:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716818820; cv=none; b=cpwwdKGnH9OlD43k4eE321gKQwc5lcVUY2ej3NAinP5I+ZbO1w6ZcnyvU4aHQ2klVGAjnp12nhiX+0ZQqfHcLGdF6J8shUl5bIsm1CoiQ05XTxpmzKRHzWMO3eCNPWDbfAGwGC8+oQaPmlStlt2ZlDa1jfyGqKqJg2O/hz6tY78= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716818820; c=relaxed/simple; bh=n1BDsmlQwhdu8pSjqXWApM0rUAlRIrsJQgYV+C9j7cA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=fVxorPLoAtB0F14deOVpeQ7ZgbeMjeqpbFYywkeQ/OlsJcHwOr9odaR18d0ID6ElShIAByyI75mCGQpnljBNk/ONxpASAdUg5hbumR3EV2T5ZOeZiPHyTdZ/zby7jg81Su+m5rG48Vskm4w1yLK+sPnSDI/QwNpO7VGlAJ5QqGs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Ehx7Rqti; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1EFFEC2BBFC; Mon, 27 May 2024 14:06:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716818820; bh=n1BDsmlQwhdu8pSjqXWApM0rUAlRIrsJQgYV+C9j7cA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Ehx7RqtiTvj5UM2EojGrpqHk52rXrmmpEwVgxNg4ez3WeVXuEJpLRg8XVEvdmrbIi XZAuJRh1npz3bYbtsjUh/YnyDryXBLknjyAH+2fnXiAC3o/uXlZj+MxC6TJhl7+uQu PNp3arxQctgWDfxJzJmYskrpp10Ann7gjf6LGKvmumNN0sRXDK8mX7Ay4UhZKU4P+E bXZQEzvWmyGDXC6wpSvzHeGalmiojKSz0HI41qiC1/HaX6fLB4hQWA6jDLPwwXUNFN 0r/wqkaGHE9Bn/1GP+O0/xpnM6KIWVr16Fp7YGyNxdmY4Zc79BAHjTImWXTmD2Xa2x tIqnw7GJC01tQ== Date: Mon, 27 May 2024 16:06:58 +0200 From: Maxime Ripard To: "Jason-JH.Lin" Cc: Chun-Kuang Hu , AngeloGioacchino Del Regno , David Airlie , Daniel Vetter , Matthias Brugger , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, dri-devel@lists.freedesktop.org, linux-media@vger.kernel.org, linaro-mm-sig@lists.linaro.org, Jason-ch Chen , Singo Chang , Nancy Lin , Shawn Sung , Project_Global_Chrome_Upstream_Group@mediatek.com, Jeffrey Kardatzke , Jason-jh Lin Subject: Re: [PATCH v6 0/7] Add mediate-drm secure flow for SVP Message-ID: <20240527-determined-sage-piculet-bfec4a@houat> References: <20240525232928.5524-1-jason-jh.lin@mediatek.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha384; protocol="application/pgp-signature"; boundary="lkrd7n7cfhfphpnl" Content-Disposition: inline In-Reply-To: <20240525232928.5524-1-jason-jh.lin@mediatek.com> --lkrd7n7cfhfphpnl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Sun, May 26, 2024 at 07:29:21AM GMT, Jason-JH.Lin wrote: > From: Jason-jh Lin >=20 > Memory Definitions: > secure memory - Memory allocated in the TEE (Trusted Execution > Environment) which is inaccessible in the REE (Rich Execution > Environment, i.e. linux kernel/userspace). > secure handle - Integer value which acts as reference to 'secure > memory'. Used in communication between TEE and REE to reference > 'secure memory'. > secure buffer - 'secure memory' that is used to store decrypted, > compressed video or for other general purposes in the TEE. > secure surface - 'secure memory' that is used to store graphic buffers. >=20 > Memory Usage in SVP: > The overall flow of SVP starts with encrypted video coming in from an > outside source into the REE. The REE will then allocate a 'secure > buffer' and send the corresponding 'secure handle' along with the > encrypted, compressed video data to the TEE. The TEE will then decrypt > the video and store the result in the 'secure buffer'. The REE will > then allocate a 'secure surface'. The REE will pass the 'secure > handles' for both the 'secure buffer' and 'secure surface' into the > TEE for video decoding. The video decoder HW will then decode the > contents of the 'secure buffer' and place the result in the 'secure > surface'. The REE will then attach the 'secure surface' to the overlay > plane for rendering of the video. >=20 > Everything relating to ensuring security of the actual contents of the > 'secure buffer' and 'secure surface' is out of scope for the REE and > is the responsibility of the TEE. >=20 > DRM driver handles allocation of gem objects that are backed by a 'secure > surface' and for displaying a 'secure surface' on the overlay plane. > This introduces a new flag for object creation called > DRM_MTK_GEM_CREATE_RESTRICTED which indicates it should be a 'secure > surface'. All changes here are in MediaTek specific code. > --- > TODO: > 1) Drop MTK_DRM_IOCTL_GEM_CREATE and use DMA_HEAP_IOCTL_ALLOC in userspace > 2) DRM driver use secure mailbox channel to handle normal and secure flow > 3) Implement setting mmsys routing table in the secure world series I'm not sure what you mean here. Why are you trying to upstream something that still needs to be removed from your patch series? Also, I made some comments on the previous version that have been entirely ignored and still apply on this version: https://lore.kernel.org/dri-devel/20240415-guppy-of-perpetual-current-3a797= 4@houat/ Maxime --lkrd7n7cfhfphpnl Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iJUEABMJAB0WIQTkHFbLp4ejekA/qfgnX84Zoj2+dgUCZlSTgQAKCRAnX84Zoj2+ dhjrAYDF6bR4iF7gYsP2hmqjPJbIPGkYuq7u09k5+hu3sX7JKhq1g9n5v5hX7VH6 mU5WwlwBgN4eDfGwGhtYaDZJA62JTLpJVnIl2BS0XO5+OiU6EzKrzRJluNKcWPpS +8EyU4dfAQ== =0kUw -----END PGP SIGNATURE----- --lkrd7n7cfhfphpnl--