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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 23219C19F2D for ; Tue, 9 Aug 2022 08:04:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236964AbiHIIEc (ORCPT ); Tue, 9 Aug 2022 04:04:32 -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 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.