Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp2043441rbb; Tue, 27 Feb 2024 08:57:20 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVapeR1oQY+lk4d/lBqZ1GVNPCK15RKx7IJQ4FRoGmK/n4+AMFk8ClzU86kqXmIsrClXFLbDhGqX8rLRDDyGplXe9Du/VUh/JQpoD0+1g== X-Google-Smtp-Source: AGHT+IFu1uMsSinhjtMaW3WjSMczQ33LicLl+FTW1S0+yHLzvbiEknKuw+DpGi4RmUUQoqy0G1Rz X-Received: by 2002:a17:906:394:b0:a41:3728:9428 with SMTP id b20-20020a170906039400b00a4137289428mr7256600eja.4.1709053039938; Tue, 27 Feb 2024 08:57:19 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709053039; cv=pass; d=google.com; s=arc-20160816; b=O0E4YBvP0fmUaxhvKevf93i0CuUXLYu+01QCEqaikzAPBrOzkEGij5vm6Iqg309xXk LXl+Xz/VuAvXYN7S+0d9sdAuBMGoLSXVmOMG74PXqk9jMGbvT7pj0Vv6ATiHlF79kj+F 33lFdUa8R7/wBjtR646IWn/AXYdRrPpLuSxx17rD+xVspDLgWQth+v5VVQ8exVXmVY3y eg5et+ltupN6YGRswqhpufozM3+Q9I6JvE7nWC5BVNEn4WELE2Eih0UBqfHecLlPZYvJ Mw0rpLgkAZz4Fz0N5/Rv0A4haPCGNn74xJpFf5XBBISV0akdBCiShx3VedueHwOXeaUv i8nA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=UovAhvYk0jCgKfej4efthysVKEiqDPwvrLhH9uHvXVI=; fh=LNu0c3gNPK1mYjOca90icpQXFsjqhO0esU5jl/im0Do=; b=oTiYjPe/Wl5gmbtKPE6Y+NteCfQhtSaUFkYn82drCOhmW+pX16M4Z3hYWqp2blLwqE lnW0jEvmi/FWqdi6NnVG7sQWTAboof7b+ZDaPCZj7mdbM3Z3z6HzUMSpVEH0Hc374G3p 0/yGgEf67JZBlZlGGVflhY4Zi4YTWN5nrBh88Xim/7gjPpYwpojK0onqDrgn8GNmh91y JnExAxtQuMecGC7bToF5I/UCdxhUMqMN1JPoWZYvnDQUXOIuQ6wlCrT+RkYkCzOw4P4p UY0TbukbXB70TN/ampa0xlKHHAiQNUtWDi9sdIc/jxmeDOU5BE+3fuZNGA4gnaapQIqg uaTw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nCR9YSNx; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-83663-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-83663-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id v8-20020a170906564800b00a3f0b680a63si887886ejr.48.2024.02.27.08.57.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Feb 2024 08:57:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-83663-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nCR9YSNx; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-83663-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-83663-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 3B9E21F24442 for ; Tue, 27 Feb 2024 16:56:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A09424EB38; Tue, 27 Feb 2024 16:56:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="nCR9YSNx" 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 BEC6E4CB45; Tue, 27 Feb 2024 16:56:16 +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=1709052976; cv=none; b=LHlj/jD62iog8MDD13knpDJ+5ldzVZcK50tW7tVrQrv7wv/RFjCQsU97vTOm4Psj+D1MoUFZv99FBKMNH8UoPFcqUsvSC32ZEn84gobrEPUblfcxW1KG09HV1APzo+axLZPsH9VGH/NNUicWSL0oA6RKx17t/XWWT7RoVLDYNpo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709052976; c=relaxed/simple; bh=mgo4yeLW+ttbeoLLIJzNjCrFuHKZlPxeJXjaNZAMcI0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=MpdjDFDb7wH44WZr9rEdFfrQZw7VN1dcIKjwR1rNsB2dqYCbahkQ2jJU1SgIf9o65bH3HEufgpjkwJoeuyfONqgIluxLHt1Q3mxrJeO3uz46EXOxvRFNX/6j/YSXHWe3lESNWrPgvUxfZ7n5qPbxUppQBEH8KsVKh0J0fzMm8xg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=nCR9YSNx; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id DE5D0C43390; Tue, 27 Feb 2024 16:56:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709052976; bh=mgo4yeLW+ttbeoLLIJzNjCrFuHKZlPxeJXjaNZAMcI0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=nCR9YSNxDsGHxuUxMe5KNkYXeWRSiNau8RDAEKw2r0FpQZxwnp7Ug5CEVJCr1WgXL 44/PFr6XlhBYZ31wanYypbkwUXPk/V6zFkm5pfOuEaOi71F+Zp88Lnf//B3cMondZJ SutV0wVSlQUUUq/kyrofo8LlH5kjd5+Om1zIeFkyLunuq9YtnAOvUNNydMbS4MJ5GL h5xsZQy6w922uQT/HRZU+HD/Oj28Nrz1bQ9wA5z4hXZzB3q99ZL/SJJxR8rBcm2K5S 5FDwUy54QkNe9o1gD1kg3KnMEsOUXO+EP0yczauP4ewdn7GbOGTEYlg6oKirt4UAe1 FKQRBWaxc7RaA== Date: Tue, 27 Feb 2024 10:56:13 -0600 From: Bjorn Andersson To: Bartosz Golaszewski Cc: Andy Gross , Konrad Dybcio , Elliot Berman , Krzysztof Kozlowski , Guru Das Srinagesh , Andrew Halaney , Maximilian Luz , Alex Elder , Srini Kandagatla , Arnd Bergmann , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@quicinc.com, Bartosz Golaszewski , Deepti Jaggi Subject: Re: [PATCH v7 10/12] firmware: qcom: tzmem: enable SHM Bridge support Message-ID: References: <20240205182810.58382-1-brgl@bgdev.pl> <20240205182810.58382-11-brgl@bgdev.pl> <7pybw4wxlzxfl65yuqxzks5w7uq52hosyq53etlzas6i6o5l6d@vxd4sykcxora> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Thu, Feb 22, 2024 at 05:24:19PM +0100, Bartosz Golaszewski wrote: > On Sun, Feb 18, 2024 at 4:41 AM Bjorn Andersson wrote: > > > > On Mon, Feb 05, 2024 at 07:28:08PM +0100, Bartosz Golaszewski wrote: > > > From: Bartosz Golaszewski > > > > > [snip] > > > > > > > +config QCOM_TZMEM_MODE_SHMBRIDGE > > > + bool "SHM Bridge" > > > + help > > > + Use Qualcomm Shared Memory Bridge. The memory has the same alignment as > > > + in the 'Default' allocator but is also explicitly marked as an SHM Bridge > > > + buffer. > > > + > > > + With this selected, all buffers passed to the TrustZone must be allocated > > > + using the TZMem allocator or else the TrustZone will refuse to use them. > > > > It's funny how this is the only place in the whole series I can find > > this mentioned. One could from this statement guess that the eluding > > scminvoke requires shmbridge and that this patch series exists solely > > to facilitate the requirement stated in this paragraph. > > > > Yes, scminvoke *requires* SHM bridge. So does the wrapped key support. > No, this is not the only reason as - as stated by Srini - it improves > overall safety of the system for all users. > > > Either this guess is correct and this should have been made clear in > > the commit messages, or I'm guessing wrong here, in which case I need > > some help to figure out why this series exists. > > > > This series exists and IMO should get upstream soon to facilitate > adding new security features (in addition to improving existing ones). This needs to be stated in the cover letter/commit messages. > As there are at least two such features in development (mentioned > above) pushing this series upstream will make it easier to develop > them independently. > Show me the work-in-progress code and I will entertain this argument. Regards, Bjorn > Bart > > [snip]