Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp34908rdb; Fri, 5 Jan 2024 01:37:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IGwUtgjSz534jxgjIVf5cI0xLNQFjkuXKOZ3RhWFhukyxOEhe83zAb5xflpun39brBxp+NZ X-Received: by 2002:a17:903:247:b0:1d4:7f21:d63d with SMTP id j7-20020a170903024700b001d47f21d63dmr1946898plh.46.1704447424875; Fri, 05 Jan 2024 01:37:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704447424; cv=none; d=google.com; s=arc-20160816; b=MCzNI7z9suguT4zrfLr9Z0K89CoNIgi9Pc0gP4vu8xNFo+9mRhkv6bqRxfpjkWivWV iEfCyHmK18zGJa0LBKrhTo1B7x0FPOqLVx34WdTtVRJ0xyhOVdfUcUfOPohg5lOAm7I+ K2toAAEc4HPtWM49DjvCPMdplT2L17YATfoGxkZ3dsoLgPq4k9SiHS2sBTQtxwnVONtw H0tS4+b18Ke7ke/OHqiaK2vEA2FVTNJbCCUq1Z8f1KiSICDrSeQUVM/Tv4FL4OwbxRZZ 51ffrg6LRMF3PURJuLIu0AuBhLHeQEt5W6XtgN1B8cAdStTEVGSp/TEzO1fCC+W/d0ik dMSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=lJUyDVGU0XKgaKwYDjGSDxNTROvNmlr5rGkLfg67AJU=; fh=9MdC9SmH1Id0uD958aIejB/94w4LKxsIKyoffJxELLs=; b=Uyie9xYzt1ffayoIhWDZFL9DkB7J2GkTWVYQpGRVha4/wXFERx3o18tvGDbsSkFGrs +U7W6Xgy0045d6rrg8wt1UEkY360gRjQwP6NSel+u4Yofce8JylqoGCQoEGLFfFZDog6 XKbxYviEhhjFyRSAtB/6XCiH/c/GJdKHO6QXS6id+Nu3gJl5eZ1jnSTbtdvf2UEXIdxd F60CvGDQvTt2t7Y4LHWJq8RMlsq/nqu28xWDKNtNUI564qZRHTVTItUVTd4+XjBsTJif 2e15DSvcdMgzLZLFGGQOBScUEXsjBCtGL0YfwzjxnQjm/ixRrOU0TapN8Q4JBmVlDTe7 SKKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=AMDllt2i; spf=pass (google.com: domain of linux-kernel+bounces-17665-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17665-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id b17-20020a170902ed1100b001d466549dedsi916626pld.583.2024.01.05.01.37.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jan 2024 01:37:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-17665-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=@gmail.com header.s=20230601 header.b=AMDllt2i; spf=pass (google.com: domain of linux-kernel+bounces-17665-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17665-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 C4075B24BA1 for ; Fri, 5 Jan 2024 09:35:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7A52A24B43; Fri, 5 Jan 2024 09:35:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="AMDllt2i" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 29A7328DD1; Fri, 5 Jan 2024 09:35:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-40d5d898162so10251675e9.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=vger.kernel.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=AMDllt2iyTzlBWmQyE3NO73rVFCrt/dxy4ZZ4R7V+rAsUveRi4qBVcRd9g2Zus0Vnb piFNJuQWLZPAeqqPFGOs7qSTm/o9BN6H6MH1nEn/+QaKJKiAyw9bx6I2SOLvEKWZhz+e HPmYJRluNclOctNr6auDv1f3WSXTXV2Qs/cpPRaNxGdjLOyUYreKQCEta7PbO779bApk LxR2Jvh4bwX/Seg4EyS4I/15GOaVyKY5zmo5Qzv7FStux2662v+Xdhl60Jjz1LiUrO0K /JgU65dryqk+x0aJmLPWA0rC/ETWvpIqhoAOJmNUy5Zyo3eZI6Vb+EkUg1C5FLcMguDV 1dmg== 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=Abq8Jm3QaFbgBmMaazJla7vTmU9l5KGeyx/R91+edTmSYo7SOLosYHeujuePNmijwJ U7cp4CjkueMLiBOnJdQepr92SGzKyrzJINDnbhXKuis1GSj4WL45XHLSfOlEUtEaieKn 7MzYCJv8O9024bLtx9Jo0g8Te3+OsY5cDQAi1VDakX84e2GaFRFDt12GqmQMrj5Q/P4Z eheHdzE/jMqxCyXdWuwjvPZUObQXAYxa6K8tMvWR9C+UPl6fLo36nlAqufEvW0184Y8n ecSuXwLwWqct3PjaK0FkAQTo3nGmwpS82wHaKt2AY7/qQLD9vc+Wsh9bNDtLJPqiUNGT 44Lg== X-Gm-Message-State: AOJu0YxTLNipcv2z64D7al0yNU02KUObWxaxtJ2q3yAoEaUyTagL3GXe AS1hRuSxHEnO7V063a1SSgc= 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 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 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.