From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f196.google.com ([209.85.192.196]:33599 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750778AbcLDNHa (ORCPT ); Sun, 4 Dec 2016 08:07:30 -0500 Date: Sun, 4 Dec 2016 21:49:36 +0900 From: Sergey Senozhatsky To: Greg KH Cc: Sergey Senozhatsky , Andrew Morton , Minchan Kim , Steven Allen , linux-kernel@vger.kernel.org, stable@vger.kernel.org, Sergey Senozhatsky Subject: Re: [PATCH] zram: restrict add/remove attributes to root only Message-ID: <20161204124936.GB4520@tigerII.localdomain> References: <20161204023515.7740-1-sergey.senozhatsky@gmail.com> <20161204102807.GB15437@kroah.com> <20161204105208.GA592@tigerII.localdomain> <20161204112820.GA24757@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161204112820.GA24757@kroah.com> Sender: stable-owner@vger.kernel.org List-ID: On (12/04/16 12:28), Greg KH wrote: > > [..] > > > > > Why can't a normal user read the attribute? Does a read actually modify > > > something? > > > > yes, it does. > > Oh that's totally and completely broken then. > > Reading from a sysfs file should NEVER cause side affects to the system. > Please fix up this api. we have a mechanism for such API changes -- there is a bunch of deprecated sysfs attrs that we will remove in 4.11; so I'll mark hot_add/hot_remove as deprecated and switch to char device (as you suggested). thanks. -ss