Received: by 2002:a05:6358:e9c4:b0:b2:91dc:71ab with SMTP id hc4csp5680236rwb; Tue, 9 Aug 2022 02:09:35 -0700 (PDT) X-Google-Smtp-Source: AA6agR566T78xiDA35rtRgiCNupoy0gr1FlkyR4tObGZkjyvTVIfq37yheWsK3B0tPOoY00BoCk1 X-Received: by 2002:a17:907:a06b:b0:730:9496:4f63 with SMTP id ia11-20020a170907a06b00b0073094964f63mr16342043ejc.238.1660036175502; Tue, 09 Aug 2022 02:09:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660036175; cv=none; d=google.com; s=arc-20160816; b=XlhSIdQY7CaMVX5OD5evqHOXz+Ts2xxzM5GKVqKPUHMqwwtBPzMb7oFpo/k1hByc7N wDEJjeTGjsEAUDyc17loy3kpPcBubGmCSTfbwOBm3NeAOw389ue0oJOc6ztJP/N9MIOr R7W72RFXz7t93duodrC5cZJJxU2R7gqNo+5XKVwSfRb1Xtc+6bSpJ/wQJ1De8fE5GEzp G9FsLP3I1a+CSAApGeY8d6S7LUtcp8FZG4w7fxHPRwhMCyo76+CU0SalY6ju78BNPxa9 sQJwLPx1Wvn1BqZrZFeL/LI1KF960vy03gZDMpMqH8oQhEpYpShKT75ToNop6dT6FMfN 9JEA== 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=4Ju+iSIgz/a1ltohuP6AGaBG/8AlaN6GsLK4v3lp2eU=; b=cv7ISzxIA8vH63YhXZo8gbaeBqZvgmK7BnGd8lLRlclG9i2MLxmUXSZvIaLmtWk4C+ jWg6+EhqMi4LAYVVZeNgn4klTfvFKCSpf0GM3ySo96er0A8v+q+8MJLS8gZYVKRQWseI qSSdfIRF/Jk3tDeK72XABthpdTtUn04ruLZek7Uuq+61M9+bQSX0AxQQBIMaKPaJtGr/ NKeIvFwBCSH5k8wzE+KWWnCtaL7ZWXqsARp+78voTYezBVmV9bKYYxfQo7k1ZV8LTqjS vrcb84sGql79m+yrRW6lssQsaXc/uZkCRb4jO2WF5IWdMUvgVHMVZLxZ+ZmtLT+DDj0y LDUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="k6wrqg9/"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u24-20020aa7d0d8000000b0043ddebb56a0si7210635edo.61.2022.08.09.02.09.09; Tue, 09 Aug 2022 02:09:35 -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=@linuxfoundation.org header.s=korg header.b="k6wrqg9/"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236598AbiHIIpz (ORCPT + 99 others); Tue, 9 Aug 2022 04:45:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47724 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241114AbiHIIpr (ORCPT ); Tue, 9 Aug 2022 04:45:47 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 46EF860D2 for ; Tue, 9 Aug 2022 01:45:46 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 05568B80B89 for ; Tue, 9 Aug 2022 08:45:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 671D3C433D6; Tue, 9 Aug 2022 08:45:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660034743; bh=VKIJz/3kseX4NXW5x3L6MqsO9hB4DzRJ2UXkmwU0jLY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=k6wrqg9/xFtT/6CURaKkO/Pfga0WpsRzfLdgqihdYhelEtipuK7OAUp+LDHU8GTJV Jn3GdKFC/V31aWSlo9gjwqWlFWJj6njcSRF8XU/8ELupdFlb2wnqyo2Ulg4wlU6h2V 4IrqmLWeXHIQutSMd9Zz7NBI4034owXmtBBvzWmQ= Date: Tue, 9 Aug 2022 10:45:42 +0200 From: Greg Kroah-Hartman To: Christoph Hellwig 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-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,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 01:04:15AM -0700, Christoph Hellwig wrote: > 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. No objection from me, I'll gladly take patches to chardev or miscdev to support this. greg k-h