From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754310AbbCBOSc (ORCPT ); Mon, 2 Mar 2015 09:18:32 -0500 Received: from 251.110.2.81.in-addr.arpa ([81.2.110.251]:33327 "EHLO lxorguk.ukuu.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754089AbbCBOSa (ORCPT ); Mon, 2 Mar 2015 09:18:30 -0500 Date: Mon, 2 Mar 2015 14:18:05 +0000 From: Alan Cox To: Andrew Morton Cc: Sergey Senozhatsky , Minchan Kim , Jerome Marchand , Nitin Gupta , Sergey Senozhatsky , linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/8] introduce dynamic device creation/removal Message-ID: <20150302141805.6e0ed07a@www.etchedpixels.co.uk> In-Reply-To: <20150227145109.b5656bdf853c2d283bf9268e@linux-foundation.org> References: <1424959843-20409-1-git-send-email-sergey.senozhatsky@gmail.com> <20150227145109.b5656bdf853c2d283bf9268e@linux-foundation.org> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; x86_64-redhat-linux-gnu) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAFVBMVEWysKsSBQMIAwIZCwj///8wIhxoRDXH9QHCAAABeUlEQVQ4jaXTvW7DIBAAYCQTzz2hdq+rdg494ZmBeE5KYHZjm/d/hJ6NfzBJpp5kRb5PHJwvMPMk2L9As5Y9AmYRBL+HAyJKeOU5aHRhsAAvORQ+UEgAvgddj/lwAXndw2laEDqA4x6KEBhjYRCg9tBFCOuJFxg2OKegbWjbsRTk8PPhKPD7HcRxB7cqhgBRp9Dcqs+B8v4CQvFdqeot3Kov6hBUn0AJitrzY+sgUuiA8i0r7+B3AfqKcN6t8M6HtqQ+AOoELCikgQSbgabKaJW3kn5lBs47JSGDhhLKDUh1UMipwwinMYPTBuIBjEclSaGZUk9hDlTb5sUTYN2SFFQuPe4Gox1X0FZOufjgBiV1Vls7b+GvK3SU4wfmcGo9rPPQzgIabfj4TYQo15k3bTHX9RIw/kniir5YbtJF4jkFG+dsDK1IgE413zAthU/vR2HVMmFUPIHTvF6jWCpFaGw/A3qWgnbxpSm9MSmY5b3pM1gvNc/gQfwBsGwF0VCtxZgAAAAASUVORK5CYII= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > This is a long term plan, of course, but I'd like to see sysfs functions go away > > in a year or so. What do you think? > > hoo boy. Creating a /dev node and doing ioctls on it is really old > school. So old school that I've forgotten why we don't do it any more. > > Hopefully Alan can recall the thinking? Gee.. pass me the walking stick and the pipe ! The problem we used to have with it was re-use of /dev nodes and permissions. For example if I create a ZRAM instance and then we crash and my /dev is persistent then next boot I can potentially be opening that left over node (or it may even be forgotten), which has old and stale permissions on it. With devtmpfs it's a bit easier and saner. The old abuser of this was the old PCMCIA layer which has more exciting versions of the problem as it used /tmp for some nodes. Switching to sysfs probably fits better but the problem is the generic one of revoking access rights to an object. Alan