Re: [PATCH 0/2] [RFC] sysfs: Add hook for checking the file capability of opener

2018-12-31 Thread Greg Kroah-Hartman
On Mon, Dec 31, 2018 at 05:41:05PM +0800, joeyli wrote: > Hi Greg, > > Thanks for your review! > > On Sun, Dec 30, 2018 at 03:45:06PM +0100, Greg Kroah-Hartman wrote: > > On Sun, Dec 30, 2018 at 09:28:54PM +0800, Lee, Chun-Yi wrote: > > > There have some discussion in the following mail loop

Re: [PATCH 0/2] [RFC] sysfs: Add hook for checking the file capability of opener

2018-12-31 Thread joeyli
Hi Greg, Thanks for your review! On Sun, Dec 30, 2018 at 03:45:06PM +0100, Greg Kroah-Hartman wrote: > On Sun, Dec 30, 2018 at 09:28:54PM +0800, Lee, Chun-Yi wrote: > > There have some discussion in the following mail loop about checking > > capability in sysfs write handler: > >

Re: [PATCH 0/2] [RFC] sysfs: Add hook for checking the file capability of opener

2018-12-30 Thread Greg Kroah-Hartman
On Sun, Dec 30, 2018 at 09:28:54PM +0800, Lee, Chun-Yi wrote: > There have some discussion in the following mail loop about checking > capability in sysfs write handler: > https://lkml.org/lkml/2018/9/13/978 A sysfs callback should not care about stuff like this. Worst case, do a simple:

[PATCH 0/2] [RFC] sysfs: Add hook for checking the file capability of opener

2018-12-30 Thread Lee, Chun-Yi
There have some discussion in the following mail loop about checking capability in sysfs write handler: https://lkml.org/lkml/2018/9/13/978 Sometimes we check the capability in sysfs implementation by using capable function. But the checking can be bypassed by opening sysfs file within an