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 X-Spam-Level: X-Spam-Status: No, score=-6.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 16D6CC48BE6 for ; Mon, 14 Jun 2021 08:23:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EBBD8613AD for ; Mon, 14 Jun 2021 08:23:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232637AbhFNIZK (ORCPT ); Mon, 14 Jun 2021 04:25:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:40244 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232528AbhFNIZI (ORCPT ); Mon, 14 Jun 2021 04:25:08 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id B6C2C61370; Mon, 14 Jun 2021 08:22:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1623658974; bh=fKEG1QQdsee0y5BUfnFwrYpg138QJfLVS/JCvDtXSNw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=BYPCCet+A5JIifh7UMTn1H1tGYFUHr2l14ShJ65eT+860NNtuiR8stnL96zddKq9e d0tX+xqvB22TODvwTwhTwl+6Jbo17g/R7iqcuj8LjsI5Wa8FUw96ByqYv662+axxB8 9Pw4rHtzu3V0FPjRQAcClKEkaSPvGVqq4+l2Brbw= Date: Mon, 14 Jun 2021 10:22:51 +0200 From: Greg KH To: "Enrico Weigelt, metux IT consult" Cc: "Eric W. Biederman" , Christian Brauner , Hannes Reinecke , containers@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: device namespaces Message-ID: References: <20210608142911.ievp2rpuquxjuyus@wittgenstein> <877dj4ff9g.fsf@disp2133> <20210609063818.xnod4rzvti3ujkvn@wittgenstein> <20210609072108.ldhsxfnfql4pacqx@wittgenstein> <85a0d777-dea6-9574-8946-9fc8f912c1af@suse.de> <20210609080918.ma2klvxkjad4pjrn@wittgenstein> <87v96k1d65.fsf@disp2133> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 14, 2021 at 09:49:22AM +0200, Enrico Weigelt, metux IT consult wrote: > On 11.06.21 20:14, Eric W. Biederman wrote: > > Hi, > > > I favor none of the virtual devices showing up in sysfs. Maybe existing > > userspace needs the devices in sysfs, but if the solution is simply to > > skip sysfs for virtual devices that is much simpler. > > Sorry for being a little bit confused, but by virtual devices you mean > things like pty's or all the other stuff we already see under > /sys/device/virtual ? > > I'm yet unsure what the better way is. If we're just talking about pty's > specifically, I maybe could live with threating them like "special sort > of pipes", but I guess that would require some extra magic. > > If I'm not mistaken, the whole sysfs stuff is automatically handled > device classes and bus'es - seems that tty's are also class devs. > > How would you skip the virtual devices from sysfs ? Adding some filter > into sysfs that looks at the device class (or some flag within it) ? Wait, step back. What _EXACTLY_ are you wanting to do here? If you have not looked at how sysfs handles devices today, that leads me to believe that you do not have a real model in place. Again, spend some time and write some code please before continuing this thread. We don't like to talk about vague things when you do not even have an idea of what you want. good luck! greg k-h