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.
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.
On (12/04/16 12:55), Greg KH wrote:
[..]
> That's fine, the issue is that reading a file should not cause the
> system state to change. That's just not a logical thing to have happen,
> no other sysfs files do that. Why is zram "special" in this way?
yeah, zram is not really special, we just
On (12/04/16 12:55), Greg KH wrote:
[..]
> That's fine, the issue is that reading a file should not cause the
> system state to change. That's just not a logical thing to have happen,
> no other sysfs files do that. Why is zram "special" in this way?
yeah, zram is not really special, we just
> > Cc: Andrew Morton <a...@linux-foundation.org>, Minchan Kim
> > <minc...@kernel.org>, Steven Allen <ste...@stebalien.com>,
> > linux-kernel@vger.kernel.org, sta...@vger.kernel.org, Sergey Senozhatsky
> > <sergey.senozhatsky.w...@gmail.com>
> > Subj
> linux-kernel@vger.kernel.org, sta...@vger.kernel.org, Sergey Senozhatsky
> >
> > Subject: Re: [PATCH] zram: restrict add/remove attributes to root only
> > User-Agent: Mutt/1.7.1 (2016-10-04)
> >
> > On Sun, Dec 04, 2016 at 07:52:08PM +0900, Sergey Senozhatsky wrote:
&
gt;, Steven Allen <ste...@stebalien.com>,
> linux-kernel@vger.kernel.org, sta...@vger.kernel.org, Sergey Senozhatsky
> <sergey.senozhatsky.w...@gmail.com>
> Subject: Re: [PATCH] zram: restrict add/remove attributes to root only
> User-Agent: Mutt/1.7.1 (2016-10-04)
>
&g
On (12/04/16 12:28), Greg KH wrote:
> Date: Sun, 4 Dec 2016 12:28:20 +0100
> From: Greg KH
> To: Sergey Senozhatsky
> Cc: Andrew Morton , Minchan Kim
> , Steven Allen ,
> linux-kernel@vger.kernel.org, sta...@vger.kernel.org, Sergey Senozhatsky
>
> Subject: Re: [P
On Sun, Dec 04, 2016 at 07:52:08PM +0900, Sergey Senozhatsky wrote:
> On (12/04/16 11:28), Greg KH wrote:
> > On Sun, Dec 04, 2016 at 11:35:15AM +0900, Sergey Senozhatsky wrote:
> [..]
>
> > Why can't a normal user read the attribute? Does a read actually modify
> > something?
>
> yes, it does.
On Sun, Dec 04, 2016 at 07:52:08PM +0900, Sergey Senozhatsky wrote:
> On (12/04/16 11:28), Greg KH wrote:
> > On Sun, Dec 04, 2016 at 11:35:15AM +0900, Sergey Senozhatsky wrote:
> [..]
>
> > Why can't a normal user read the attribute? Does a read actually modify
> > something?
>
> yes, it does.
On (12/04/16 11:28), Greg KH wrote:
> On Sun, Dec 04, 2016 at 11:35:15AM +0900, Sergey Senozhatsky wrote:
[..]
> Why can't a normal user read the attribute? Does a read actually modify
> something?
yes, it does.
reading from a hot_add file creates a new zram device and returns a new
device's
On (12/04/16 11:28), Greg KH wrote:
> On Sun, Dec 04, 2016 at 11:35:15AM +0900, Sergey Senozhatsky wrote:
[..]
> Why can't a normal user read the attribute? Does a read actually modify
> something?
yes, it does.
reading from a hot_add file creates a new zram device and returns a new
device's
On Sun, Dec 04, 2016 at 11:35:15AM +0900, Sergey Senozhatsky wrote:
> Only root must be able to create a new zram device, therefore
> hot_add attribute must have S_IRUSR mode, not S_IRUGO. Otherwise,
> anyone can create a new zram device (device initialization with
> the disksize attr requires
On Sun, Dec 04, 2016 at 11:35:15AM +0900, Sergey Senozhatsky wrote:
> Only root must be able to create a new zram device, therefore
> hot_add attribute must have S_IRUSR mode, not S_IRUGO. Otherwise,
> anyone can create a new zram device (device initialization with
> the disksize attr requires
Only root must be able to create a new zram device, therefore
hot_add attribute must have S_IRUSR mode, not S_IRUGO. Otherwise,
anyone can create a new zram device (device initialization with
the disksize attr requires root permission).
Fixes: 6566d1a32bf72 ("zram: add dynamic device add/remove
Only root must be able to create a new zram device, therefore
hot_add attribute must have S_IRUSR mode, not S_IRUGO. Otherwise,
anyone can create a new zram device (device initialization with
the disksize attr requires root permission).
Fixes: 6566d1a32bf72 ("zram: add dynamic device add/remove
16 matches
Mail list logo