From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 737E8C3DA6E for ; Fri, 5 Jan 2024 09:35:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=lJUyDVGU0XKgaKwYDjGSDxNTROvNmlr5rGkLfg67AJU=; b=t4I6f3QWMGzQf9SA9woenNAXKD NzfhJ0/QvgBdel6VmqMaYpwDTGh8xyC80Id0N4RBMpW7OpKciWaMXW/TfeAsOb4NmuFFhXt9aPaZ1 hjn/z7DfD63nrFLqW1ZVs1aILPlqeiYpTEV9+6fEY95vyhJTz9qQS9majWWkSazMG0RGOg16+ICzx j3We3iSm41gEIqxLG1bj2XagjOfSpewde7blVD5DBuU2RSU4K5UMKmxdPpqp0idnMgdQafykAGAOY AicKhuEQBfNbFb81WdvlP/Pl+RNjgKDgQVh3ksv+BmXgm1shN98RBR4xCFaYF2BlCeRLeJqyTKvC7 zCK6Cj1g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rLgbi-00GP5d-1T; Fri, 05 Jan 2024 09:35:14 +0000 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rLgbg-00GP3a-1J; Fri, 05 Jan 2024 09:35:13 +0000 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-40d5d898162so10251655e9.3; Fri, 05 Jan 2024 01:35:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704447308; x=1705052108; darn=lists.infradead.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=lJUyDVGU0XKgaKwYDjGSDxNTROvNmlr5rGkLfg67AJU=; b=V1UFSspoG+iF5nllGyRJHxWKCjH0fBs04vvekeN9Wr9VMSt6t0UpTgEBwgK9jXlPl6 ytRGsgN6dz5eksuliK1/OViRmMJilJbtM1B2ujkRPdMOvr7AX2I+iOYmGsISyUUYy5od P3nY9AGE4SLL1PJKC8qwDD24SBg7uGLFuMrthMRy97HwM1HgwXCgWeSu3GQSMX0Uo3rS 6Kmpb0wElYJbtkr/VnKdfaKMr1va4AEHU6jOi2xDWG1TaIDS0yQmAkMG41WNjKMyeVaQ layHSGqOwWicuyHF0tw9T4csha6sT94LlUHQr6ibc6QwFVpQjQSVUtbCiY7IPndWKtc7 FqwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704447308; x=1705052108; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=lJUyDVGU0XKgaKwYDjGSDxNTROvNmlr5rGkLfg67AJU=; b=gZOc+aSOR0RVmuPVUj07zxrbVty2CK1UWjeDbu/7gE7jx0HtrqiqLw6eol1O3gvX1R 11nLfnMTv8X5wWxPzn2673ZS/kft5flCgKMoT1kDIcoJXETC7t8cEs72zEHb5bKn4yzH wcPukUkQIv3QKxa4JtAwI1zeaB1mHaOqCtuVnzS4rIlXUz9EZg8eh0YGaYD8ipCz9mS4 TDJu7haAEeff71TEY/8wsjm28pOhG8P2LiAjJi7YFuhuE8xI7ZAv8Gf89hxKq/fuDhZi UkNbOQWrjZZDkEpea715xcl7aToQYstr3U/ah3g98SyADGzp9f1l4CrNHa8xlLbzvTOZ BHhw== X-Gm-Message-State: AOJu0YyvhSFPAZmkwfnBSsapQwPGvFTk/ZijwxefvaxRrC0mnpnirTru GhA3yK/Udwr3uZQdz6//TV0= X-Google-Smtp-Source: AGHT+IGdYoX12msFQex2gQBmL00N+tTwnAfTSgVHTKvPHEqpTgUu6NAX8rJzRZKET7C6gVrEN0zBkQ== X-Received: by 2002:a05:600c:4fcb:b0:40e:347e:b4d with SMTP id o11-20020a05600c4fcb00b0040e347e0b4dmr1100921wmq.89.1704447308037; Fri, 05 Jan 2024 01:35:08 -0800 (PST) Received: from [10.254.108.81] (munvpn.amd.com. [165.204.72.6]) by smtp.gmail.com with ESMTPSA id j26-20020a05600c1c1a00b0040e3804ea71sm1002466wms.10.2024.01.05.01.35.05 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 05 Jan 2024 01:35:07 -0800 (PST) Message-ID: <160df81d-e5fa-4798-96d4-5ab1809a9680@gmail.com> Date: Fri, 5 Jan 2024 10:35:04 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 0/7] dma-buf: heaps: Add secure heap Content-Language: en-US To: Jeffrey Kardatzke , Simon Ser Cc: Pekka Paalanen , Joakim Bech , Yong Wu , Rob Herring , Sumit Semwal , christian.koenig@amd.com, Matthias Brugger , dri-devel@lists.freedesktop.org, John Stultz , Krzysztof Kozlowski , Benjamin Gaignard , Vijayanand Jitta , Nicolas Dufresne , jianjiao.zeng@mediatek.com, linux-media@vger.kernel.org, devicetree@vger.kernel.org, Conor Dooley , linaro-mm-sig@lists.linaro.org, linux-mediatek@lists.infradead.org, tjmercier@google.com, linux-arm-kernel@lists.infradead.org, AngeloGioacchino Del Regno , kuohong.wang@mediatek.com, linux-kernel@vger.kernel.org References: <20231212024607.3681-1-yong.wu@mediatek.com> <20231213110517.6ce36aca@eldfell> <20231213101549.lioqfzjxcvmqxqu3@pop-os.localdomain> <20231213133825.0a329864@eldfell> <20231213132229.q3uxdhtdsxuzw3w6@pop-os.localdomain> <20231213161614.43e5bca8@eldfell> <9m8eC1j8YSwxu9Mr8vCXyzF0nfyCSHpFbfc__FtUjjKppew65jElBbUqa-nkzFTN-N_ME893w0YQRcb3r3UbIajQUP-Y5LxnHKKFoiBepSI=@emersion.fr> From: =?UTF-8?Q?Christian_K=C3=B6nig?= In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240105_013512_451355_6FA770CC X-CRM114-Status: GOOD ( 21.78 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Am 04.01.24 um 20:50 schrieb Jeffrey Kardatzke: > Any feedback from maintainers on what their preference is? I'm fine > with 'restricted' as well, but the main reason we chose secure was > because of its use in ARM nomenclature and this is more for ARM usage > than x86. Well AMD calls this "trusted", but I think that's just slightly better than "secure". +1 for using "restricted" cause that seems to match the technical consequences. Regards, Christian. > > The main difference with similar buffers on AMD/Intel is that with > AMD/Intel the buffers are mappable and readable by the CPU in the > kernel. The problem is their contents are encrypted so you get junk > back if you do that. On ARM, the buffers are completely inaccessible > by the kernel and the memory controller prevents access to them > completely from the kernel. > > There are also other use cases for this where the hypervisor is what > is controlling access (second stage in the MMU is providing > isolation)....and in that case I do agree that 'secure' would not be > the right terminology for those types of buffers. So I do agree > something other than 'secure' is probably a better option overall. > > > On Fri, Dec 22, 2023 at 1:40 AM Simon Ser wrote: >> On Wednesday, December 13th, 2023 at 15:16, Pekka Paalanen wrote: >> >>>>> It is protected/shielded/fortified from all the kernel and userspace, >>>>> but a more familiar word to describe that is inaccessible. >>>>> "Inaccessible buffer" per se OTOH sounds like a useless concept. >>>>> >>>>> It is not secure, because it does not involve security in any way. In >>>>> fact, given it's so fragile, I'd classify it as mildly opposite of >>>>> secure, as e.g. clients of a Wayland compositor can potentially DoS the >>>>> compositor with it by simply sending such a dmabuf. Or DoS the whole >>>>> system. >>>> I hear what you are saying and DoS is a known problem and attack vector, >>>> but regardless, we have use cases where we don't want to expose >>>> information in the clear and where we also would like to have some >>>> guarantees about correctness. That is where various secure elements and >>>> more generally security is needed. >>>> >>>> So, it sounds like we have two things here, the first is the naming and >>>> the meaning behind it. I'm pretty sure the people following and >>>> contributing to this thread can agree on a name that makes sense. Would >>>> you personally be OK with "restricted" as the name? It sounds like that. >>> I would. I'm also just a by-stander, not a maintainer of kernel >>> anything. I have no power to accept nor reject anything here. >> I'd also personally be OK with "restricted", I think it's a lot better >> than "secure". >> >> In general I agree with everything Pekka said. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4889AC3DA6E for ; Fri, 5 Jan 2024 09:35:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=UHNb3XzQrihmafXwlmLwSxmmNxjDLytyCIDEOzdXS+8=; b=JJJcqThulyNbGj rAwzBvvWfy3DcVjhyZkZR3lS573Xa88Nhodzc/nd2tkGrGj5aytGcxcLNRhYA8SreL5oXffyABcDb Ar+Ta0nmr8jJlOw+9O7t8O1y9A16etOD4fjE1fzJdzWvthDbBo3YHIhFFFgKwVuKycb2w6Gl4Zgj6 kHYxKXPEIuFGNCfpDf9GsDQ/5yUsdpgL8orkbgSxRXa68JfkLVkX3vUH528dpiS21Mmdr++AxxGog VoU5hEWNITSXkEhJ7Y2l9YenIuDLNY48mgMb9peWPZlod0jEzy60ToDfsKHKj+gIZz3HGaay4JkJd x1lPeG3OOhWizg3Kxvtg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rLgbj-00GP6F-2q; Fri, 05 Jan 2024 09:35:15 +0000 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rLgbg-00GP3a-1J; Fri, 05 Jan 2024 09:35:13 +0000 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-40d5d898162so10251655e9.3; Fri, 05 Jan 2024 01:35:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704447308; x=1705052108; darn=lists.infradead.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=lJUyDVGU0XKgaKwYDjGSDxNTROvNmlr5rGkLfg67AJU=; b=V1UFSspoG+iF5nllGyRJHxWKCjH0fBs04vvekeN9Wr9VMSt6t0UpTgEBwgK9jXlPl6 ytRGsgN6dz5eksuliK1/OViRmMJilJbtM1B2ujkRPdMOvr7AX2I+iOYmGsISyUUYy5od P3nY9AGE4SLL1PJKC8qwDD24SBg7uGLFuMrthMRy97HwM1HgwXCgWeSu3GQSMX0Uo3rS 6Kmpb0wElYJbtkr/VnKdfaKMr1va4AEHU6jOi2xDWG1TaIDS0yQmAkMG41WNjKMyeVaQ layHSGqOwWicuyHF0tw9T4csha6sT94LlUHQr6ibc6QwFVpQjQSVUtbCiY7IPndWKtc7 FqwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704447308; x=1705052108; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=lJUyDVGU0XKgaKwYDjGSDxNTROvNmlr5rGkLfg67AJU=; b=gZOc+aSOR0RVmuPVUj07zxrbVty2CK1UWjeDbu/7gE7jx0HtrqiqLw6eol1O3gvX1R 11nLfnMTv8X5wWxPzn2673ZS/kft5flCgKMoT1kDIcoJXETC7t8cEs72zEHb5bKn4yzH wcPukUkQIv3QKxa4JtAwI1zeaB1mHaOqCtuVnzS4rIlXUz9EZg8eh0YGaYD8ipCz9mS4 TDJu7haAEeff71TEY/8wsjm28pOhG8P2LiAjJi7YFuhuE8xI7ZAv8Gf89hxKq/fuDhZi UkNbOQWrjZZDkEpea715xcl7aToQYstr3U/ah3g98SyADGzp9f1l4CrNHa8xlLbzvTOZ BHhw== X-Gm-Message-State: AOJu0YyvhSFPAZmkwfnBSsapQwPGvFTk/ZijwxefvaxRrC0mnpnirTru GhA3yK/Udwr3uZQdz6//TV0= X-Google-Smtp-Source: AGHT+IGdYoX12msFQex2gQBmL00N+tTwnAfTSgVHTKvPHEqpTgUu6NAX8rJzRZKET7C6gVrEN0zBkQ== X-Received: by 2002:a05:600c:4fcb:b0:40e:347e:b4d with SMTP id o11-20020a05600c4fcb00b0040e347e0b4dmr1100921wmq.89.1704447308037; Fri, 05 Jan 2024 01:35:08 -0800 (PST) Received: from [10.254.108.81] (munvpn.amd.com. [165.204.72.6]) by smtp.gmail.com with ESMTPSA id j26-20020a05600c1c1a00b0040e3804ea71sm1002466wms.10.2024.01.05.01.35.05 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 05 Jan 2024 01:35:07 -0800 (PST) Message-ID: <160df81d-e5fa-4798-96d4-5ab1809a9680@gmail.com> Date: Fri, 5 Jan 2024 10:35:04 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 0/7] dma-buf: heaps: Add secure heap Content-Language: en-US To: Jeffrey Kardatzke , Simon Ser Cc: Pekka Paalanen , Joakim Bech , Yong Wu , Rob Herring , Sumit Semwal , christian.koenig@amd.com, Matthias Brugger , dri-devel@lists.freedesktop.org, John Stultz , Krzysztof Kozlowski , Benjamin Gaignard , Vijayanand Jitta , Nicolas Dufresne , jianjiao.zeng@mediatek.com, linux-media@vger.kernel.org, devicetree@vger.kernel.org, Conor Dooley , linaro-mm-sig@lists.linaro.org, linux-mediatek@lists.infradead.org, tjmercier@google.com, linux-arm-kernel@lists.infradead.org, AngeloGioacchino Del Regno , kuohong.wang@mediatek.com, linux-kernel@vger.kernel.org References: <20231212024607.3681-1-yong.wu@mediatek.com> <20231213110517.6ce36aca@eldfell> <20231213101549.lioqfzjxcvmqxqu3@pop-os.localdomain> <20231213133825.0a329864@eldfell> <20231213132229.q3uxdhtdsxuzw3w6@pop-os.localdomain> <20231213161614.43e5bca8@eldfell> <9m8eC1j8YSwxu9Mr8vCXyzF0nfyCSHpFbfc__FtUjjKppew65jElBbUqa-nkzFTN-N_ME893w0YQRcb3r3UbIajQUP-Y5LxnHKKFoiBepSI=@emersion.fr> From: =?UTF-8?Q?Christian_K=C3=B6nig?= In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240105_013512_451355_6FA770CC X-CRM114-Status: GOOD ( 21.78 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: base64 Content-Type: text/plain; charset="utf-8"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org QW0gMDQuMDEuMjQgdW0gMjA6NTAgc2NocmllYiBKZWZmcmV5IEthcmRhdHprZToKPiBBbnkgZmVl ZGJhY2sgZnJvbSBtYWludGFpbmVycyBvbiB3aGF0IHRoZWlyIHByZWZlcmVuY2UgaXM/ICBJJ20g ZmluZQo+IHdpdGggJ3Jlc3RyaWN0ZWQnIGFzIHdlbGwsIGJ1dCB0aGUgbWFpbiByZWFzb24gd2Ug Y2hvc2Ugc2VjdXJlIHdhcwo+IGJlY2F1c2Ugb2YgaXRzIHVzZSBpbiBBUk0gbm9tZW5jbGF0dXJl IGFuZCB0aGlzIGlzIG1vcmUgZm9yIEFSTSB1c2FnZQo+IHRoYW4geDg2LgoKV2VsbCBBTUQgY2Fs bHMgdGhpcyAidHJ1c3RlZCIsIGJ1dCBJIHRoaW5rIHRoYXQncyBqdXN0IHNsaWdodGx5IGJldHRl ciAKdGhhbiAic2VjdXJlIi4KCisxIGZvciB1c2luZyAicmVzdHJpY3RlZCIgY2F1c2UgdGhhdCBz ZWVtcyB0byBtYXRjaCB0aGUgdGVjaG5pY2FsIApjb25zZXF1ZW5jZXMuCgpSZWdhcmRzLApDaHJp c3RpYW4uCgo+Cj4gVGhlIG1haW4gZGlmZmVyZW5jZSB3aXRoIHNpbWlsYXIgYnVmZmVycyBvbiBB TUQvSW50ZWwgaXMgdGhhdCB3aXRoCj4gQU1EL0ludGVsIHRoZSBidWZmZXJzIGFyZSBtYXBwYWJs ZSBhbmQgcmVhZGFibGUgYnkgdGhlIENQVSBpbiB0aGUKPiBrZXJuZWwuIFRoZSBwcm9ibGVtIGlz IHRoZWl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z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 26521C47079 for ; Fri, 5 Jan 2024 09:35:12 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 87FCD10E590; Fri, 5 Jan 2024 09:35:11 +0000 (UTC) Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) by gabe.freedesktop.org (Postfix) with ESMTPS id DEB4110E58E for ; Fri, 5 Jan 2024 09:35:09 +0000 (UTC) Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-40d5d898162so10251665e9.3 for ; Fri, 05 Jan 2024 01:35:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704447308; x=1705052108; darn=lists.freedesktop.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=lJUyDVGU0XKgaKwYDjGSDxNTROvNmlr5rGkLfg67AJU=; b=Yj3uQEyaHa7F2idUAk0odOgjil9EmjxvXSB/1bZ6SXmIhrDSCm6G86vO23+qgIqPGf KncTsOFBInTGaiwkUZQodGy6F43epZc6Adhy78z7yimdj++oLi/zgROTHiCUaQzUG6rr Y0GjKLPdxdUZy01f6xtAJPOeGxFMx1DaaayEUfE5Wkg19cV8iIr1Nq5AGfh7/eta9MY/ tP40B/c9j2OEqWjVNrSPQ4BrE+/Lt0nk/cMQodelrt4CCmZAYjEVqxxvfTMUFL88ehBN l9xmyPfEMEimnqkaT57ktXpw3rcCfRJ1icz7xEqC69QLL5FJCUYREEHoUhtYttWOEEkt EaCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704447308; x=1705052108; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=lJUyDVGU0XKgaKwYDjGSDxNTROvNmlr5rGkLfg67AJU=; b=UJmgWn9CIrjn0RLdx0O5S6MorKeogEVrsa87T9TOoUKru3dzKJ1dNfzY5abzl500Bd eZ9TUuEHNezdeKBCyqubmNdxWmUYnH8WtY5HL04OHHEBB2Lxs3K95nS4mms1EJbS9FGS tYvw/waJ6EMfIKeyPQu/Ry167eP0X8U2Ms15mNFSymk16MrzocbZtf7B6E++0PSqjqQ5 uMmQ9dZllaTHQJqdBp+dgJU+V/X8j9sRdziRyzwdvhN0RJa9sqJxoTtQvgmLQvoAYLjM Fg80FuyHVS95Zn+LvTyW59TufZc6fOt740epPT+eL+SpkSAFrej6Rufcz9mMopCq92eb cysQ== X-Gm-Message-State: AOJu0YzTW6iu3Fq692UMQ835whRdwOpStfEGJdHqN54JiMbCqMqXP3uB L124hdzGU4KBVPLulfznHiw= X-Google-Smtp-Source: AGHT+IGdYoX12msFQex2gQBmL00N+tTwnAfTSgVHTKvPHEqpTgUu6NAX8rJzRZKET7C6gVrEN0zBkQ== X-Received: by 2002:a05:600c:4fcb:b0:40e:347e:b4d with SMTP id o11-20020a05600c4fcb00b0040e347e0b4dmr1100921wmq.89.1704447308037; Fri, 05 Jan 2024 01:35:08 -0800 (PST) Received: from [10.254.108.81] (munvpn.amd.com. [165.204.72.6]) by smtp.gmail.com with ESMTPSA id j26-20020a05600c1c1a00b0040e3804ea71sm1002466wms.10.2024.01.05.01.35.05 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 05 Jan 2024 01:35:07 -0800 (PST) Message-ID: <160df81d-e5fa-4798-96d4-5ab1809a9680@gmail.com> Date: Fri, 5 Jan 2024 10:35:04 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 0/7] dma-buf: heaps: Add secure heap Content-Language: en-US To: Jeffrey Kardatzke , Simon Ser References: <20231212024607.3681-1-yong.wu@mediatek.com> <20231213110517.6ce36aca@eldfell> <20231213101549.lioqfzjxcvmqxqu3@pop-os.localdomain> <20231213133825.0a329864@eldfell> <20231213132229.q3uxdhtdsxuzw3w6@pop-os.localdomain> <20231213161614.43e5bca8@eldfell> <9m8eC1j8YSwxu9Mr8vCXyzF0nfyCSHpFbfc__FtUjjKppew65jElBbUqa-nkzFTN-N_ME893w0YQRcb3r3UbIajQUP-Y5LxnHKKFoiBepSI=@emersion.fr> From: =?UTF-8?Q?Christian_K=C3=B6nig?= In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dri-devel@lists.freedesktop.org, John Stultz , Krzysztof Kozlowski , Sumit Semwal , Benjamin Gaignard , Vijayanand Jitta , Nicolas Dufresne , Yong Wu , jianjiao.zeng@mediatek.com, linux-media@vger.kernel.org, devicetree@vger.kernel.org, Conor Dooley , linaro-mm-sig@lists.linaro.org, Pekka Paalanen , Rob Herring , linux-mediatek@lists.infradead.org, Matthias Brugger , Joakim Bech , tjmercier@google.com, linux-arm-kernel@lists.infradead.org, AngeloGioacchino Del Regno , kuohong.wang@mediatek.com, linux-kernel@vger.kernel.org, christian.koenig@amd.com Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Am 04.01.24 um 20:50 schrieb Jeffrey Kardatzke: > Any feedback from maintainers on what their preference is? I'm fine > with 'restricted' as well, but the main reason we chose secure was > because of its use in ARM nomenclature and this is more for ARM usage > than x86. Well AMD calls this "trusted", but I think that's just slightly better than "secure". +1 for using "restricted" cause that seems to match the technical consequences. Regards, Christian. > > The main difference with similar buffers on AMD/Intel is that with > AMD/Intel the buffers are mappable and readable by the CPU in the > kernel. The problem is their contents are encrypted so you get junk > back if you do that. On ARM, the buffers are completely inaccessible > by the kernel and the memory controller prevents access to them > completely from the kernel. > > There are also other use cases for this where the hypervisor is what > is controlling access (second stage in the MMU is providing > isolation)....and in that case I do agree that 'secure' would not be > the right terminology for those types of buffers. So I do agree > something other than 'secure' is probably a better option overall. > > > On Fri, Dec 22, 2023 at 1:40 AM Simon Ser wrote: >> On Wednesday, December 13th, 2023 at 15:16, Pekka Paalanen wrote: >> >>>>> It is protected/shielded/fortified from all the kernel and userspace, >>>>> but a more familiar word to describe that is inaccessible. >>>>> "Inaccessible buffer" per se OTOH sounds like a useless concept. >>>>> >>>>> It is not secure, because it does not involve security in any way. In >>>>> fact, given it's so fragile, I'd classify it as mildly opposite of >>>>> secure, as e.g. clients of a Wayland compositor can potentially DoS the >>>>> compositor with it by simply sending such a dmabuf. Or DoS the whole >>>>> system. >>>> I hear what you are saying and DoS is a known problem and attack vector, >>>> but regardless, we have use cases where we don't want to expose >>>> information in the clear and where we also would like to have some >>>> guarantees about correctness. That is where various secure elements and >>>> more generally security is needed. >>>> >>>> So, it sounds like we have two things here, the first is the naming and >>>> the meaning behind it. I'm pretty sure the people following and >>>> contributing to this thread can agree on a name that makes sense. Would >>>> you personally be OK with "restricted" as the name? It sounds like that. >>> I would. I'm also just a by-stander, not a maintainer of kernel >>> anything. I have no power to accept nor reject anything here. >> I'd also personally be OK with "restricted", I think it's a lot better >> than "secure". >> >> In general I agree with everything Pekka said.