Received: by 2002:ab2:7104:0:b0:1f7:f6c3:9cb1 with SMTP id z4csp1818lql; Tue, 7 May 2024 08:16:05 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW/l+aC+o04G3cy9hk06/BKTE8P/6WA7bq3pWUH8zSh8ofZ9pfF/OAe6Dqyg4OwOWfnIJ2jNrizgEpICOUGciKYOE2+eUIcB7nOJB+KQA== X-Google-Smtp-Source: AGHT+IGhSf2SURVdVxvrcZpAKRkY3Gh+pC+zGT8c8rpmeAge8fpEcSc7v2etW/Jjj2lNN1R9JVmf X-Received: by 2002:a17:90a:a884:b0:2a2:7edd:19b7 with SMTP id h4-20020a17090aa88400b002a27edd19b7mr10567197pjq.27.1715094965036; Tue, 07 May 2024 08:16:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715094965; cv=pass; d=google.com; s=arc-20160816; b=m+qbc8SQVp58x6S+asSbjZTpY1xqQ1oTPa9MzwvHtauHbnWqFWt0FN3Ba6fkLfq5NI JZlzkGgqG7DLYHj5rXa3GvI5bIEIREz+nHB1iFyvOq83jGtlFGJnqWaxQZ3OATf5sFcg 3hX+SM6SgqO2JsL6qd86nYjjDIHU4Or9Efw85h4U5uUSTHRisVW2xMUHD60W2/AD20a/ ZLtEYxPZvfMzPp/EPyCHkxDp/dJ96DvAOW0SmhZa8gYdn+pp8xSj0pUAqEWulVTOBVFb eKtVsN2T51qPI5G/5N2P+ai73nWRSA2HmrOZRcvN3vWo7tw4NKxQgxA+H/KACurmcqYK paUQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=CnDKUzJ1K4d32Zvr481HYLHQmHX8rOjTCcbf7ypp6Tk=; fh=xc8UhrbaAuj/ZbBRazFEhgJcrQOBO2jH3pQ8jU/WbSk=; b=MfE0RRHg/ULYK4Q1OjuPOGAWYSbOYv3PupLvkXN1WmNMJ8FVe4mSTMVgGc7lNzHk4U GTuD9osNquAGGvEkR4xXzon6tweL8tnu5jbElEHblrSvAXQHhSAd1Hpk/YBHceFjJNQ8 hMJ+hrKm/6hlqxuFl5HRrh9nS8JJ+/JyBja2mPdf/fy+VmGh86hw+U7ZaAQ65wkWG+7e 34/9uuB8mbAX7mt8WmVjnNz9WHGQuHAy7qeVlPLvSN7KdNIUwNXvG8gmMZ5BmFFlC9EE ZcKXDIF8jyTTs74mgzFikg9HD5t6pN6qxEOXhKyofUb/YNMzr6E/dX+2UWHTb0+HgXbr nWXw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uBeyiRVv; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-171672-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-171672-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id e5-20020a17090a6f8500b002b5c353b43esi1892210pjk.42.2024.05.07.08.16.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 08:16:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-171672-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uBeyiRVv; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-171672-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-171672-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 8370C283293 for ; Tue, 7 May 2024 15:15:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C727E1635BB; Tue, 7 May 2024 15:15:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="uBeyiRVv" Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) (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 65B63161318 for ; Tue, 7 May 2024 15:15:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715094911; cv=none; b=r1I/IBRDxs551FJtpTEHqP44UGdZQUIDELr8VUh1loB/EuPXy8OVpi6ujJ6qWSSQaP6GVIQUAbLBa2mNpw6laM3Z26F6z0/A+GqT3n86PbNd1iScBIBqBCZem4wnTOdUZorbyhyyQeczy/O9OgIw3b5Jh1tmfBS/fXcam7JPW8Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715094911; c=relaxed/simple; bh=IcrNwEYyvx0qglVf0QIVfb8UjmxLQ52vtI1NNKvzKZE=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=JO4o1DuA/a+Dtpeviq1Eic+CaW7vVxj+cHafH3wM+MDLBsc3Si9ETQ1diUmMc+QWQp/Oca2JaNFcU58IW9S/vzBp9B8T6wDW/fs5zZxQQkDvZ++Fi9YejZ7fGFLpoCpUQZQo+7hqa8ongffjyW7qlvbRP24oPKJOQGxpJFEnNaI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=uBeyiRVv; arc=none smtp.client-ip=209.85.128.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-41ba1ba5591so24713015e9.1 for ; Tue, 07 May 2024 08:15:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1715094908; x=1715699708; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=CnDKUzJ1K4d32Zvr481HYLHQmHX8rOjTCcbf7ypp6Tk=; b=uBeyiRVvgK/DiKvZGopZ/Un5K6Z2SoV5WdABrpKslm0y1k38HqCjGjnYqOGD1Nfmpp +omdhuod0nP3T2x8AABjqdXb4YwptzwxkmDermFBetKevz6x+ngv/vcVAcmII4tqyqvX gDKmYgCsE7sme4a18tFk6z+iyP1RpDkDssdfRAwb7Nee1QXbFVdIe8VAhBFHuSJ9VpKT d467eqHdisumtQyp/oGFrUdFsS5j7N1RI7XzdeyLAHVcGIKaB4UZb3fewGtF+w4EpP7c +esvzZhqOR2OTWm+Z6IHkOf9pN5EgtMxFC/f4Md8pRt2cQEU44rmm4xgOQ+QeKZB0tR1 CW7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715094908; x=1715699708; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=CnDKUzJ1K4d32Zvr481HYLHQmHX8rOjTCcbf7ypp6Tk=; b=WQWcwq4eqRLu68cBVU2ce9HwXYaIz+TGRrETFatKobaRwsyRJuEIFtB+lizDdK0E1T bZA3qL2aDvGkY+f6OE/q7Z54VeKv5HbiRlFmfP8peOE0+kv8jeWua8PiM9g0S3UlhceI iPL5yn+Or+ojondjRICOLCfJrbo2v9CdVYczKfoUmgMVOj/7tLYAo0A2vac+CJJNhrzT tDhgocCDBA9xtF58xb64tkqYGZX0gw5SzbziDXJWZ+Tsw/oh6Az7ZIEfm3XlKG1O9kQW uSpwXF9mSGH4zz0xHXifE4gKWu/TlDznIXq7d/bD8SAT6Of942pBuejFo7qGRnQBhFMe Qh0Q== X-Forwarded-Encrypted: i=1; AJvYcCWfijZZpeEQAdu1ZdyOZw76nSZ1o+j0wUSAkvygu11zs/+5gwKqdvXBQagQZbBm02ZrwHubd+BFIYvBex54GDrQkwcP233ErbPt91lS X-Gm-Message-State: AOJu0YzbdHLjjizQCvs0tkL2YjzxKybuUDoW4DdPicsd/lf8LDqNl7j2 E03dJaphu/6UOwgtLMNBDsvlUpqQ1oGpeVlFbjb2N8a6C6m0+OjHNQqRy3HmauY= X-Received: by 2002:a05:600c:511a:b0:41b:b77c:679 with SMTP id 5b1f17b1804b1-41f71accb88mr961465e9.37.1715094907784; Tue, 07 May 2024 08:15:07 -0700 (PDT) Received: from [192.168.0.3] ([176.61.106.227]) by smtp.gmail.com with ESMTPSA id g7-20020adffc87000000b0034d1fe44278sm13176378wrr.39.2024.05.07.08.15.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 07 May 2024 08:15:07 -0700 (PDT) Message-ID: Date: Tue, 7 May 2024 16:15:05 +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: Safety of opening up /dev/dma_heap/* to physically present users (udev uaccess tag) ? To: Dmitry Baryshkov , Hans de Goede Cc: Sumit Semwal , Benjamin Gaignard , Brian Starkey , John Stultz , "T.J. Mercier" , =?UTF-8?Q?Christian_K=C3=B6nig?= , Lennart Poettering , Robert Mader , Sebastien Bacher , Linux Media Mailing List , "dri-devel@lists.freedesktop.org" , linaro-mm-sig@lists.linaro.org, Linux Kernel Mailing List , Milan Zamazal , Maxime Ripard , Andrey Konovalov References: <3c0c7e7e-1530-411b-b7a4-9f13e0ff1f9e@redhat.com> Content-Language: en-US From: Bryan O'Donoghue In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 07/05/2024 16:09, Dmitry Baryshkov wrote: > Ah, I see. Then why do you require the DMA-ble buffer at all? If you are > providing data to VPU or DRM, then you should be able to get the buffer > from the data-consuming device. Because we don't necessarily know what the consuming device is, if any. Could be VPU, could be Zoom/Hangouts via pipewire, could for argument sake be GPU or DSP. Also if we introduce a dependency on another device to allocate the output buffers - say always taking the output buffer from the GPU, then we've added another dependency which is more difficult to guarantee across different arches. --- bod