Received: by 2002:a05:6358:e9c4:b0:b2:91dc:71ab with SMTP id hc4csp5641453rwb; Tue, 9 Aug 2022 01:15:19 -0700 (PDT) X-Google-Smtp-Source: AA6agR6UECPfoCScGnHOwNHMcCVwF5R1E1+HLJTjA1exkqDUOV6Hb7ejGtTbqsudRk9cu14I2hyk X-Received: by 2002:a05:6402:5024:b0:440:e4ad:f7b6 with SMTP id p36-20020a056402502400b00440e4adf7b6mr4691996eda.358.1660032919340; Tue, 09 Aug 2022 01:15:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660032919; cv=none; d=google.com; s=arc-20160816; b=sSFkZvOx+Gi4i6EpBdVNw0oP+S166vyGQh2ViPuMOM3ZuWkT+MsLJVM2c2vW86mybJ AgPSaeDsBEqL5CXB6bSKuA+iFh7dvBcnTUAzMcaIRtpPNzH5K81T6z6tGHyGUVpAMm5+ AEyaODC0v7htdixZIxAHzpPFesGtGa3gEvYHnJTlxBvGbwEnmniH2cA1cTgtxkxovJr4 bwDa49jff2laZBSgY+Yn73j8MUOOMVNcuuaoM1RGae9nf/2P7Y8/1mLk8VqcK/5dOpmL tAZMkDcAAv9YhTHpIOVNGC9GJp0ePCdVXUKZGGexY77uYcRpwHBIqYDIVBP90T+QmrTw JHtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Oa4idRH4opHSvrEGBh8PFBi1NgOPjrOcCMzNY1zf3fI=; b=JbAI5gxS7A5fzAaAUt5rp+U4mMBzHKqViFzvA+fWyehgLKI/i566rlf9sh4Fl/NhRJ DJ8VToBt1szTNeUZs/AQB6pXptPxkG9lBqgGKDNaGPhoAUrgm7riDEchod8j+GNCV4hZ TTKl0kZp8cCvJ7gt/Bqx4/XrxIiAJ/pwE3dyLHuKfvimIRiSCHnwHiapq6kcpLXFkslt 3faoorIl6rnZ4XtaNY//GhGbv9yWGfW9fSl75oFmSlvQQ6i0yKImtrxDP7F91gmu6vYY vcC+WwSg4EhI1fZGkrDACyND9g8Es0FYv488r/RMESbn8sEiV5QvY4LSZidT/egSoWJE JBkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=X3qOEXcT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p7-20020a1709060e8700b0072f38ecf74asi1283437ejf.794.2022.08.09.01.14.51; Tue, 09 Aug 2022 01:15:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=X3qOEXcT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233627AbiHIIEb (ORCPT + 99 others); Tue, 9 Aug 2022 04:04:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49256 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229963AbiHIIE3 (ORCPT ); Tue, 9 Aug 2022 04:04:29 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 526A8101 for ; Tue, 9 Aug 2022 01:04:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=Oa4idRH4opHSvrEGBh8PFBi1NgOPjrOcCMzNY1zf3fI=; b=X3qOEXcTyIvfa0X8utVuAQut8A vp3PtHZDmJyZWtksujPyDFRS793XvV9UCqtI+3cpRpO9iWnwkt+yKf9NUQ8eaaKKdK/DyPbzJhDJm QPA6FA7X80izxyNHOyy28oEvSKQjQwwR20YheOyXrtjFQifQWL39YFrxQw7jTmbMeNFS8N+h1eFHS +slsmD9wXVFlQx1WW0IOi/bzviepqWBw0xILC/A2MPQatuswMELzIsCkkX8qqFP0HikEfmcp3xtgU 7h2tE7P0xKX6XNjYn+tGwJ0clp3vhYE8tUop54ZoTld7Rd+qZ/R5SVLrLGv1uRHAxEOYzYojQHMzl nKe4pg1w==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1oLKDn-002dIs-Tw; Tue, 09 Aug 2022 08:04:15 +0000 Date: Tue, 9 Aug 2022 01:04:15 -0700 From: Christoph Hellwig To: Greg Kroah-Hartman Cc: Jason Gunthorpe , Oded Gabbay , Dave Airlie , dri-devel , Yuji Ishikawa , Jiho Chu , Arnd Bergmann , "Linux-Kernel@Vger. Kernel. Org" Subject: Re: New subsystem for acceleration devices Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 09, 2022 at 08:23:27AM +0200, Greg Kroah-Hartman wrote: > Based on the number of drivers that I see submitted weekly that try to > restrict their open call to just one user by using atomic variables or > other tricks, I think my interpretation of this stands :) I think they really want what Jason described most of the time. They just don't know about the pitfalls of dup yet. > > This is different from the number of FDs pointing at the struct file. > > Userpsace can open a HW state and point a lot of FDs at it, that is > > userspace's problem. From a kernel view they all share one struct file > > and thus one HW state. > > Yes, that's fine, if that is what is happening here, I have no > objection. It would be great if we could actually life that into a common layer (chardev or vfs) given just how common this, and drivers tend to get it wrong, do it suboptimal so often.