Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp5149666pxj; Wed, 9 Jun 2021 10:14:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw8XMxHN9c4wsgTV51A6XC/Ga65CALC9Jc2uMYljx2+X5VuqBx59+YsA2NjeUEx1ViIj0PV X-Received: by 2002:a17:907:628d:: with SMTP id nd13mr841625ejc.299.1623258853862; Wed, 09 Jun 2021 10:14:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623258853; cv=none; d=google.com; s=arc-20160816; b=DTFLWbhkV/XO5pPKEcSAS/qHSNzRv+w41v/gTp9UQEc6aF8Z52z/fhsFPptC783L3t ZtrcPWlj7WVW39/cLFTAe7W+mWxtEKi8s8jWFDP7jsPTrLPo7VjJVwv2VzzUSpLl41dO +42bmnkIuJf90oEPssxayQvn2u7ytsh3Ls60uC7d+4sLqg8Vpyf9QaP7WDi9Qf9Rgv7l RxFyBnmp0SOM384RdmxUcujz+rMp1q2+qnjvc7JEI4YyKqRJ9DrIKlj9N8RbSBOWdRwc RixKw4JRJU0aaaXjG+hlGX4TnqE/fDrgytR537A/Dx0qmjObu3S9ScNjlUI8ZivHBmu2 A34w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=2ePZh2khRcBN5AJHEyhbtv31/bRFlPEJ4/4U8Xk0wMo=; b=VXKTuh2lK9vDSaOgul0XfIMvrhyIMtHZ04cXclTNDTfQ8ao7QSJYLwvOO/lsJIjmOS uIykmRD8qFF4+u7e7cBNk4q91+So9NLEYpYZdTCfAvKFkQFQATsPBZZarACGfXyQvks2 vp0ADNzd2Y4mzMDGr7c8IcTdL04eJ5tmisbPeHq8L0DI+yVASSFuUvTZiqWqs0XU9mCZ G8jAhYsRHclqeh9RLHXBqJQWfT/NFX70+ebUgVbcXuKzT2R9/EXbjXY5q9cpMpF8pZTa URRk3+LF09mjEiZKG61FKq9NaOq5cMbLzWLG5x5fYuyJXaaNFljad9ajj6KupqGIEwAq J88w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=M64qtcSJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id by10si228180ejc.493.2021.06.09.10.13.47; Wed, 09 Jun 2021 10:14:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=M64qtcSJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237929AbhFIJNV (ORCPT + 99 others); Wed, 9 Jun 2021 05:13:21 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:54999 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237915AbhFIJNR (ORCPT ); Wed, 9 Jun 2021 05:13:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623229883; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2ePZh2khRcBN5AJHEyhbtv31/bRFlPEJ4/4U8Xk0wMo=; b=M64qtcSJImQzhtgTOmErCPSUCVfDA27WQrMDsZFqi8D0nAbtoGdzbaTxmU2rm/6IvUdur8 97wew9Q8uthhuJD3tN6uKK1eQumK/V2vxZ2P3dcpb+9mysRpkusFhUZ4m8MkTrcRWDmj4i WSpc2d9NP+6z2ZkajbUKi+AkS6m/jUU= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-212-J4ffaF7ROjW3kSYrLgFNBQ-1; Wed, 09 Jun 2021 05:11:22 -0400 X-MC-Unique: J4ffaF7ROjW3kSYrLgFNBQ-1 Received: by mail-wr1-f69.google.com with SMTP id h104-20020adf90710000b029010de8455a3aso10494581wrh.12 for ; Wed, 09 Jun 2021 02:11:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=2ePZh2khRcBN5AJHEyhbtv31/bRFlPEJ4/4U8Xk0wMo=; b=SgCss/LSXDIhGAyNcC2f6Ao9h+VgeP79OwWszb9GN2QV3bEfcRLWKfioKaK6wZZsRh NXXfYEWLIqy4deRMEgPh8YItg6E880Tas63iJgQ6qSjaI2gsNBvJ/EC5+ORN6fjbLpAb Ee7YoHAW5RdjQOChjhwMlFAKk2soLXiMZbbgyLeF0glcrkOU+cxwxLoNWA/3+9lmiNMX vyDJ1SdYOjvm/uVAhYy40QXjDcdrlwJSRoa3rN3SuuItYPSrHPdBFizCsIJxQ0ZlxBz3 UXVOjeNc+m+B1vWzsO/77LcVymx6s3A0BFr82JLdXVPkWGtRSpKE/rMQDayOO7hVWszo 5R5Q== X-Gm-Message-State: AOAM531fOarEuI3GwPyXPPsjtaG+QTt+LEXcsLBF+MZN+/sYldPo6qOK wIM5LrJKrRX+agSB0t+4PFu5G2xDvX/VeNi033J2tWzgdz2ZpE0RmLEk/Sem3+z2xDXtsLXV4Ey kmJXPmt5sYYRaRaCiB8bIeBJR X-Received: by 2002:adf:e507:: with SMTP id j7mr26371298wrm.178.1623229880818; Wed, 09 Jun 2021 02:11:20 -0700 (PDT) X-Received: by 2002:adf:e507:: with SMTP id j7mr26371253wrm.178.1623229880319; Wed, 09 Jun 2021 02:11:20 -0700 (PDT) Received: from ?IPv6:2001:b07:6468:f312:c8dd:75d4:99ab:290a? ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id z3sm24335841wrl.13.2021.06.09.02.11.18 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 09 Jun 2021 02:11:19 -0700 (PDT) Subject: Re: [RFC] /dev/ioasid uAPI proposal To: "Enrico Weigelt, metux IT consult" , Jason Gunthorpe , Alex Williamson Cc: "Tian, Kevin" , Jean-Philippe Brucker , "Jiang, Dave" , "Raj, Ashok" , "kvm@vger.kernel.org" , Jonathan Corbet , Robin Murphy , LKML , "iommu@lists.linux-foundation.org" , David Gibson , Kirti Wankhede , David Woodhouse , Jason Wang References: <30e5c597-b31c-56de-c75e-950c91947d8f@redhat.com> <20210604160336.GA414156@nvidia.com> <2c62b5c7-582a-c710-0436-4ac5e8fd8b39@redhat.com> <20210604172207.GT1002214@nvidia.com> <2d1ad075-bec6-bfb9-ce71-ed873795e973@redhat.com> <20210607175926.GJ1002214@nvidia.com> <20210608131547.GE1002214@nvidia.com> <89d30977-119c-49f3-3bf6-d3f7104e07d8@redhat.com> <20210608124700.7b9aa5a6.alex.williamson@redhat.com> <20210608190022.GM1002214@nvidia.com> From: Paolo Bonzini Message-ID: <671efe89-2430-04fa-5f31-f52589276f01@redhat.com> Date: Wed, 9 Jun 2021 11:11:17 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/06/21 10:51, Enrico Weigelt, metux IT consult wrote: > On 08.06.21 21:00, Jason Gunthorpe wrote: > >> Eg I can do open() on a file and I get to keep that FD. I get to keep >> that FD even if someone later does chmod() on that file so I can't >> open it again. >> >> There are lots of examples where a one time access control check >> provides continuing access to a resource. I feel the ongoing proof is >> the rarity in Unix.. 'revoke' is an uncommon concept in Unix.. > > Yes, it's even possible that somebody w/ privileges opens an fd and > hands it over to somebody unprivileged (eg. via unix socket). This is > a very basic unix concept. If some (already opened) fd now suddenly > behaves differently based on the current caller, that would be a break > with traditional unix semantics. That's already more or less meaningless for both KVM and VFIO, since they are tied to an mm. Paolo